Debug with spawn timer
#1

Hi,
I really need a Debug mode with a spawn timer. So, when someone spawns a vehicle, after that he/she has to wait for 1 min before spawning again.
But, i had this, with tickcount and it worked. But, now i bought a host with linux stuff and tickcount doesn't work anymore.
So i need a different option. Who has something for me?
Reply
#2

tried using GetTickCount ?
Reply
#3

''But, i had this, with tickcount and it worked. But, now i bought a host with linux stuff and tickcount doesn't work anymore.''
Reply
#4

I assumed by "tickcount", you meant the function tickcount()

Whereas the function GetTickCount() does work on linux (mainly)
Reply
#5

Seriously?
Can you please help me a little with it. Like, how would i code it?
Reply
#6

you would use GetTickCount in exactly the same way as tickcount()
Reply
#7

Ok wait
If i got this

Код:
dcmd_v(playerid, params[])
{
static Count[MAX_PLAYERS], Time_To_Wait = 30; //in s
if(Time_To_Wait > (tickcount() - Count[playerid]) / 1000) 
return SendClientMessage(playerid, COLOR_RED, "You need to wait a while till you can spawn a new vehicle");
Count[playerid] = tickcount();

return true;
}
What do i have to change? (im not really good at scripting yet.)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)