12.01.2015, 18:23
anyone has a idea how to make !settag so from nicky to [tag]Nicky need it as irc cmd, and useable then player is offline im using the ppc_trucking GM.
anyone has a idea how to make !settag so from nicky to [tag]Nicky need it as irc cmd, and useable then player is offline im using the ppc_trucking GM.
|
IRCCMD:settag(botid, channel[], user[], host[], params[]) {
if(IRC_IsOp(botid, channel, user)) {
new tmp[128], tmp2[128], playerid, Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(isnull(tmp) || isnull(tmp2)) return IRC_GroupSay(gGroupID,IRC_CHANNEL, "12USAGE: /settag [playerid] [new name]");
new player1 = strval(tmp), length = strlen(tmp2), string[128];
if(length < 3 || length > MAX_PLAYER_NAME) return IRC_GroupSay(gGroupID,IRC_CHANNEL, "4ERROR: Incorrect Name Length");
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
format(string, sizeof(string), "12* You have set \"%s's\" name to \"%s\" ", pName(player1), tmp2);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
SetPlayerHealth(player1, 100);
SetPlayerName(player1, tmp2);
return OnPlayerConnect(player1);
} else return IRC_GroupSay(gGroupID,IRC_CHANNEL, "4ERROR: Player is not connected");
} else return IRC_GroupSay(gGroupID,IRC_CHANNEL, "4ERROR: You must have OP to use this command");}