Trucking Server
#1

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?
Reply
#2

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
Reply
#3

I want to stay 20 seconds in truck without trailer.. and if he dosent get trailer in 20 seconds.. to spawn vehicle..
Reply
#4

I gave the same thing lol.. in the place of vehicle id.----> keep you truck or trailer id ..
And its done lol
Reply
#5

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
Reply
#6

i want to stop seeing trucks and trailers on road.
Reply
#7

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)