Advertisement
FKu

Untitled

FKu
Oct 20th, 2012
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. //Declare xyz globaly
  2.  
  3. public OnPlayerCommandText(playerid, cmdtext[])
  4. {
  5. if (!strcmp("/eventtp", cmdtext, true))
  6. {
  7. GetPlayerPos(playerid,X,Y,Z);
  8. ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Amount","What amount of players u want to tp?","OK","Cancel");
  9. return 1;
  10. }
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  19. {
  20. new amount,i;
  21.  
  22. if(dialogid==1)
  23. {
  24. if(response)
  25. {
  26. if(strlen(inputtext) > 0)
  27. {
  28. amount=strval(inputtext);
  29. i = 0;
  30. ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"ID","Enter the ID of the player u want to tp.","OK","Cancel");
  31. }
  32. }
  33. return 1;
  34. }
  35.  
  36.  
  37.  
  38.  
  39. if(dialogid==2)
  40. {
  41. if(response)
  42. {
  43. if(strlen(inputtext) > 0)
  44. {
  45. new id;
  46. id = strval(inputtext);
  47. Y = Y + 2;
  48. SetPlayerPos(id,X,Y,Z);
  49. i++;
  50. if(i < amount)
  51. {
  52. ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"ID","Enter the ID of the player u want to tp.","OK","Cancel");
  53. }
  54. }
  55. }
  56. return 1;
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement