PM command is bugged
#2

Here is your fix:
pawn Код:
CMD:pm(playerid, params[])
{
    new sname[MAX_PLAYER_NAME], RID, rname[MAX_PLAYER_NAME], string[128], message[128];
    GetPlayerName(playerid, sname, sizeof(sname));
    GetPlayerName(RID, rname, sizeof(rname));
    if(sscanf(params, "us[128]", RID, message)) return SendClientMessage(playerid, COLOR_GREEN, "USAGE: /pm [playerid] [message]");
    if(PM_Enabled[RID] == 0) return SendClientMessage(playerid, COLOR_RED, "This player has disabled his PM's.");
    if(IsPlayerConnected(RID))
    {
        format(string, sizeof(string), "[PM from %s]: %s", sname, message);
        SendClientMessage(RID, COLOR_YELLOW, string);
        format(string, sizeof(string), "[PM to %s]: %s", rname, message);
        SendClientMessage(playerid, COLOR_RED, string);
    }
    else
    {
        SendClientMessage(playerid, -1, "Invalid player specified.");
        return 1;
    }
    return 1;
}
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)