Jump to content
  • 0

PROBLEMA STUNT


InceMan

Question

am incercat sa fac un system de stunt si imi da o eroare la linia asta new STUNTTT = random(sizeof(STUNTNRG));

function STUNT(playerid)
{
    foreach(new i : Player)
    {
        new STUNTTT = random(sizeof(STUNTNRG));

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

22 answers to this question

Recommended Posts

  • 0
Chiar acum, [RW]Robi a spus:

Pai si vrei sa ghicim noi eroarea ta?

 

la astea 2 imi da erori        

new STUNTTT = random(sizeof(STUNTNRG));
SetPlayerCheckpoint(i, STUNTNRG[STUNTTT][0], STUNTNRG[STUNTTT][1], STUNTNRG[STUNTTT][2], STUNTNRG[STUNTTT][3], 9.0);

C:\Users\andu\Desktop\BIG UPDATE\gamemodes\csfrv280.pwn(2296) : error 017: undefined symbol "STUNTNRG"
C:\Users\andu\Desktop\BIG UPDATE\gamemodes\csfrv280.pwn(2296) : error 029: invalid expression, assumed zero
C:\Users\andu\Desktop\BIG UPDATE\gamemodes\csfrv280.pwn(2296) : warning 215: expression has no effect
C:\Users\andu\Desktop\BIG UPDATE\gamemodes\csfrv280.pwn(2297) : error 017: undefined symbol "STUNTNRG"
C:\Users\andu\Desktop\BIG UPDATE\gamemodes\csfrv280.pwn(2297) : warning 215: expression has no effect
C:\Users\andu\Desktop\BIG UPDATE\gamemodes\csfrv280.pwn(2297) : error 001: expected token: ";", but found "]"
C:\Users\andu\Desktop\ BIG UPDATE\gamemodes\csfrv280.pwn(2297) : error 029: invalid expression, assumed zero
C:\Users\andu\Desktop\BIG UPDATE\gamemodes\csfrv280.pwn(2297) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0
Acum 1 minut, [RW]Robi a spus:

banuiesc ca ai si un enum, nu?

Daca da, lasa enumul aici.

 

ce am e doar 

new Float:STRUNTNRG[10][4] = {
{1025.9944,1975.8160,11.3449},
{1703.6294,2694.0879,10.8203},
{1972.5380,927.4847,10.8203},
{1938.6154,2184.8523,10.8203},
{1682.1293,1913.6169,10.8203},
{988.3104,1879.0475,11.3594},
{1458.3400,2523.8979,10.8203},
{2484.4036,1528.7244,10.9017},
{2225.0576,2520.0786,10.8203},
{1531.1907,2357.5469,10.8203}
};

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0
new Float:STUNTNRG[10][4] = {
{1025.9944,1975.8160,11.3449},
{1703.6294,2694.0879,10.8203},
{1972.5380,927.4847,10.8203},
{1938.6154,2184.8523,10.8203},
{1682.1293,1913.6169,10.8203},
{988.3104,1879.0475,11.3594},
{1458.3400,2523.8979,10.8203},
{2484.4036,1528.7244,10.9017},
{2225.0576,2520.0786,10.8203},
{1531.1907,2357.5469,10.8203}
};

Pe viitor fi atent la ce scrii, acum ar trebui sa mearga.

 

                        

 

 

Link to comment
Share on other sites

  • 0
Acum 47 minute, [RW]Robi a spus:

new Float:STUNTNRG[10][4] = {
{1025.9944,1975.8160,11.3449},
{1703.6294,2694.0879,10.8203},
{1972.5380,927.4847,10.8203},
{1938.6154,2184.8523,10.8203},
{1682.1293,1913.6169,10.8203},
{988.3104,1879.0475,11.3594},
{1458.3400,2523.8979,10.8203},
{2484.4036,1528.7244,10.9017},
{2225.0576,2520.0786,10.8203},
{1531.1907,2357.5469,10.8203}
};

Pe viitor fi atent la ce scrii, acum ar trebui sa mearga.

 

da imi merge aia acum am altele erori la if(IsANRG(vid))

function IsANRG(vehicleid)
{
        if(vehicleid == 522) return 1;// 522 = nrg
    return 0;
}

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0
1 oră în urmă, Geani a spus:

da imi merge aia acum am altele erori la if(IsANRG(vid))

function IsANRG(vehicleid)
{
        if(vehicleid == 522) return 1;// 522 = nrg
    return 0;
}

pai spune ce eroare iti da ma omule.

 

                        

 

 

Link to comment
Share on other sites

  • 0
Acum 41 minute, [RW]Robi a spus:

pai spune ce eroare iti da ma omule.

 

am rezolvat imi merge dar cand porneste stuntul dupa 5 minute imi arata cp-ul dar nu il pot lua acel premiu http://imgur.com/a/R9Z2h

function STUNT(playerid)
{
    foreach(new i : Player)
    {
        new STUNTTT = random(sizeof(STUNTNRG));
        new Float:x,Float:y,Float:z,Float:rz;
        SetPlayerCheckpoint(i, STUNTNRG[STUNTTT][0], STUNTNRG[STUNTTT][1], STUNTNRG[STUNTTT][2], STUNTNRG[STUNTTT][3], 9.0);
        SetPlayerMapIcon(playerid, 12, STUNTNRG[STUNTTT][0], STUNTNRG[STUNTTT][1], STUNTNRG[STUNTTT][2], STUNTNRG[STUNTTT][3],52, 0,     MAPICON_GLOBAL);
        //SetPlayerCheckpoint(i, x, y, z, rz); // rz = raza cercului
        SendClientMessageToAll(-1, "Acum este un nou stunt, dute si fal.");

        STUNTV[playerid] = 1;
    }
    return 1;
}

    if(IsANRG(vid))
    {
        if(STUNTV[playerid] == 1)
        {
            new name = GetPlayerName(playerid);
            DisablePlayerCheckpoint(playerid);
            RemovePlayerMapIcon(playerid, 12);
            SendClientMessageToAll(-1, "%s a castigat STUNT-ul, acesta a castigat 50,000$");
            GivePlayerMoney(playerid, 50000);
        }
    }

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0
Acum 6 minute, WopsS a spus:

La SetPlayerCheckpoint de ce ai 6 parametrii? Functia are 6. Vezi http://wiki.sa-mp.com/wiki/Function:SetPlayerCheckpoint .

La STUNTNRG poti sa ai doar 3 coloane, nu 4. Tu acolo ai valoarea 0 pe coloana 4 si de asta nu ti se vede checkpoint-ul (presupun).

nu inteleg ce vrei sa imi spui

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0
Acum 37 minute, WopsS a spus:

La SetPlayerCheckpoint de ce ai 6 parametrii? Functia are 6. Vezi http://wiki.sa-mp.com/wiki/Function:SetPlayerCheckpoint .

La STUNTNRG poti sa ai doar 3 coloane, nu 4. Tu acolo ai valoarea 0 pe coloana 4 si de asta nu ti se vede checkpoint-ul (presupun).

in tradevar acuma imi arata cp dar tot nu pot sa eau stuntul http://imgur.com/nm8chOw

function STUNT(playerid)
{
    foreach(new i : Player)
    {
        new STUNTTT = random(sizeof(STUNTNRG));
        //new Float:x,Float:y,Float:z,Float:rz;
        SetPlayerCheckpoint(i, STUNTNRG[STUNTTT][0], STUNTNRG[STUNTTT][1], STUNTNRG[STUNTTT][2], 9.0);
        SetPlayerMapIcon(playerid, 1274, STUNTNRG[STUNTTT][0], STUNTNRG[STUNTTT][1], STUNTNRG[STUNTTT][2],500, 100, MAPICON_GLOBAL);
        //SetPlayerCheckpoint(i, x, y, z, rz); // rz = raza cercului
        SendClientMessageToAll(-1, "Acum este un nou stunt, dute si fal.");

        STUNTV[playerid] = 1;
    }
    return 1;
}

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0
Chiar acum, Geani a spus:

in tradevar acuma imi arata cp dar tot nu pot sa eau stuntul http://imgur.com/nm8chOw

function STUNT(playerid)
{
    foreach(new i : Player)
    {
        new STUNTTT = random(sizeof(STUNTNRG));
        //new Float:x,Float:y,Float:z,Float:rz;
        SetPlayerCheckpoint(i, STUNTNRG[STUNTTT][0], STUNTNRG[STUNTTT][1], STUNTNRG[STUNTTT][2], 9.0);
        SetPlayerMapIcon(playerid, 1274, STUNTNRG[STUNTTT][0], STUNTNRG[STUNTTT][1], STUNTNRG[STUNTTT][2],500, 100, MAPICON_GLOBAL);
        //SetPlayerCheckpoint(i, x, y, z, rz); // rz = raza cercului
        SendClientMessageToAll(-1, "Acum este un nou stunt, dute si fal.");

        STUNTV[playerid] = 1;
    }
    return 1;
}

Ai auzit de OnPlayerEnterCheckPoint frate?

 

                        

 

 

Link to comment
Share on other sites

  • 0
Acum 1 minut, [RW]Robi a spus:

Ai auzit de OnPlayerEnterCheckPoint frate?

 

da acolo am asta 

public OnPlayerEnterCheckpoint(playerid)
{

    new vid;
    if(IsANRG(vid))
    {
        if(STUNTV[playerid] == 1)
        {
            new name = GetPlayerName(playerid);
            DisablePlayerCheckpoint(playerid);
            RemovePlayerMapIcon(playerid, 1274);
            SendClientMessageToAll(-1, "%s a castigat STUNT-ul, acesta a castigat 50,000$");
            GivePlayerMoney(playerid, 50000);
        }
    }

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0
1 oră în urmă, [RW]Robi a spus:

new vid = GetVehicleModel(GetPlayerVehicleID(playerid));

de cand am pus ce me-ai dat ru imi da restart la server [02:27:37] [debug] #0 native SendClientMessageToAll () from samp03svr
[02:27:37] [debug] #1 000d9310 in public OnPlayerEnterCheckpoint (playerid=0) at C:\Users\andu\Desktop\CSForce RPG - [v2.8.0] - BIG UPDATE\gamemodes\csfv280.pwn:13448
[02:27:37] [debug] Native backtrace:
[02:27:37] [debug] #0 f744cca0 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () from plugins/crashdetect.so
[02:27:37] [debug] #1 f7445d22 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[02:27:37] [debug] #2 f7446314 in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[02:27:37] [debug] #3 f7448964 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[02:27:37] [debug] #4 f744c5cd in ?? () from plugins/crashdetect.so
[02:27:37] [debug] #5 f776e410 in ?? ()
[02:27:37] [debug] #6 f74bc2f4 in _IO_vfprintf () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[02:27:37] [debug] #7 f74dc01c in vsprintf () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[02:27:37] [debug] #8 080add67 in ?? () from samp03svr
[02:27:37] [debug] #9 080d9e51 in ?? () from samp03svr
[02:27:37] [debug] #10 080950e4 in ?? () from samp03svr
[02:27:37] [debug] #11 f74477b3 in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[02:27:37] [debug] #12 f6391074 in _ZN8Profiler8CallbackEiPiS0_ () from plugins/profiler.so
[02:27:37] [debug] #13 f63909a8 in ?? () from plugins/profiler.so
[02:27:37] [debug] #14 f744f02f in amx_Exec () from plugins/crashdetect.so
[02:27:37] [debug] #15 00000092 in ?? () from `¨p÷¦p÷ÜîüÜîüÝđüÜîüłňüÜňü4#q÷

si ii provoaca erori si la [02:16:25] [profiler] Attached profiler to gamemodes/csfv280.amx

UP

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0
Acum 9 ore, Geani a spus:

SendClientMessageToAll(-1, "%s a castigat STUNT-ul, acesta a castigat 50,000$");

Mesajele trebuie formatate prin format, nu poti pune %s in SendClientMessage daca nu e formatat.

 

                        

 

 

Link to comment
Share on other sites

  • 0
Acum 4 ore, [RW]Robi a spus:

Mesajele trebuie formatate prin format, nu poti pune %s in SendClientMessage daca nu e formatat.

 

am incercat sai fac asa format(string, sizeof(string), "{CF165D}%s A castigat STUNT-ul, acesta a castigat 50,000$", GetName);
            SendClientMessageToAll(-1, COLOR_GREEN, string);

dar nu imi mai da cp-ul acuma am sa verific diseara cand ajung de la lucru

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0

acu imi merge cat mai bine numai ca e o problema nu da stuntul la toata lumea daoar cine sta 10 min pe server ii da stuntul, eu ce vreau sa fie pentru  toti playeri egali chear daca dau /q sa porneasca automat pentru toti playeri asta daca ma ajutati puteti da topic closed !

 

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0

am incercat sa modific systemul numai ca acun nu mai pot lua cp si bani     new vid = GetVehicleModel(GetPlayerVehicleID(playerid));
    if(IsANRG(vid))
    {
        if(STUNTV[playerid] == 1)
        {
            new GetName = GetPlayerName(playerid);
            new randmoney = 3500 + random(90000);
            new string[256];
            DisablePlayerCheckpoint(playerid);
            RemovePlayerMapIcon(playerid, 1274);
            DestroyPickup(pickup_event);
            //GivePlayerCash(playerid, 50000);
            //Update(playerid, pCashx);
            //SendClientMessageToAll(-1,"a castigat STUNT-ul, acesta a castigat 50,000$");
            //
            format(string, sizeof(string), "{CF165D}%s A castigat STUNT-ul, acesta a castigat %d$",GetName, randmoney);
            SendClientMessageToAll( COLOR_GREEN, string);
            SendClientMessage(playerid, COLOR_YELLOW, "STUNT-ul este in perioada de probe  Nu este finalizat.");
            GivePlayerCash(playerid, randmoney);
            Update(playerid, pCashx);

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.