SA-MP Forums Archive
Set rcon cmd - 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: Set rcon cmd (/showthread.php?tid=625268)



Set rcon cmd - KillerStrike23 - 30.12.2016

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!


Re: Set rcon cmd - SoLetsGO - 30.12.2016

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");


Re: Set rcon cmd - KillerStrike23 - 30.12.2016

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


Re: Set rcon cmd - SoLetsGO - 30.12.2016

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.


Re: Set rcon cmd - BiosMarcel - 30.12.2016

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


Re: Set rcon cmd - SoLetsGO - 30.12.2016

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.


Re: Set rcon cmd - KillerStrike23 - 30.12.2016

thanks that i was looking for repped


Re: Set rcon cmd - KillerStrike23 - 30.12.2016

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


Re: Set rcon cmd - BiosMarcel - 30.12.2016

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


Re: Set rcon cmd - SoLetsGO - 30.12.2016

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