16.02.2017, 14:23
a timer as in timer like?
That's unethical in a way because you could just trigger a function on OnPlayerDeath that checks the achievements.
just like what X337 said
simplifying it would need to use switch-case
PHP код:
task twosecondtimer[2000]()
{
//all your functions here.
}
just like what X337 said
Quote:
You don't need to use timer for that, if a player is killed it will trigger OnPlayerDeath callback.
|
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
CheckPlayerKills(killerid); //but you'll still need codes inside this to make it work. No way around it
return 1;
}