04.02.2018, 16:48
You have to check the time difference between the player messages. Before performing your code.
You can do that by using gettime(); statement.
For example whenever player send message to chat, store the time in some variable like, time[playerid] = gettime();
and when the player sends the message again, run a code where you check the time difference between his/her messages using
new time_new = time[playerid] - gettime();
time_new will store the time difference between the player last message, could be 2 or 3.
Like,
You can do that by using gettime(); statement.
For example whenever player send message to chat, store the time in some variable like, time[playerid] = gettime();
and when the player sends the message again, run a code where you check the time difference between his/her messages using
new time_new = time[playerid] - gettime();
time_new will store the time difference between the player last message, could be 2 or 3.
Like,
PHP Code:
if(time_new == 2) // Means the difference between the player messages is 2 seconds. Means he has sent the message 2 seconds later from his the last message he sent.
{
// Your Code.
}