SA-MP Forums Archive
Rcon Command - 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: Rcon Command (/showthread.php?tid=143824)



Rcon Command - Mechscape - 24.04.2010

How do make rcon command?

Example /rcon systemupdate

/systemupdate

Код:
if(strcmp("/systemupdate", cmdtext, true, 10) == 0)
	{
		if(IsPlayerAdmin(playerid))
		{
		  TimeM = 1;
			TimeS = 0;
			Time = SetTimer("UpdateTime", 1000, true);
			TextDrawShowForAll(Systemupdate);
		  TextDrawShowForAll(Taimer);
		  Sys = true;
 			return 1;
		}
	}



Re: Rcon Command - Butilka - 24.04.2010

Put the command to the public OnRconCommand.


Re: Rcon Command - Mechscape - 24.04.2010

pawn Код:
public OnRconCommand(cmd[])
{
    if(strcmp("systemupdate", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid))
        {
            TimeM = 1;
            TimeS = 0;
            Time = SetTimer("UpdateTime", 1000, true);
            TextDrawShowForAll(Systemupdate);
            TextDrawShowForAll(Taimer);
            Sys = true;
            return 1;
        }
    }
    return 1;
}
Then?


Re: Rcon Command - aircombat - 24.04.2010

u can't make a rcon command cause when u type /rcon "thing" the thing go to the console (black window *samp-server.exe* so the console ain't same as pawn


Re: Rcon Command - Mechscape - 24.04.2010

Quote:
Originally Posted by Etch ❽ H
u can't make a rcon command cause when u type /rcon "thing" the thing go to the console (black window *samp-server.exe* so the console ain't same as pawn
Yes i want make console command, will work?


Re: Rcon Command - DeathOnaStick - 24.04.2010

Well, i did it and it worked.


Re: Rcon Command - Mechscape - 24.04.2010

Quote:
Originally Posted by DeathOnaStick
Well, i did it and it worked.
Код:
public OnRconCommand(cmd[])
{
	if(strcmp("systemupdate", cmdtext, true, 10) == 0)
	{
		if(IsPlayerAdmin(playerid))
		{
			TimeM = 1;
			TimeS = 0;
			Time = SetTimer("UpdateTime", 1000, true);
			TextDrawShowForAll(Systemupdate);
			TextDrawShowForAll(Taimer);
			Sys = true;
 			return 1;
		}
	}
	return 1;
}
that?


Re: Rcon Command - Correlli - 24.04.2010

http://forum.sa-mp.com/index.php?topic=113647.0


Re: Rcon Command - MadeMan - 24.04.2010

pawn Код:
public OnRconCommand(cmd[])
{
    if(strcmp("systemupdate", cmd, true) == 0)
    {
        TimeM = 1;
        TimeS = 0;
        Time = SetTimer("UpdateTime", 1000, true);
        TextDrawShowForAll(Systemupdate);
        TextDrawShowForAll(Taimer);
        Sys = true;
        return 1;
    }
    return 1;
}