13.10.2009, 20:52
I tried to do /respawn command, but i got one error
.pwn(372) : error 017: undefined symbol "cmd"
Heres the command. Sorry i dont know how to put it in code
if(strcmp(cmd, "/respawnall", true) == 0 || strcmp(cmd, "/respvehs", true) == 0)
{
if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_LIGHTRED, "You are not an admin to use it!");
for(new i=0;i<MAX_VEHICLES;i++)
{
if(IsVehicleOccupied(i) == 0)
{
SetVehicleToRespawn(i);
}
}
SendClientMessage(playerid, 0xAFAFAFAA, "* All unoccupied vehicles respawned!!");
return 1;
}
Thanks.
.pwn(372) : error 017: undefined symbol "cmd"
Heres the command. Sorry i dont know how to put it in code
if(strcmp(cmd, "/respawnall", true) == 0 || strcmp(cmd, "/respvehs", true) == 0)
{
if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_LIGHTRED, "You are not an admin to use it!");
for(new i=0;i<MAX_VEHICLES;i++)
{
if(IsVehicleOccupied(i) == 0)
{
SetVehicleToRespawn(i);
}
}
SendClientMessage(playerid, 0xAFAFAFAA, "* All unoccupied vehicles respawned!!");
return 1;
}
Thanks.