Guest User

Virus.

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