AFK system
#4

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
PHP код:
public OnPlayerPause(playerid

    foreach(new 
Player
    { 
        new 
iAFK[75]; 
        
format(iAFKsizeof(iAFK), "%s(%d) [Paused: %s secs]"ReturnPlayerName(i), inumber_format(playerData[i][pAFK])); 
        
SetPlayerChatBubble(iiAFKCOLOR_SERVER50.010000); 
          
CountAFK(i); 
    } 
    return 
1

But... Why?

If a player pauses, you loop through every other player and set their bubble for being AFK? How's that make sense to you?
I reviewed the whole code and made it a better way.

Quote:
Originally Posted by Gammix
Посмотреть сообщение
You need do this part in your CountAFK timer:
PHP код:
new iAFK[75];  
format(iAFKsizeof(iAFK), "%s(%d) [Paused: %s secs]"ReturnPlayerName(i), inumber_format(playerData[i][pAFK]));  
SetPlayerChatBubble(iiAFKCOLOR_SERVER50.010000); 
And remove the loop, you just need to declare a timer using SetTimerEx inside OnPlayerPause.
Yes thats exactly what i did , i just forgot to update this thread.
Reply


Messages In This Thread
AFK system - by 1fret - 25.03.2018, 03:43
Re: AFK system - by Kane - 25.03.2018, 04:24
Re: AFK system - by Gammix - 25.03.2018, 04:45
Re: AFK system - by 1fret - 25.03.2018, 06:22

Forum Jump:


Users browsing this thread: 1 Guest(s)