SA-MP Forums Archive
Help Here Please. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help Here Please. (/showthread.php?tid=240448)



Help Here Please. - Alex_Obando - 15.03.2011

pawn Код:
irccmd_jail(conn, channel[], user[], params[])
{
    if(!ircIsOp(conn,channel,user)) return IrcSay(""IRC_AUTH_MSG"");

        new
                ID = strval(params),tString[128],
                Reason[285],PlayerName[24];

        if(sscanf(params, "dz", ID, Reason))
        return IrcSay ("USAGE: !jail [Playerid] [Reason]");
        GetPlayerName(ID,PlayerName, sizeof PlayerName);
        if(GetPVarInt(ID, "jailed") == 0)
        {

            GetPlayerName(ID, PlayerName, sizeof PlayerName);
            if(strlen(Reason) == 0)
            {
                format(Reason, sizeof Reason, "%s Sent %s to jail.",user,PlayerName,Reason);
            }
            else
            {
                format(Reason, sizeof Reason, "%s Sent %s to jail for %s",user,PlayerName,Reason);
            }

            IrcSay(Reason);
            SendClientMessageToAll(0xff0000ff,Reason);


        printf("[IRC] Admin %s from IRC jailed %s for %s",user,PlayerName,Reason);

        SetPVarInt(ID, "jailed", 1); //jailed
            for(new i = 0; i < MAX_PLAYERS; i++)
            SetPlayerPos(i, 197.7029,174.8801,1003.0234);
            for(new i = 0; i < MAX_PLAYERS; i++)
            SetPlayerInterior(i, 3);
            return 1;

    } else {
        IrcSay("Player is already in jail");
    }
    return 1;
}
Ok, This works perfectly but what I need is that when the admin jail you then send the msg to the Jailed.
"%s Sent %s to jail for %s" user,playername,reason)"


Re: Help Here Please. - Steven82 - 15.03.2011

Use the SendClientMessage function.


Respuesta: Help Here Please. - Alex_Obando - 15.03.2011

I can't use it because Its IRC.


Re: Help Here Please. - airsoft - 16.03.2011

Yes you can, you can use sendclientmessage with irc... it shows up ingame lol