#1

I'm creating my PM system but i'm stuck in /r
I always stuck in

Код:
*** You do not receive any PM ***
here is how i do it

pawn Код:
CMD:pm(playerid, params[])
{
    new id, msg[128], str[128];
    if(pData[playerid][Login] == 0) return SendClientMessage(playerid, COLOR_RED, "*** Please login first! ***");
    if(sscanf(params, "us[128]", id, msg)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /pm [playerid] [msg]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "*** Player not connected ***");
    if(pData[id][NoPM] == 1) return SendClientMessage(playerid, COLOR_RED, "*** This player has disable his PM Recieving System! ***");
    PlayerPlaySound(id, 1085, 0.0, 0.0, 0.0);
    format(str, sizeof(str), "PM to %s(%d): %s", GetpName(id), id, msg);
    SendClientMessage(playerid, COLOR_YELLOW, str);
    SetPVarInt(id, "LastPM", playerid);
    format(str, sizeof(str), "PM from %s(%d): %s", GetpName(playerid), playerid, msg);
    SendClientMessage(id, COLOR_YELLOW, str);
    SendClientMessage(id, COLOR_YELLOW, "*** Use /r to reply in PM ***");
    return 1;
}

CMD:r(playerid, params[])
{
    new str[128], id;
    if(GetPVarInt(playerid, "LastPM"))
    {
        if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /r [msg]");
        PlayerPlaySound(id, 1085, 0.0, 0.0, 0.0);
        format(str, sizeof(str), "Reply PM to %s(%d): %s", GetpName(id), id, params);
        SendClientMessage(playerid, COLOR_YELLOW, str);
        format(str, sizeof(str), "%s(%d) has reply your PM: %s", GetpName(playerid), playerid, params);
        SendClientMessage(id, COLOR_YELLOW, str);
        SendClientMessage(id, COLOR_YELLOW, "*** Use /r to reply in PM ***");
    }
    else return SendClientMessage(playerid, COLOR_RED, "*** You don't have receive any PM! ***");
    return 1;
}
Reply


Messages In This Thread
/r - by JaKe Elite - 12.05.2012, 07:33
Re: /r - by [ABK]Antonio - 12.05.2012, 07:39
Re: /r - by JaKe Elite - 12.05.2012, 08:02
Re: /r - by [ABK]Antonio - 12.05.2012, 08:27
Re: /r - by JaKe Elite - 12.05.2012, 08:38
Re: /r - by [ABK]Antonio - 12.05.2012, 08:40
Re: /r - by JaKe Elite - 28.05.2012, 07:30
Re: /r - by ReneG - 28.05.2012, 07:48

Forum Jump:


Users browsing this thread: 1 Guest(s)