Guest User

[Filterscript] City Teleport Dialog

a guest
Dec 4th, 2011
578
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.94 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. #define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6.  
  7. #if defined FILTERSCRIPT
  8.  
  9. #define Yellow 0xFFFF00AA   =     {FFFF00}
  10. #define Red 0x9D000096   =     {9D0000}
  11. #define COLOR_WHITE1 0xFFFFFFFF   =     {FFFFFF}
  12. #define COLOR_WHITE 0xFFFFFFFF
  13.  
  14. public OnFilterScriptInit()
  15. {
  16.     print("\n--------------------------------------");
  17.     print(" City Teleports Dialog by wizzi");
  18.     print("--------------------------------------\n");
  19.     return 1;
  20. }
  21.  
  22. public OnFilterScriptExit()
  23. {
  24.     return 1;
  25. }
  26.  
  27. #else
  28.  
  29. main()
  30. {
  31.     print("\n----------------------------------");
  32.     print(" City Teleports Dialog by wizzi");
  33.     print("----------------------------------\n");
  34. }
  35.  
  36. #endif
  37. public OnPlayerCommandText(playerid, cmdtext[])
  38. {
  39.     if (strcmp("/teleports", cmdtext, true, 10) == 0)
  40.     {
  41.         ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"{9D0000}Te{FFFFFF}le{9D0000}po{FFFFFF}rt{9D0000}'s","{FFFF00}Los {FFFFFF}Santos\n{FFFF00}San {FFFFFF}Fierro\n{FFFF00}Las {FFFFFF}Venturas","Select","Cancel");
  42.         return 1;
  43.     }
  44.     return 0;
  45. }
  46. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  47. {
  48.     switch(dialogid)
  49.     {
  50.         case 1:
  51.         {
  52.             if(!response)
  53.             {
  54.                 SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
  55.                 return 1; // We processed it
  56.             }
  57.            
  58.             switch(listitem)
  59.             {
  60.                 case 0:
  61.                 {
  62.                     SetPlayerPos(playerid,1529.6,-1691.2,13.3);
  63.                     SendClientMessage(playerid,COLOR_WHITE,"Welcome to {88AA88}Los Santos");
  64.                 }
  65.                 case 1:
  66.                 {
  67.                     SetPlayerPos(playerid,-1417.0,-295.8,14.1);
  68.                     SendClientMessage(playerid,COLOR_WHITE,"Welcome to {88AA88}San Fierro");
  69.                 }
  70.                 case 2:
  71.                 {
  72.                     SetPlayerPos(playerid,1699.2,1435.1, 10.7);
  73.                     SendClientMessage(playerid,COLOR_WHITE,"Welcome to {88AA88}Las Venturas");
  74.                 }
  75.             }
  76.         }
  77.     }
  78.     return 1;
  79. }
  80.  
Advertisement
Add Comment
Please, Sign In to add comment