SA-MP Forums Archive
need how to make command join - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: need how to make command join (/showthread.php?tid=157948)



need how to make command join - OmarEco - 08.07.2010

in gamemode how i make command like normal player not admin type command and admins see message i write it with player name and id how ??/


Re: need how to make command join - OmarEco - 08.07.2010

i do that
Код:
if(!strcmp(cmdtext,"/want",true))
        {
       SendClientMessage(playerid,0xE100E1FF,"|Your Order Send to admins|");
       format(string, sizeof(string), "%s\"(id: %d) Want to be an admin",name,playerid);
       SendClinetMessageToAdmins(COLOR_GREY,string);print(string);

		}
	return 1;
        }



Re: need how to make command join - OmarEco - 08.07.2010

pawn Код:
help me help me



Re: need how to make command join - Hiddos - 08.07.2010

How 'bout stop spamming the board. YOu already made another topic with exactly the same question/code


Re: need how to make command join - O_x - 08.07.2010

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