Posts: 1
Threads: 1
Joined: Jul 2017
Reputation:
0
Hello. I made a job for my gamemode. You will get a vehicle and you will need to deliver some good. I made it so that if someone works and exits the vehicle, they fail a job. Now I am trying to do it so that if someone exits the vehicle, they get 30 seconds to get back in it, or else the job will fail. I tried to do it with a timer, but I messed up. Can somebody give me an example of how to do it?
Posts: 171
Threads: 5
Joined: Apr 2018
Quote:
Originally Posted by spinu
|
no,literally the first page,AndreT says most problematic things when you do that..
use y_timer,it's much more clean and readable,there are also many advantages which corne states in this thread.
https://sampforum.blast.hk/showthread.php?tid=571044
Posts: 17
Threads: 2
Joined: Jun 2018
Reputation:
0
use gettime to get time when exit and compare to time when enter.
I didnt mean to use a timer sry
Posts: 259
Threads: 2
Joined: Nov 2015
Reputation:
0
09.07.2018, 14:50
(
Последний раз редактировалось Florin48; 09.07.2018 в 15:22.
)
Create the timer when it comes out of the vehicle and delete it when it comes back.
Or you can create a [ new timerjob[MAX_PLAYERS] = 0; global variable ] and when you exit the vehicle you set it to [ timerjob [playerid] = 30; ] put it in a 1 second timer and do [ if (timerjob [playerid]> 0) timerjob [playerid]--; ] and when it reaches 0 you can make the vehicle disappear.
I hope you understand what I mean.
Trimite-mi un mesaj privat daca vrei sa te ajut mai mult.