Simple /admins - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Simple /admins (
/showthread.php?tid=458266)
Simple /admins -
McBan - 15.08.2013
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
Re: Simple /admins -
Alexis1999 - 15.08.2013
Please share your viariables you defined. For Example PlayerData[playerid][AdminLevel] etc so we can make the command for you.
Re: Simple /admins -
Dragonsaurus - 15.08.2013
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);