Pause system for /admins
#1

So I'm trying to figure out how to make a pause system for admins. I would like it to say tabbed in /admins when you're actually tabbed

This is what I've got so far:

Код:
CMD:admins(playerid)
{
    new bool:flag, str[128];
    
    SendClientMessage(playerid, COLOR_AQUA, "Administrators online:");
    foreach(new i:Player)
    {
        if(PlayerInfo[i][pAdmin] > 0)
        {
            flag = true;
             
            if(PlayerPaused[i] == 1)
                format(str, sizeof(str), "{00ff6b}[Paused]{FFFFFF} %s: %s", ReturnAdminLevel(i), ReturnName(i));
    
            else if(PlayerInfo[i][pAdminDuty] == 1)
                format(str, sizeof(str), "{00ff6b}[Available]{FFFFFF} %s: %s", ReturnAdminLevel(i), ReturnName(i));

            else
                format(str, sizeof(str), "{FF0000}[Unavailable]{FFFFFF} %s: %s", ReturnAdminLevel(i), ReturnName(i));
                SendClientMessage(playerid, -1, str);
        }
    }

    if(!flag)
        SendClientMessage(playerid, -1, "There are no admins available currently.");
    
    return 1;
}
The part where the pause is included doesn't work, p much fucks up the entire tab system

Need guidance
Reply
#2

That's a very badass code WHO WROTE THAT?
Jk, with all seriousness, here's a little include i created that helps you with everything related to players tabbing out of the game c:

https://gist.github.com/RogueDrifter...1b9d5739b8409e

pawn Код:
//Functions:
//__________
IsPlayerPaused(playerid);
IsPlayerAFK(playerid);
//Callbacks:
//__________
OnPlayerPause(playerid);
OnPlayerResume(playerid);
OnPlayerAFK(playerid);
OnPlayerReturn(playerid);
Tabbing out is the 'pause' and 'resume', the 'afk' ones are when someone doesn't move for too long hence they become afk
Reply
#3

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
That's a very badass code WHO WROTE THAT?
Jk, with all seriousness, here's a little include i created that helps you with everything related to players tabbing out of the game c:

https://gist.github.com/RogueDrifter...1b9d5739b8409e

pawn Код:
//Functions:
//__________
IsPlayerPaused(playerid);
IsPlayerAFK(playerid);
//Callbacks:
//__________
OnPlayerPause(playerid);
OnPlayerResume(playerid);
OnPlayerAFK(playerid);
OnPlayerReturn(playerid);
Tabbing out is the 'pause' and 'resume', the 'afk' ones are when someone doesn't move for too long hence they become afk
I put
Код:
#include <rAfk_Checker>
and the file with the rest of the .inc files, yet the output displayed:
Код:
C:\Users\captv\Desktop\main\gamemodes\developer.pwn(9) : fatal error 100: cannot read from file: "rAfk_Checker"
Reply
#4

Are you sure you named the file rAfk_Checker
Reply
#5

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
Are you sure you named the file rAfk_Checker
I did yeah
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)