Simple /admins
#1

So all I want to do is put a admin status next to their name on /admins

So at the moment its like this: When a player times /admins it shows them: Name: Jack_Digworthy Level: 6

But I wish to have it like: Name: Jack_Digworthy Level:6 ( Available )

I want a command like /as which stands for admin status and then: /as Available or /as Busy so they can change the ( Available ) thing - + REP for anyone who helps
Reply
#2

Please share your viariables you defined. For Example PlayerData[playerid][AdminLevel] etc so we can make the command for you.
Reply
#3

I will write down some basics:
Firstly create the new variables for admins' availability, e.g:
pawn Код:
PlayerInfo[playerid][Available];
Secondly create the command for admins, e.g: /as ,
pawn Код:
CMD:as(playerid, params[]);
{
     if(PlayerInfo[playerid][Available] == 1)
     {
          PlayerInfo[playerid][Available] = 0;
          SendClientMessage(playerid, 0xFF0000FF, "You are now unavailable!");
     }
     else
     {
          PlayerInfo[playerid][Available] = 1;
          SendClientMessage(playerid, 0x00FF00FF, "You are now available!");
     }
     return 1;
}
Third use the variable in your /admins command, e.g:
pawn Код:
new status[30], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name));
if(PlayerInfo[playerid][Available] == 1) status = "{00FF00}Available";
else status = "{FF0000}Unavailable";
format(string, sizeof(string), "%s - Level %d (%s)", name, PlayerInfo[playerid][Level], status);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)