Quote:
Originally Posted by karemmahmed22
It can be done with GetTickCount, And variable.
Heres an example
PHP код:
new TickCount[MAX_PLAYERS];
//OnPlayerConnect :-
TickCount[playerid] = 0;
//OnPlayerSuspectedForAirbreak or w/e the callback is :D
if(TickCount[playerid] < GetTickCount();)
{
TickCount[playerid] = GetTickCount() + 120000; // Some time
//Warn Here.
return 1;
}
else if(TickCount[playerid] > GetTickCount()) return 1; //no warnings.
Its will warn every few mins if player still airbreaking, it wont spam the chat
P.S.:I didn't test it so, you can test me and tell me if theres something wrong.
|
Thanks for info, I repped you all for helping me but I have some errors, the problem is that it can't get tickcount I think have a look here
Код:
.pwn(707) : error 001: expected token: ")", but found ";"
.pwn(707) : error 036: empty statement
.pwn(707) : error 029: invalid expression, assumed zero
.pwn(707) : fatal error 107: too many error messages on one line
Error line is
Код:
if(TickCount[playerid] < GetTickCount();)
- EDIT -
Код:
if(TickCount[playerid] < GetTickCount())
You putted a ; that is was not needed, its working thanks for all guys