SA-MP Forums Archive
Fail Job System - 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: Fail Job System (/showthread.php?tid=656186)



Fail Job System - Gam3rBoyHD - 09.07.2018

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?


Re: Fail Job System - spinu - 09.07.2018

https://sampforum.blast.hk/showthread.php?tid=356005

uses this instead of a timer


Re: Fail Job System - Verc - 09.07.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


Re: Fail Job System - spinu - 09.07.2018

use gettime to get time when exit and compare to time when enter.
I didnt mean to use a timer sry


Re: Fail Job System - Florin48 - 09.07.2018

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.