Rcon Command
#1

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;
		}
	}
Reply
#2

Put the command to the public OnRconCommand.
Reply
#3

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?
Reply
#4

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
Reply
#5

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?
Reply
#6

Well, i did it and it worked.
Reply
#7

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?
Reply
#8

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

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)