19.08.2010, 18:47
hello
the thread name says it all. I tried to make an "deleteallcars" command but it dont works
can somebody say me what I did wrong? or can somebody make me an working script?
the thread name says it all. I tried to make an "deleteallcars" command but it dont works
Код:
if(strcmp(cmd, "/deleteallcars", true) == 0 || strcmp(cmd, "/dac", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][Level] >= 4) { new bool:unwanted[128]; for(new player=0; player<MAX_PLAYERS; player++) { if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; } } for(new car = 91; car >= 90; car++) { if(!unwanted[car]) DestroyVehicle(car); } new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "SERVER: All unused cars deleted by %s.", pname); SendClientMessageToAll(COLOR_WHITE,string); } else { SendClientMessage(playerid, red, "you are not authorized to use this command!"); return 1; } } return 1; }