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


Messages In This Thread
Set rcon cmd - by KillerStrike23 - 30.12.2016, 16:40
Re: Set rcon cmd - by SoLetsGO - 30.12.2016, 16:43
Re: Set rcon cmd - by KillerStrike23 - 30.12.2016, 16:44
Re: Set rcon cmd - by SoLetsGO - 30.12.2016, 16:49
Re: Set rcon cmd - by BiosMarcel - 30.12.2016, 16:51
Re: Set rcon cmd - by SoLetsGO - 30.12.2016, 16:54
Re: Set rcon cmd - by KillerStrike23 - 30.12.2016, 16:58
Re: Set rcon cmd - by KillerStrike23 - 30.12.2016, 19:46
Re: Set rcon cmd - by BiosMarcel - 30.12.2016, 19:55
Re: Set rcon cmd - by SoLetsGO - 30.12.2016, 19:56

Forum Jump:


Users browsing this thread: 1 Guest(s)