10.05.2015, 21:06
Hello , i have problem with /rac.
i want to don't respawn the trailers attach because, when i type /rac it respawns all cars including trailers.
i try many time to fix it, mm((
code:
this code was before
I hope any can help me. , Thanks.
i want to don't respawn the trailers attach because, when i type /rac it respawns all cars including trailers.
i try many time to fix it, mm((
code:
Код:
forward RACtime(); public RACtime() { new bool:unwanted[CAR_AMOUNT]; for(new player=0; player<MAX_PLAYERS; player++) { if(IsPlayerConnected(player)) { if(IsTrailerAttachedToVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; } if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; } } } for(new car = 1; car <= 420; car++) { if(!unwanted[car]) SetVehicleToRespawn(car); } }
Код:
CMD:rac(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu esti logat!"); if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 3) { new sendername[MAX_PLAYER_NAME]; new string[128]; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "Vehiculele vor fi respawnate in 10 secunde de catre administrator %s!", sendername); SetTimer("RACtime", 10000, 0); ABroadCast(0xA9C4E4FF,string,1); } } return 1; }
Код:
public RACtime(playerid) { for(new player=0; player<MAX_PLAYERS; player++) { if(!IsVehicleOccupied(player)) SetVehicleToRespawn(player); } for(new car = 1; car <= 1300; car++) { if(!IsVehicleOccupied(car)) SetVehicleToRespawn(car); } return 1; }