Offline CMD...
#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


Messages In This Thread
Offline CMD... - by Glad2BeHere - 04.06.2013, 17:55
Re: Offline CMD... - by AoWDarkAge - 04.06.2013, 18:08
Re: Offline CMD... - by Glad2BeHere - 04.06.2013, 18:25
Re: Offline CMD... - by Kirollos - 04.06.2013, 19:09
Re: Offline CMD... - by Glad2BeHere - 04.06.2013, 22:05

Forum Jump:


Users browsing this thread: 2 Guest(s)