Offline CMD...
#1

Can you send a command from offline....

"say i have /heal [playerid]"

is there a way to send that cmd from offline
Reply
#2

hmm you can i only know the irc plugin import it then script this:

something like that you mean?

Код:
IRCCMD:heal(botid, channel[], user[], host[], params[])
{
	// Check if the user is at least a halfop in the channel
	if (IRC_IsOp(botid, channel, user))
	{
	    new Index;
	    new tmp[256];  tmp  = strtok(params,Index);
	    new tmp2[256]; tmp2 = strtok(params,Index);
		// Check if the user at least entered a player ID
    	if(!strlen(tmp) || !strlen(tmp2) || !IsNumeric(tmp2))
    	{
			return IRC_GroupSay(groupID, channel,"usage: !heal [id] [ammout]");
		}
		new playerid = strval(tmp);
		new amount = strval(tmp2);
		new str[128];
	    new playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playername, sizeof(playername));
        if(IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID)
		{
            if(amount < 0 || amount > 100) return IRC_GroupSay(groupID, channel,"Error: health ammount must be greater than -1 and less that 101");
			format(str, sizeof(str), "IRC %s Setted health of %s to %d",user,playername, amount);
            SendClientMessageToAll(COLOR_RED, str);
			IRC_GroupSay(groupID, channel, str);
			}
		}
		else return IRC_GroupSay(groupID, channel,"Server: Player not found");
	}
	return 1;
}
Reply
#3

Won't i need a IRC host......is it possible to set this up locally :/ cause i don't wanna have to get irc host.....
Reply
#4

Two good methods:

1) making socket server isn't a bad idea.
2) creating custom RCON command with OnRconCommand(cmd[]) and you can use any RCON tool to execute it like !heal [id]
Reply
#5

Thank You lolz Skipped my head....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)