How can I make a timer for how long someone survives?
#1

Hello there! Im currently trying to re-create a gamemode from GTA V & integrate it into samp, but i've ran into one issue and that is timers.

I wanted to know how I can use timers to create a "Survival" Timer to show how long each player survives in Minutes & Seconds, and also by using the timer, it can make the amount of cash variable for how long you survive.

If this is worded in a weird way to you, just let me know

Thanks in advance.
Reply
#2

gettime() returns a unix timestamp - the number of seconds that have passed since 0:00 1/01/1970. If you save the current timestamp when they spawn, and hen when they die get the new CURRENT timestamp, you can work out the difference and this will tell you how long they have been alive.
Reply
#3

Thanks MP2, I'll take a look into using Gettime()
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)