Need Help with Pm command..:-/
#5

pawn Код:
CMD:pm(playerid, params[])
{
    new string[128], message[128], id;
    if(sscanf(params, "uz", id, message))
    {
        SendClientMessage(playerid, -1, "SYNTAX: /pm [playerid] [message]");
    }
    else
    {
        if(IsPlayerConnected(id))
        {
            if(strlen(message) >= 1)
            {
                format(string, sizeof(string), "((PM to %s(ID: %d): %s)) ", GetName(id), id, message);
                SendClientMessage(playerid, 0xFFFF00FF, string);
                format(string, sizeof(string), "((PM from %s(ID: %d): %s)) ", GetName(playerid), playerid, message);
                SendClientMessage(id, 0xFFFF00FF, string);
            }
            else
            {
                SendClientMessage(playerid, -1, "SYNTAX: /pm [playerid] [message]");
            }
            else
            {
                SendClientMessage(playerid, -1, "That player is not connected.");
            }
    }
    return 1;
}
Reply


Messages In This Thread
Need Help with Pm command..:-/ - by Desi_Dude - 26.09.2012, 11:39
Re: Need Help with Pm command..:-/ - by Jarnu - 26.09.2012, 12:00
Re: Need Help with Pm command..:-/ - by Glint - 26.09.2012, 12:06
Re: Need Help with Pm command..:-/ - by Desi_Dude - 26.09.2012, 13:03
Re: Need Help with Pm command..:-/ - by Cxnnor - 26.09.2012, 13:07
Re: Need Help with Pm command..:-/ - by Jarnu - 26.09.2012, 13:19
Re: Need Help with Pm command..:-/ - by Desi_Dude - 12.10.2012, 12:41

Forum Jump:


Users browsing this thread: 1 Guest(s)