Quote:
Originally Posted by Emmet_
Timestamps.
pawn Код:
new g_FiredTime[MAX_PLAYERS];
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { if ((gettime() - g_FiredTime[playerid]) > 60) { // alert cops
g_FiredTime[playerid] = gettime(); } return 1; }
Make sure you clear the variable upon connection:
pawn Код:
public OnPlayerConnect(playerid) { g_FiredTime[playerid] = 0; }
This will only send the warning every 60 seconds a player is shooting. Change "60" to your time.
|
Thanks man! I was thinking of something like this but I've never made a timestamp :3
+rep