[REP+] Problem with CMD
#3

pawn Код:
CMD:pm(playerid,params[])
{
    new player, msg[128], finmsg[192];
    if(sscanf(params,"rs[128]", player, msg))
    {
        SendClientMessage(playerid, RED,"Usage: /pm [PlayerID/PartOfName] [Message]");
        return 1;
    }
    if(!IsPlayerConnected(player))
    {
        SendClientMessage(playerid, RED,"Invalid PlayerID or the PlayerID is not online");
        return 1;
    }
    if(player == playerid)
    {
        SendClientMessage(playerid, RED, "You can't PM yourself");
        return 1;
    }
    format(finmsg,sizeof(finmsg),"***[PM] from %s(%d): %s", GetName(playerid), playerid, msg);
    SendClientMessage(player, 0xFF7F50FF, finmsg);
    format(finmsg,sizeof(finmsg),">>>[PM] to %s(%d): %s", GetName(player), player, msg);
    SendClientMessage(playerid, 0xFF7F50FF, finmsg);
    return 1;
}
Reply


Messages In This Thread
[REP+] Problem with CMD - by virusa1 - 27.09.2012, 19:17
Re: [REP+] Problem with CMD - by ikbenremco - 27.09.2012, 19:26
Re: [REP+] Problem with CMD - by .v - 27.09.2012, 19:30
Re: [REP+] Problem with CMD - by virusa1 - 27.09.2012, 19:32
Re: [REP+] Problem with CMD - by virusa1 - 27.09.2012, 19:34
Re: [REP+] Problem with CMD - by virusa1 - 27.09.2012, 19:41
Re: [REP+] Problem with CMD - by ikbenremco - 27.09.2012, 19:49
Re: [REP+] Problem with CMD - by virusa1 - 27.09.2012, 19:56
Re: [REP+] Problem with CMD - by ikbenremco - 28.09.2012, 15:51
Re: [REP+] Problem with CMD - by virusa1 - 28.09.2012, 19:02

Forum Jump:


Users browsing this thread: 1 Guest(s)