23.12.2015, 04:50
hello !!
brother , I have command to re-spawn all cars , but when I add it to pwn I get error
and this is code :
brother , I have command to re-spawn all cars , but when I add it to pwn I get error
Код:
:C:\Users\Admin\Desktop\COD\COD.pwn(24535) : error 010: invalid function or declaration C:\Users\Admin\Desktop\COD\COD.pwn(24537) : error 010: invalid function or declaration C:\Users\Admin\Desktop\COD\COD.pwn(24539) : error 010: invalid function or declaration C:\Users\Admin\Desktop\COD\COD.pwn(24542) : error 010: invalid function or declaration C:\Users\Admin\Desktop\COD\COD.pwn(24544) : error 017: undefined symbol "CAR_AMOUNT" C:\Users\Admin\Desktop\COD\COD.pwn(24545) : error 010: invalid function or declaration C:\Users\Admin\Desktop\COD\COD.pwn(24547) : error 010: invalid function or declaration C:\Users\Admin\Desktop\COD\COD.pwn(24549) : error 010: invalid function or declaration C:\Users\Admin\Desktop\COD\COD.pwn(24551) : error 010: invalid function or declaration C:\Users\Admin\Desktop\COD\COD.pwn(24556) : error 054: unmatched closing brace ("}") C:\Users\Admin\Desktop\COD\COD.pwn(24557) : error 010: invalid function or declaration C:\Users\Admin\Desktop\COD\COD.pwn(24560) : warning 203: symbol is never used: "unwanted" 11 Errors.
Код:
if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0) // by Ellis { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 3) { SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!"); return 1; } new bool:unwanted[CAR_AMOUNT]; for(new player=0; player<MAX_PLAYERS; player++) { if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; } } for(new car = 1; car <= 268; car++) { if(!unwanted[car]) SetVehicleToRespawn(car); } GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "SERVER: All unused cars respawned by %s.", sendername); BroadCast(COLOR_WHITE,string); } return 1; }