Advertisement
Guest User

Hiddos

a guest
Jul 9th, 2010
524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.90 KB | None | 0 0
  1. #include <a_samp>
  2. public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
  3. {
  4.     if(dialogid == 0 && response == 1)
  5.     {
  6.         new pName[MAX_PLAYER_NAME],gName[MAX_PLAYER_NAME],string[128];
  7.         new giveplayerid = GetPVarInt(playerid,"ClickedPlayer");
  8.         GetPlayerName(playerid,pName,sizeof pName);
  9.         GetPlayerName(giveplayerid,gName,sizeof gName);
  10.         format(string,sizeof string,"PM From %s: %s",pName,inputtext);
  11.         SendClientMessage(giveplayerid,0x00ff00ff,string);
  12.         format(string,sizeof string,"PM Send to %s: %s",gName,inputtext);
  13.         SendClientMessage(playerid,0x00ff00ff,string);
  14.         return 1;
  15.     }
  16.     return 1;
  17. }
  18.  
  19. public OnPlayerClickPlayer(playerid,clickedplayerid,source)
  20. {
  21.     SetPVarInt(playerid,"ClickedPlayer",clickedplayerid);
  22.     ShowPlayerDialog(playerid,0,DIALOG_STYLE_INPUT,"PM","Type a message to send to the clicked player!","Send","Cancel");
  23.     return 1;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement