ryanhawk31

/tp (teleport dialog)

Apr 20th, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. #define <zcmd>
  2. #define <sscanf2>
  3.  
  4. #define Teleport 1
  5.  
  6. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  7. {
  8. if(dialogid == Teleport)
  9. {
  10. if(response)
  11. {
  12. if(listitem == 0)
  13. {
  14. SetPlayerPos(playerid, x, y, z); // ex: SetPlayerPos(playerid, 1529.6, -1691.2, 13.3);
  15. }
  16. if(listitem == 1)
  17. {
  18. SetPlayerPos(playerid, x, y, z);
  19. }
  20. if(listitem == 2)
  21. {
  22. SetPlayerPos(playerid, x, y, z);
  23. }
  24. if(listitem == 3)
  25. {
  26. SetPlayerPos(playerid, x, y, z);
  27. }
  28. }
  29. }
  30. }
  31.  
  32. CMD:tp(playerid, params[])
  33. {
  34. ShowPlayerDialog(playerid, Teleport, DIALOG_STYLE_LIST, "Teleports", "teleport 1\n teleport 2\n teleport 3",
  35. "Teleport", "Close");
  36. return 1;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment