Pm cmd help
#1

Hello, i have this /pm command, it works perfectly but there is a problem.

It doesnt show the FULL pm message, i tried increasing string cells size but nothing.

pawn Код:
CMD:pm(playerid, params[])
{
    new str[300], str2[300], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
    new strr[300];
    if(sscanf(params, "us", id, str2))
    {
        SendClientMessage(playerid, -1, "{F70505}Usage: {FFFFFF}/pm <id> <message>");
        return 1;
    }
    new Year, Month, Day, Hour, Minute, Second;
    getdate(Year, Month, Day);
    gettime(Hour, Minute, Second);
    if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid,0xFF0000FF,"You are muted, you can't use this command.");
    if(PlayerInfo[id][pNopm] == 1) return SendClientMessage(playerid,0xFF0000FF,"This player has /nopm enabled, you can't send him a pm.");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player not connected");
    if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot pm yourself!");
    if(strlen(params) > 300) return SendClientMessage(playerid,0xFF0000FF, "Your message is too long, reduce it. (Max 128 characters)");
    if(GetPVarInt(playerid,"PmTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait before sending a pm again.");
    GetPlayerName(playerid, Name1, sizeof(Name1));
    GetPlayerName(id, Name2, sizeof(Name2));
    format(str, sizeof(str), "{F70505}PM SENT TO: {FFFFFF}%s (%d): %s", Name2, id, str2);
    SendClientMessage(playerid, -1, str);
    format(str, sizeof(str), "{F70505}PM FROM: {FFFFFF}%s (%d): %s", Name1, playerid, str2);
    SendClientMessage(id, -1, strr);
    new log[300];
    new am[300];
    format(log, sizeof(log), "PM from %s (%d) to %s (%d): %s - %02d/%02d/%d - %02d:%02d:%02d",Name1,playerid, Name2, id,str2,Day,Month,Year,Hour,Minute,Second);
    format(am, sizeof(am), "PM from %s (%d) to %s (%d): %s",Name1,playerid, Name2, id,str2);
    PmLog(log);
    SendMessageToAdmins(COLOR_YELLOW,am);
   
    new imsg[300];
    format(imsg, sizeof(imsg), "10*PM from %s (%d) to %s (%d): %s", Name1,playerid, Name2, id,str2);
    IRC_GroupSay(gGroupID, IRC_CHANNEL, imsg);
    IRC_GroupSay(gGroupID, IRC_ACHANNEL, imsg);
   
    SetPVarInt(playerid,"PmTime",GetTickCount()+5000);
    return 1;
}
Reply


Messages In This Thread
Pm cmd help - by Face9000 - 25.10.2012, 10:30
Re: Pm cmd help - by -=Dar[K]Lord=- - 25.10.2012, 10:36
Re: Pm cmd help - by Riddick94 - 25.10.2012, 10:38
Re: Pm cmd help - by -=Dar[K]Lord=- - 25.10.2012, 10:39
Re: Pm cmd help - by Lordzy - 25.10.2012, 10:44
Re: Pm cmd help - by Face9000 - 25.10.2012, 10:44
Re: Pm cmd help - by -=Dar[K]Lord=- - 25.10.2012, 10:44
Re: Pm cmd help - by niels44 - 25.10.2012, 10:45
Re: Pm cmd help - by Face9000 - 25.10.2012, 10:47

Forum Jump:


Users browsing this thread: 4 Guest(s)