Guest User

Untitled

a guest
Mar 6th, 2010
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
  4.  
  5. #define DIALOGID 9122
  6.  
  7. public OnPlayerCommandText( playerid, cmdtext[] )
  8. {
  9.  
  10. dcmd(pdinvite, 8, cmdtext);
  11.  
  12. return 0;
  13. }
  14.  
  15. dcmd_pdinvite(playerid, params[]) {
  16.  
  17. new skin;
  18. skin = GetPlayerSkin(playerid);
  19. if(skin != 288) return SendClientMessage(playerid, 0x2641FEAA, "You are not a chief");
  20.  
  21. new target;
  22. target = strval(params);
  23.  
  24. if(!params[0]) return SendClientMessage(playerid, 0x2641FEAA, "ERROR: /pdinvite <playerid>");
  25. if(target == playerid)
  26. ShowPlayerDialog(target, 300, DIALOG_STYLE_LIST, "Help", "YES\nNO", "Select", "Cancel");
  27. return 1;
  28. }
  29.  
  30. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  31.  
  32.  
  33. if(dialogid == 300 && response)
  34. {
  35.  
  36. switch(listitem)
  37. {
  38. case 1:
  39. {
  40. SetPlayerColor(playerid,0x2641FEAA);
  41. }
  42.  
  43. case 0:
  44. {
  45. SendClientMessage(playerid, 0x33AA33AA, "You canceled. Was it a mistake? Ask again.");
  46.  
  47. }
  48. }
  49.  
  50.  
  51.  
  52.  
  53. }
Advertisement
Add Comment
Please, Sign In to add comment