View Full Version : Trucking Server

24/03/2015, 02:02 PM
I made but how can I make to appear "if in 20 seconds you don't have trailer you lose job and truck respawns" how can I do it?

24/03/2015, 02:29 PM

AddStaticVehicleEx ( vehicleidoftruck, Fload X, Float Y, Float z, camera, color1, color2,
time to respawn the vehicle );

and if you want him to to get msg about your vehicle respawn in 20 seconds

public OnPlayerExitVehicle(playerid, vehicleid)
new string[35];
format(string, sizeof(string), "INFO: You will lose your job , If you don't take your trainer in 20 seconds", vehicleid);// use the same vehicle id..
SendClientMessage(playerid, 0xFFFFFFFF, string);

return 1;
This will make the player get a msg after he leoft the truck , if you put the truCk id that you use In your your server

And to disable cp , you can do it... http://wiki.sa-mp.com/wiki/DisablePlayerCheckpoint

Good day

24/03/2015, 03:26 PM
I want to stay 20 seconds in truck without trailer.. and if he dosent get trailer in 20 seconds.. to spawn vehicle..

24/03/2015, 03:31 PM
I gave the same thing lol.. in the place of vehicle id.----> keep you truck or trailer id ..
And its done lol

24/03/2015, 03:49 PM
Simply check if there is trailer attached to truck (globaly for every trucker) & if it isn't then use 20 second timer to get the trailer. If he got it by then, then use return 1, so its fine, noting will happen to him, however if he didnt have trailer after the timer ends then make him lose his job and respawn truck.


24/03/2015, 04:12 PM
i want to stop seeing trucks and trailers on road.

24/03/2015, 04:27 PM
i want to stop seeing trucks and trailers on road.

Truck and trailers? Well you spawn them by ids, so you respawn them to thier origial location by id.

If you want to delete them for ever. destroy thier vehicle id and they will disapear.