31.12.2018, 23:36
Hello everyone, I really want to do something like this:
I'm really wondering how can I make timer that kills when player disconnect in this case?
I know that i can create some custom function where i can make enum and than for each started player timer i give a some ++ increment for createdtimers and then just kill all through loop through enum, but that is not so efficient bcuz i cannot know if it is player timer, even if i do sth like flag, i need your opinion
Code:
public OnPlayerConnect(playerid) { SetTimerEx(funcname[], 650, true:flag, "d", playerid); //Example: SetTimerEx(funcname[], 650, true:AUTO_KILL_ON_PLAYER_DISCONNECT, "d", playerid); return 1; }
I know that i can create some custom function where i can make enum and than for each started player timer i give a some ++ increment for createdtimers and then just kill all through loop through enum, but that is not so efficient bcuz i cannot know if it is player timer, even if i do sth like flag, i need your opinion