13.10.2009, 16:01
Hey guys just having a problem with this code when i enter the command it does respawn the cars just it also returns SERVER :UNKOWN COMMAND any ideas?
Код:
if(strcmp(cmd, "/respawncars", true) == 0) { if (PlayerInfo[playerid][pAdmin] == 0) { format(string,sizeof(string),"* The Command (%s) Is Unknown, Use '/help' For Commands.",cmdtext); SendClientMessage(playerid,COLOR_WHITE, string); return 1; } SendClientMessage(playerid,COLOR_WHITE,"* All Empty Cars Have Been Respawned"); RespawnEmptyCars(); return 1; } public RespawnEmptyCars() { for(new d = 0; d < MAX_VEHICLES; d++) { if(IsVehicleEmpty(d)) { SetVehicleToRespawn(d); VehicleInfo[d][gas] = 100; ModVehicle(d); } } } IsVehicleEmpty(vehicleid) { for(new i = 0, j = GetMaxPlayers(); i < j; i++) { if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && IsPlayerInVehicle(i,vehicleid)) return false; } return true; }