Set rcon cmd
#1

hello guys i have this cmd which set player as a rcon but the only thing am missing is the function that sets the player with the id as a rcon
pawn Код:
CMD:setrcon(playerid,params[])
{
    if(PlayerInfo[playerid][LoggedIn] == 1)
    {
        if(IsPlayerAdmin(playerid))
        {
            new tmp[128], tmp2[128], Index;     tmp = strtok(params,Index), tmp2 = strtok(params,Index);
            if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /setrcon [playerid]");
            new player1, level, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
            player1 = strval(tmp);
            if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
            {
                if(PlayerInfo[player1][LoggedIn] == 1)
                {
                    return PlayerPlaySound(player1,1057,0.0,0.0,0.0);
                }
                else return SendClientMessage(playerid,red,"ERROR: Player must be registered and logged in to be admin");
            }
            else return SendClientMessage(playerid, red, "Player is not connected");
        }
        else return ShowPlayerDialog(playerid, 90321, DIALOG_STYLE_MSGBOX, "{FF0000}SFTDM - ERROR MSG", RconMSG,"OK","");
    }
    else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}
thanks inadvance!
Reply
#2

Well, you can login as rcon if you have the rcon password.
So you can do something like that: SendClientMessage(player1,0xFFFFFF,"The rcon password is: RCON_PASSWORD");
Reply
#3

Quote:
Originally Posted by SoLetsGO
Посмотреть сообщение
Well, you can login as rcon if you have the rcon password.
So you can do something like that: SendClientMessage(player1,0xFFFFFF,"The rcon password is: RCON_PASSWORD");
bro, i am asking for a function not for a clientmessage thanks btw, no need for these type of replys
Reply
#4

Quote:
Originally Posted by KillerStrike23
Посмотреть сообщение
bro, i am asking for a function not for a clientmessage thanks btw, no need for these type of replys
Well, there is no way to put a player to rcon admin if he hasn't got the password. So you won't get any other replies since it's not possible.
If you want to make someone an admin, then you should rather use a proper admin system.
Reply
#5

Quote:
Originally Posted by SoLetsGO
Посмотреть сообщение
Well, there is no way to put a player to rcon admin if he hasn't got the password. So you won't get any other replies since it's not possible.
If you want to make someone an admin, then you should rather use a proper admin system.
That is wrong!

This plugin allowes you to: https://sampforum.blast.hk/showthread.php?tid=513499
Reply
#6

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
That is wrong!

This plugin allowes you to: https://sampforum.blast.hk/showthread.php?tid=513499
Nice one, didn't know about it.
Reply
#7

thanks that i was looking for repped
Reply
#8

now guys i need the function of setplayeradmin can anyone give it to me please ?
Reply
#9

You could read the got damn functions list you know?

For the future, search foryourself

native SetPlayerAdmin(playerid, bool:admin); // Set player as RCON admin
Reply
#10

In the documentation you see: native SetPlayerAdmin(playerid, bool:admin);
So just use SetPlayerAdmin(player1,true);
And seriously, use sscanf.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)