04.12.2009, 09:22
on top of your script, put
now its upon you to check for sending the PM or not (if sender == receiver, or sizeof(PM) == 0).
Код:
new gPMDestinationID[MAX_PLAYERS];
Код:
public OnPlayerClickPlayer(playerid,clickedplayerid,source) //--------------------------------------------------------- { new PMName[32]; GetPlayerName(clickedplayerid,PMName[0],32); gPMDestinationID[playerid]=clickedplayerid; ShowPlayerDialog(playerid,1234,DIALOG_STYLE_INPUT,"Send PM to",PMName[0],"Send PM","Cancel"); return 1; }
Код:
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[]) { if(dialogid == 1234) { if(!response) { SendClientMessage(playerid,0xff5555ff,"PM canceled"); return 1; } new PMName[32]; GetPlayerName(playerid,PMName[0],32); new message[196]; format(message,sizeof(message),"%s:\n%s",PMName[0],inputtext); SendClientMessage(gPMDestinationID[playerid],0xaaffaaff,message); return 1; } return 0; }