Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
- {
- if(dialogid == 0 && response == 1)
- {
- new pName[MAX_PLAYER_NAME],gName[MAX_PLAYER_NAME],string[128];
- new giveplayerid = GetPVarInt(playerid,"ClickedPlayer");
- GetPlayerName(playerid,pName,sizeof pName);
- GetPlayerName(giveplayerid,gName,sizeof gName);
- format(string,sizeof string,"PM From %s: %s",pName,inputtext);
- SendClientMessage(giveplayerid,0x00ff00ff,string);
- format(string,sizeof string,"PM Send to %s: %s",gName,inputtext);
- SendClientMessage(playerid,0x00ff00ff,string);
- return 1;
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid,clickedplayerid,source)
- {
- SetPVarInt(playerid,"ClickedPlayer",clickedplayerid);
- ShowPlayerDialog(playerid,0,DIALOG_STYLE_INPUT,"PM","Type a message to send to the clicked player!","Send","Cancel");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement