need how to make command join
#5

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;
    }
Reply


Messages In This Thread
need how to make command join - by OmarEco - 08.07.2010, 09:54
Re: need how to make command join - by OmarEco - 08.07.2010, 10:38
Re: need how to make command join - by OmarEco - 08.07.2010, 10:39
Re: need how to make command join - by Hiddos - 08.07.2010, 10:51
Re: need how to make command join - by O_x - 08.07.2010, 11:27

Forum Jump:


Users browsing this thread: 1 Guest(s)