Spamming
#1

I have this function:

pawn Код:
IsPlayerSpamming(playerid)
{
    if((tickcount() - Time[playerid])  > 1800) {
        Time[playerid] = tickcount();
        return 1;
    } else return 0;
}
Works perfectly fine on localhost but when i run the gamemode on my vps thats been up for a while (a few days) it says that I'm always spamming.
Reply
#2

https://sampwiki.blast.hk/wiki/GetTickCount
Reply
#3

You have to use gettime()
Reply
#4

try this

Код:
IsPlayerSpamming(playerid)
{
    if(gettime() + Time[playerid])  > 1800)
    {
        Time[playerid] = gettime(); 
        return 1;
    } 
    else return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)