/vrespawn
#1

Since I'm fairly new to loops, I wanted to make a /vrespawn that respawns all unoccupied vehicles.


Here is the code:

pawn Код:
dcmd_vrespawn(playerid,params[])
{
    #pragma unused params
    if(pi[playerid][admin] <= 0) return 0;
    if(sscanf(params,"u"))
    {
    for(new 1 = 0; i < MAX_VEHICLES; i++)
    {
    SendClientMessageToAll(COLOUR_YELLOW,"All unoccupied vehicles has been respawned");
    SetVehicleToRespawn(i);
    return 1;
    }
    return 1;
}
Errors:

Код:
C:\GTASER~1\GAMEMO~1\MyDm.pwn(1860) : error 001: expected token: "-identifier-", but found "-integer value-"
C:\GTASER~1\GAMEMO~1\MyDm.pwn(1862) : error 008: must be a constant expression; assumed zero
C:\GTASER~1\GAMEMO~1\MyDm.pwn(1863) : error 001: expected token: ")", but found ";"
C:\GTASER~1\GAMEMO~1\MyDm.pwn(1863) : error 036: empty statement
Could someone tell me what I've done wrong?
Reply


Messages In This Thread
/vrespawn - by Dolph - 04.08.2010, 14:55
Re: /vrespawn - by Jeffry - 04.08.2010, 14:57
Re: /vrespawn - by Mike Garber - 04.08.2010, 15:00
Re: /vrespawn - by Dolph - 04.08.2010, 15:05
Re: /vrespawn - by Dolph - 04.08.2010, 15:35
Re: /vrespawn - by Hiddos - 04.08.2010, 15:40
Re: /vrespawn - by Mike Garber - 04.08.2010, 15:40
Re: /vrespawn - by Hiddos - 04.08.2010, 15:47
Re: /vrespawn - by Jeffry - 04.08.2010, 16:26
Re: /vrespawn - by Nero_3D - 04.08.2010, 19:47

Forum Jump:


Users browsing this thread: 1 Guest(s)