PM Command
#1

pawn Код:
CMD:pm(playerid,params[])
{
    new PID,p_Send[24],p_Rec[24],str[128],str2[128],Message[100];
    if(PM_Enabled[playerid]==0) return SendClientMessage(playerid,COLOR_RED,"This player has disabled his pm");
    else if(PM_Enabled[playerid]==1)
    {
        if(sscanf(params,"us[100]",PID,Message)) return SendClientMessage(playerid,COLOR_GREEN,"USAGE:/pm playerid message");
        if(isnull(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/pm playerid message");
        if(PID==playerid) return SendClientMessage(playerid,COLOR_RED,"You can't pm your self.");
        if(!IsPlayerConnected(PID)) return SendClientMessage(playerid,COLOR_RED,"This player is not connected.");
        GetPlayerName(PID,p_Rec,24);
        format(str2,sizeof(str),"Pm To "#COL_GREEN"%s[%d]:%s",p_Rec,PID,Message);
        SendClientMessage(playerid,COLOR_RED,str);
        GetPlayerName(playerid,p_Send,24);
        format(str,sizeof(str2),"Pm From "#COL_GREEN"%s[%d]:%s",p_Send,playerid,Message);
        SendClientMessage(PID,COLOR_YELLOW,str2);
    }
    return 1;
}
When i use /pmoff , it still send the message :/
WAI?!
Reply


Messages In This Thread
PM Command - by CoDeZ - 12.07.2012, 12:50
Re: PM Command - by Captain_Mani - 12.07.2012, 13:13
Re: PM Command - by CoDeZ - 12.07.2012, 13:16
Re: PM Command - by clarencecuzz - 12.07.2012, 13:22
Re: PM Command - by CoDeZ - 12.07.2012, 13:27
Re: PM Command - by clarencecuzz - 12.07.2012, 13:28

Forum Jump:


Users browsing this thread: 1 Guest(s)