21.12.2013, 16:22
get a timestamp for each player who spawns,
like this:
global var for players:
sktime[MAX_PLAYERS]=0;
in onplayerspawn:
sktime[playerid] = gettime();
now in onplayertakedamage:
if(gettime() - sktime[playerid] < 60) return // 60 = 1 min. Here do something to the issuerid
that'd be 1 min anti spawnkill in this example
btw. this method using gettime will only work until January 19, 2038
like this:
global var for players:
sktime[MAX_PLAYERS]=0;
in onplayerspawn:
sktime[playerid] = gettime();
now in onplayertakedamage:
if(gettime() - sktime[playerid] < 60) return // 60 = 1 min. Here do something to the issuerid
that'd be 1 min anti spawnkill in this example
btw. this method using gettime will only work until January 19, 2038