SA-MP Forums Archive
Only RCON - 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: Only RCON (/showthread.php?tid=425078)



Only RCON - raamiix - 24.03.2013

Did try to make this 2 command only rcon but failed can someone make that for me?

/gmx
Код:
CMD:gmx(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 99999) {
        SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
        return 1;
    }

    SetTimer( "Maintenance", 50000, false );
    SendClientMessageToAll(COLOR_LIGHTBLUE, "* The Server Will Be Going For Server Maintenance In 50Seconds.");
    foreach(Player, i) {
        GameTextForPlayer(i, "~y~Scheduled Maintenance 50Seconds", 5000, 3);
    }
    return 1;
}
/restart
Код:
CMD:restart(playerid, params[])
{
 	if(IsPlayerConnected(playerid)) {
  if(PlayerInfo[playerid][pAdmin] >= 1337) {
	restarting = 1;
			GameModeInitExitFunc();
		} else {
			SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
		}
	}
	return 1;
}



Re: Only RCON - Rock - 24.03.2013

pawn Код:
SendRconCommand( "gmx" );
gmx = restart
It's the same thing, no need for 2 different commands.


Re: Only RCON - vitorvlv - 24.03.2013

just add
pawn Код:
SendRconCommand("gmx");
https://sampwiki.blast.hk/wiki/Advanced_Server_Controls


Re: Only RCON - FunnyBear - 24.03.2013

pawn Код:
CMD:restart(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1337)
        return SendClientMessage(playerid, -1, "You are not an admin!");
       
    SendRconCommand( "gmx" );

    return 1;
}



Re: Only RCON - raamiix - 24.03.2013

Quote:
Originally Posted by FunnyBear
Посмотреть сообщение
pawn Код:
CMD:restart(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1337)
        return SendClientMessage(playerid, -1, "You are not an admin!");
       
    SendRconCommand( "gmx" );

    return 1;
}
Dindnt work


Re: Only RCON - [..MonTaNa..] - 24.03.2013

Add this:

Код:
	if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You must be logged into RCON to use this command.");



Re: Only RCON - Nivniv2 - 25.03.2013

Код:
CMD:gmx(playerid, params[])
{
    	if(IsPlayerAdmin(playerid)) {
        SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
        return 1;
    }

    SetTimer( "Maintenance", 50000, false );
    SendClientMessageToAll(COLOR_LIGHTBLUE, "* The Server Will Be Going For Server Maintenance In 50Seconds.");
    foreach(Player, i) {
        GameTextForPlayer(i, "~y~Scheduled Maintenance 50Seconds", 5000, 3);
    }
    return 1;
}
Код:
CMD:restart(playerid, params[])
{
 	if(IsPlayerConnected(playerid)) {
	if(IsPlayerAdmin(playerid)) {
	restarting = 1;
			GameModeInitExitFunc();
		} else {
			SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
		}
	}
	return 1;
}