08.07.2010, 11:27
It's easy,you just need to use a loop to see if there's any admin online,since I don't know what admin system you use I'll just make one with RCON.
pawn Код:
if(!strcmp(cmdtext,"/want",true))
{
new name[MAX_PLAYER_NAME],String[128]; GetPlayerName(playerid,name,MAX_PLAYER_NAME);
if(IsPlayerAdmin(playerid)) {return SendClientMessage(playerid,COLOR,"You are already an admin!");}// Checks if the player is already RCON admin
else for(new a = 0; a < MAX_PLAYERS; a++) // Loop
{
if(IsPlayerAdmin(a) && IsPlayerConnected(a))// Checking if there's any admin connected online
{
format(String,sizeof(String),"%s(ID: %d) wants to be an admin!",name,playerid);
SendClientMessage(a,COLOR,String); //Sending the message to the admins that are online
SendClientMessage(playerid,COLOR,"Your request have been sent."); //Telling the player
}
}
return 1;
}