SA-MP Forums Archive
!settag. - 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)
+--- Thread: !settag. (/showthread.php?tid=557094)



!settag. - [HM]Nicky - 12.01.2015

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.


Re: !settag. - Ironboy - 12.01.2015

Quote:
Originally Posted by [HM]Nicky
View Post
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.
Didn't get what you're trying to say but if you're searching for a set name IRC cmd, here you go

pawn Code:
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");}



Re: !settag. - [HM]Nicky - 12.01.2015

i need when i do !settag on irc it change`s the .ini to [tag]nicky.