/pm command
#6

Add this on Top Of Your Gamemode..
pawn Код:
#define DIALOG_TYPE_PM  7000
#define red  0xFF0000AA
#define orange  0xFF9900AA

new PmReceiver[MAX_PLAYER_NAME];
new PMplayer1;
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/pm", cmdtext, true, 10) == 0)
   {
    if(!strlen(params)) return
    SendClientMessage(playerid, orange, "Usage: /pm [PlayerID]");
    PMplayer1 = strval(params);
    if(PMplayer1 == playerid) return
    SendClientMessage(playerid, red, "ERROR: You can't send PM to yourself!");

    if(!(IsPlayerConnected(PMplayer1) && PMplayer1 != INVALID_PLAYER_ID)) return
    SendClientMessage(playerid, red, "ERROR: Player not Connected!");

    new string[128];
    GetPlayerName(PMplayer1, PmReceiver, sizeof(PmReceiver));
    format(string,sizeof(string),"PM To: \"%s(%d)\" \n\nType the message to send:", PmReceiver, PMplayer1);
    ShowPlayerDialog(playerid,DIALOG_TYPE_PM,DIALOG_STYLE_INPUT,"PrivateMessage",string,"Send!","Cancel");
    return 1;
   }
    return 0;
}
i Hope it will Work ^^
Reply


Messages In This Thread
/pm command - by twitteR - 23.05.2012, 14:42
Re: /pm command - by Edward156 - 23.05.2012, 15:10
Re: /pm command - by HighPitchedVoice - 23.05.2012, 15:24
Re: /pm command - by Jarnu - 23.05.2012, 15:27
Re: /pm command - by HighPitchedVoice - 23.05.2012, 15:30
Re: /pm command - by Jarnu - 23.05.2012, 15:47
Re: /pm command - by HighPitchedVoice - 23.05.2012, 15:48

Forum Jump:


Users browsing this thread: 1 Guest(s)