22.08.2012, 00:37
Hey guys, I have scripted a "Respawn All cars" command, so, what I wanna add into the command is
1) If a player is in a vehicle, his vehicle doesn't get respawned
2) Only the unoccupied/unused vehicles get respawned.
1) If a player is in a vehicle, his vehicle doesn't get respawned
2) Only the unoccupied/unused vehicles get respawned.
pawn Код:
CMD:rac(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
for(new i = 0; i < MAX_VEHICLES; i++)
{
SetVehicleToRespawn(i);
}
new string[128];
new pName[24];
GetPlayerName(playerid,pName,24);
format(string,sizeof string,""#COL_ORANGE"[SERVER]"#COL_LRED"%s has respawned all the server's vehicles!",pName);
SendClientMessageToAll(COLOR_GREEN, string);
return 1;
}