PM command is bugged
#1

Hello, so i've got this code right here

pawn Код:
CMD:pm(playerid,params[])
{
    new PID,p_Send[24],p_Rec[24],str[128],str2[128],Message[100];
    GetPlayerName(PID,p_Rec,24);
    GetPlayerName(playerid,p_Send,24);
    switch (PM_Enabled[PID])
    {
        case 0: return SendClientMessage(playerid,COLOR_RED,"This player has disabled his pm");
        case 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.");
            format(str2,sizeof(str),"Pm To "#COL_GREEN"%s[%d]:%s",p_Rec,PID,Message);
            format(str,sizeof(str2),"Pm From "#COL_GREEN"%s[%d]:%s",p_Send,playerid,Message);
            SendClientMessage(playerid,COLOR_RED,str2);
            SendClientMessage(PID,COLOR_YELLOW,str);
        }
    }
    return 1;
}
And a pm on/off command , they work fine
the problem is , when a player pm's a player who used pmoff, he get's this "This player has disabled his pm "
but still the target id gets the message , how to stop the message from being sent then?
Reply


Messages In This Thread
PM command is bugged - by CoDeZ - 17.07.2012, 14:44
Re: PM command is bugged - by GSRP - 17.07.2012, 15:37
Re: PM command is bugged - by CoDeZ - 17.07.2012, 15:46
Re: PM command is bugged - by GSRP - 17.07.2012, 15:55
Re: PM command is bugged - by Dan. - 17.07.2012, 17:14
Re: PM command is bugged - by Steven82 - 17.07.2012, 17:16
Re: PM command is bugged - by Dan. - 17.07.2012, 17:17
Re: PM command is bugged - by Dan. - 17.07.2012, 17:22

Forum Jump:


Users browsing this thread: 1 Guest(s)