20.05.2016, 03:59
Код:
CMD:respawnall(playerid, params[]) { SendAdminText(playerid, "/arac", params); // Show the command to all admins online if(APlayerData[playerid][LoggedIn] == false) return 0; // If player is not logged in return nothing if (APlayerData[playerid][AdminLevel] == 0) return 0; // If player is not admin return nothing for(new x=0; x<MAX_VEHICLES; x++) // Loop all vehicles in the server { // Check if there is vehicles in use icluding trialers if(!IsVehicleOccupied(x) || GetVehicleTrailer(x) == 1) { if(!IsTrailerAttachedToVehicle(x)) SetVehicleToRespawn(x); // Respawn all vehicles } } SendClientMessageToAll(0xFFFFFFFF, "{FF0000}[WARNING]: {FFFFFF}All Unused Vehicles And Trailers Are Respawned."); // Note: You must define the IsVehicleOccupied function return 1; }