Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help (
/showthread.php?tid=569374)
Help -
Edw - 30.03.2015
Hello, I have a problem. I did a job farmer, which is attached to a tractor trailer, the problem is that the / rac trailer is respawn, you can make this a restriction no longer respawn if used?
/ rac = respawn all cars.
pawn Код:
CMD:rac(playerid, params[])
{
if(playerLogged[playerid] == 0) return 0; if(PlayerInfo[playerid][pAdmin] < 3) return NotAdmin(playerid);
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 <= 420; car++) { if(!unwanted[car]) SetVehicleToRespawn(car); }
return 1;
}
Re: Help -
Scrillex - 30.03.2015
Umm show where you are spawning that trailer..
Re: Help -
Edw - 30.03.2015
PHP код:
AttachTrailerToVehicle( FarmerJob[ 9 ], FarmerJob[ 4 ] ), AttachTrailerToVehicle( FarmerJob[ 10 ], FarmerJob[ 5 ] ),
AttachTrailerToVehicle( FarmerJob[ 11 ], FarmerJob[ 6 ] ), AttachTrailerToVehicle( FarmerJob[ 12 ], FarmerJob[ 7 ] ),
AttachTrailerToVehicle( FarmerJob[ 13 ], FarmerJob[ 8 ] );