24.05.2010, 11:34
how can i make it so if i do a command i respawn all vehicles?
for(new i=0; i<MAX_VEHICLES; i++)
{
SetVehicleToRespawn(i);
}
if(strcmp("/respawnallcars", cmdtext, true) == 0)
{
for(new i = 0; i < MAX_VEHICLES; i++)
{
SetVehicleToRespawn(i);
}
return 1;
}
if(strcmp("/respawnallcars", cmdtext, true) == 0)
{
if(IsPlayerAdmin(playerid))
{
for(new i = 0; i < MAX_VEHICLES; i++)
{
SetVehicleToRespawn(i);
}
SendClientMessage(playerid, COLOR_GREEN, "You have respawned all vehicles.");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not an admin.");
}
return 1;
}
if(strcmp("/respawnallcars", cmdtext, true) == 0)
{
if(IsPlayerAdmin(playerid))
{
for(new i = 1; i <= MAX_VEHICLES; i++)
{
SetVehicleToRespawn(i);
}
SendClientMessage(playerid, COLOR_GREEN, "You have respawned all vehicles.");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not an admin.");
}
return 1;
}
Originally Posted by dice7
Slight edit:
pawn Code:
|