Trucking Server - 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: Trucking Server (
/showthread.php?tid=568715)
Trucking Server -
Ugaustin - 24.03.2015
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?
Re: Trucking Server -
fuckingcruse - 24.03.2015
Here
Quote:
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...
https://sampwiki.blast.hk/wiki/DisablePlayerCheckpoint
Good day
Re: Trucking Server -
Ugaustin - 24.03.2015
I want to stay 20 seconds in truck without trailer.. and if he dosent get trailer in 20 seconds.. to spawn vehicle..
Re: Trucking Server -
fuckingcruse - 24.03.2015
I gave the same thing lol.. in the place of vehicle id.----> keep you truck or trailer id ..
And its done lol
Re: Trucking Server -
maximthepain - 24.03.2015
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.
https://sampwiki.blast.hk/wiki/SetTimerEx
https://sampwiki.blast.hk/wiki/GetVehicleTrailer
https://sampwiki.blast.hk/wiki/SetVehicleToRespawn
Re: Trucking Server -
Ugaustin - 24.03.2015
i want to stop seeing trucks and trailers on road.
Re: Trucking Server -
maximthepain - 24.03.2015
Quote:
Originally Posted by Ugaustin
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.
https://sampwiki.blast.hk/wiki/DestroyVehicle