Quote:
Originally Posted by Donya
pawn Код:
CMD:respawnveh(playerid, params[]) { #pragma unused params if(PlayerInfo[playerid][Admin] < 3) return SendClientMessage( playerid, COLOR_RED, "[ERROR]:You are not a Public Safety Member! Or your PSM level is too low!" ); new bool:VehicleUsed[MAX_VEHICLES] = false, str[128] = "\0", pName[MAX_PLAYER_NAME]; foreach(Character, i)//for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerInAnyVehicle(i)) VehicleUsed[GetPlayerVehicleID(i)] = true; } for(new i = 1; i < MAX_VEHICLES; i++) { if(VehicleUsed[i] == false) SetVehicleToRespawn(i); } GetPlayerName(playerid, pName, MAX_PLAYER_NAME); format(str, sizeof(str), "All unccupied vehicles have been respawned by %s(%d)", pName, playerid); //newly added SendClientMessageToAll(-1, str); return; }
|
Could you please explain to me how it is done? :\