21.12.2015, 16:36
Heloo i need help with a cmd:
How I can make it to not respawn trailers who is in use?Beacuse this respawn and trailers who attached to a truck
Код:
CMD:respawnall(playerid,params[]) { new string[128]; if(APlayerData[playerid][PlayerLevel] < 4) return SendClientMessage(playerid, 0xFF0000FF, "Nu ai level neceasr!"); for(new car = 1; car <= 1999; car++) { if(IsVehicleEmpty(car)) SetVehicleToRespawn(car); } //GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "Adminul %s a respawnat toate masinile.", pName(playerid)); SendClientMessageToAll(COLOR_ROYALBLUE,string); return 1; } stock IsVehicleEmpty(vehicleid) { for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerInVehicle(i, vehicleid)) return 0; } return 1; }