Advertisement
MarkWagih

TuxedoSuit V2.0 ((Mark_Samp))

May 15th, 2016
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 35.95 KB | None | 0 0
  1. //This Filterscript is scripted by : Mark_Samp
  2. //This is Tuxedo Filterscript
  3. //Do Not Re-Release This Script Without My Permission.
  4. //DO Not Claim This Script As Your Own.
  5. //Do Not Sell This Script.
  6. //Don't Remove The Credits.
  7. //This Script Is Made From Scratch.
  8. //Version 2.0
  9. //http://forum.sa-mp.com/showthread.php?t=606589
  10. //********************************
  11. //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  12. //*        Tuxedo Suit           *
  13. //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  14. //********************************
  15. //Filterscript Define
  16. #define FILTERSCRIPT
  17. // Include files
  18. #include <a_samp>
  19. #include <streamer>
  20. #include <zcmd>
  21. #include <sscanf>
  22. #include <YSI\y_ini>
  23. #include <mSelection>
  24. //==============================================================================
  25. //Defines
  26. #define SUIT 1000
  27. #define TDialog 2000
  28. #define WDialog 3000
  29. #define UDialog 4000
  30. #define CDialog 5000
  31. #define GDialog 6000
  32. #define RDialog 7000
  33. #define FDialog 8000
  34. #define KDialog 9000
  35. #define CUSTOM_SPORT_MENU 1
  36. #define CUSTOM_BIKE_MENU 2
  37. #define CUSTOM_HELICOPTER_MENU 3
  38. #define CUSTOM_BOAT_MENU 4
  39. #define CUSTOM_OFFROAD_MENU 5
  40. //News
  41. new Tuxedo[MAX_PLAYERS];
  42. new God[MAX_PLAYERS];
  43. new Kangaroo[MAX_PLAYERS];
  44. new Flash[MAX_PLAYERS];
  45. new Slow[MAX_PLAYERS];
  46. new Average[MAX_PLAYERS];
  47. new High[MAX_PLAYERS];
  48. new Armored[MAX_PLAYERS];
  49. new Invisible[MAX_PLAYERS];
  50. new Nothing[MAX_PLAYERS];
  51. new HealthIncrease[MAX_PLAYERS];
  52. new HealthDecrease[MAX_PLAYERS];
  53. new DeliverTimer[MAX_PLAYERS];
  54. new DeliverVehicleTimer[MAX_PLAYERS];
  55. new DetectionTimer[MAX_PLAYERS];
  56. new DetectionVehicleTimer[MAX_PLAYERS];
  57. new DetectionHealthTimer[MAX_PLAYERS];
  58. new Text3D:TuxedoLabel[MAX_PLAYERS];
  59. //==============================================================================
  60. //Color Defines
  61. #define COLOR_RED                          0xAA3333AA
  62. #define COLOR_YELLOW                       0xFFFF00AA
  63. #define COLOR_PURPLE                       0xC2A2DAAA
  64. #define COLOR_BLUE                         0x2641FEAA
  65. #define COLOR_GREY                         0xAFAFAFAA
  66. #define COLOR_CYAN                         0x1DBCEBFF
  67. #define COLOR_GREEN                        0x008000AA
  68. #define COLOR_ORANGE                       0xFF8000FF
  69. //==============================================================================
  70. //Filterscript Start
  71. public OnFilterScriptInit()
  72. {
  73.     print("\n-----------------------------------------");
  74.     print("        Tuxedo FilterScript Loaded!        ");
  75.     print("-------------------------------------------\n");
  76.     return 1;
  77. }
  78. //Filterscript Exit
  79. public OnFilterScriptExit()
  80. {
  81.     print("\n-----------------------------------------");
  82.     print("        Tuxedo FilterScript UnLoaded!      ");
  83.     print("-------------------------------------------\n");
  84.     return 1;
  85. }
  86. //==============================================================================
  87. public OnPlayerConnect(playerid)
  88. {
  89.     Tuxedo[playerid] = 0;
  90.     God[playerid] = 0;
  91.     Kangaroo[playerid] = 0;
  92.     Flash[playerid] = 0;
  93.     Armored[playerid] = 0;
  94.     Invisible[playerid] = 0;
  95.     HealthIncrease[playerid] = 0;
  96.     HealthDecrease[playerid] = 0;
  97.     DeliverTimer[playerid] = 0;
  98.     DetectionTimer[playerid] = 0;
  99.     HealthDecrease[playerid] = 0;
  100.     Slow[playerid] = 0;
  101.     Average[playerid] = 0;
  102.     High[playerid] = 0;
  103.     return 1;
  104. }
  105.  
  106. public OnPlayerDisconnect(playerid, reason)
  107. {
  108.     Tuxedo[playerid] = 0;
  109.     God[playerid] = 0;
  110.     Kangaroo[playerid] = 0;
  111.     Flash[playerid] = 0;
  112.     Armored[playerid] = 0;
  113.     Invisible[playerid] = 0;
  114.     HealthIncrease[playerid] = 0;
  115.     HealthDecrease[playerid] = 0;
  116.     DeliverTimer[playerid] = 0;
  117.     DetectionTimer[playerid] = 0;
  118.     HealthDecrease[playerid] = 0;
  119.     Slow[playerid] = 0;
  120.     Average[playerid] = 0;
  121.     High[playerid] = 0;
  122.     return 1;
  123. }
  124. //==============================================================================
  125. stock PlayerName(playerid)
  126. {
  127.     new name[MAX_PLAYER_NAME];
  128.     GetPlayerName(playerid, name, sizeof(name));
  129.     return name;
  130. }
  131. //==========================RCON ADMIN COMMAND==================================
  132. CMD:maketuxedo(playerid, params[])
  133. {
  134.    if(IsPlayerAdmin(playerid))
  135.    {
  136.       new string[125],ID;
  137.       if(sscanf(params,"u",ID)) return SendClientMessage(playerid, COLOR_GREY,"[USAGE]: /maketuxedo [ID/PartOfName]");
  138.       if(Tuxedo[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY,"{F50505}[ERROR]: {5A6A6E}This Player already got the Tuxedo Suit");
  139.       if(!IsPlayerConnected(ID) && ID != INVALID_PLAYER_ID)
  140.       {
  141.          SendClientMessage(playerid, COLOR_GREY,"{F50505}[ERROR]: {5A6A6E}Player is not connected");
  142.       }
  143.       else
  144.       {
  145.          format(string, sizeof(string),"{0D0DD6}Administrator {13D61A}'%s' {0D0DD6}has given you the {F50505}Tuxedo Suit!!", PlayerName(playerid));
  146.          SendClientMessage(ID, COLOR_PURPLE, string);
  147.          PlayerPlaySound(ID,1057,0.0,0.0,0.0);
  148.          TuxedoLabel[ID] = Create3DTextLabel("Tuxedo Suit",0xFF000099,0,0,0,50,-1,1);
  149.          Attach3DTextLabelToPlayer(TuxedoLabel[ID], ID, 0,0,0);
  150.          Tuxedo[ID] = 1;
  151.          God[ID] = 0;
  152.          Kangaroo[ID] = 0;
  153.          Flash[ID] = 0;
  154.          Armored[ID] = 0;
  155.          Invisible[ID] = 0;
  156.          DeliverTimer[ID] = 0;
  157.          DetectionTimer[ID] = 0;
  158.          HealthDecrease[ID] = 0;
  159.          Slow[ID] = 0;
  160.          Average[ID] = 0;
  161.          High[ID] = 0;
  162.          ShowPlayerDialog(ID, RDialog, DIALOG_STYLE_MSGBOX,"{FF8000}Tuxedo","{FF0000}[Tuxedo System]:\n {FF0000}-{00FF40}The Tuxedo Suit is typically the most Powerfull Suit Ever , Who holds this Suit will have very special abilities \n {FF0000}-{00FF40}This Suit comes with a special watch that controls the Suit Completely but remember with great power comes great responsibility\n {FF0000}-{00FF40}It has been designed from very special materials so use it Carefully!{FF0080}[[/tuxedo]]","Done","");
  163.       }
  164.    }
  165.    else return SendClientMessage(playerid, COLOR_GREY,"{F50505}[ERROR]: {0D0DD6}You need to be RCON admin to use this command");
  166.    return 1;
  167. }
  168.  
  169. CMD:taketuxedo(playerid, params[])
  170. {
  171.    if(IsPlayerAdmin(playerid))
  172.    {
  173.       new string[125],ID;
  174.       if(sscanf(params,"u",ID)) return SendClientMessage(playerid, COLOR_GREY,"[USAGE]: /taketuxedo [ID/PartOfName]");
  175.       if(Tuxedo[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY,"{F50505}[ERROR]: {5A6A6E}This player doesn't have the Tuxedo Suit");
  176.       if(!IsPlayerConnected(ID) && ID != INVALID_PLAYER_ID)
  177.       {
  178.          SendClientMessage(playerid, COLOR_GREY,"{F50505}[ERROR]: {5A6A6E}Player is not connected");
  179.       }
  180.       else
  181.       {
  182.          format(string, sizeof(string),"{0D0DD6}Administrator {13D61A}'%s' {0D0DD6}has taken from you the {F50505}Tuxedo Suit!!", PlayerName(playerid));
  183.          SendClientMessage(ID, COLOR_RED, string);
  184.          Delete3DTextLabel(TuxedoLabel[ID]);
  185.          PlayerPlaySound(ID,1057,0.0,0.0,0.0);
  186.          Tuxedo[ID] = 0;
  187.          God[ID] = 0;
  188.          Kangaroo[ID] = 0;
  189.          Flash[ID] = 0;
  190.          Armored[ID] = 0;
  191.          Invisible[ID] = 0;
  192.          DeliverTimer[ID] = 0;
  193.          DetectionTimer[ID] = 0;
  194.          HealthDecrease[ID] = 0;
  195.          Slow[ID] = 0;
  196.          Average[ID] = 0;
  197.          High[ID] = 0;
  198.          SetGravity(0.008);
  199.       }
  200.    }
  201.    else return SendClientMessage(playerid, COLOR_GREY,"{F50505}[ERROR]: {0D0DD6}You need to be RCON admin to use this command");
  202.    return 1;
  203. }
  204. //==============================================================================
  205. CMD:tuxedo(playerid, params[])
  206. {
  207.     if(Tuxedo[playerid] == 1)
  208.     {
  209.         ShowPlayerDialog(playerid, SUIT, DIALOG_STYLE_LIST, "Tuxedo Suit", "UnStoppable\nKangaroo\nFlash\nTeleporter\nArmory\nInvisibilty\nStorm\nUniform\nTransport\nGravity\n", "Choose", "Cancel");
  210.         ApplyAnimation(playerid,"COP_AMBIENT","Coplook_watch",4.1,0,0,0,0,0);
  211.     }
  212.     else return SendClientMessage(playerid, COLOR_GREY, "You don't own any Tuxedo Suit");
  213.     return 1;
  214. }
  215. //=============================================================================
  216. public OnPlayerText(playerid, text[])
  217. {
  218.      new string[128],pName[24];
  219.      if(text[0] == '@')
  220.      {
  221.         if(Tuxedo[playerid] == 1)
  222.         {
  223.             GetPlayerName(playerid,pName,24);
  224.             format(string,sizeof(string),"{FA0A0A}[Tuxedo]{FF8000}%s:{01FE0E}%s",pName,text[1]);
  225.             for(new i;i < MAX_PLAYERS;i++)
  226.             {
  227.                 if(Tuxedo[i] == 1)
  228.                 {
  229.                     SendClientMessage(i,COLOR_YELLOW,string);
  230.                 }
  231.             }
  232.             return 0;
  233.         }
  234.      }
  235.      return 1;
  236. }
  237. //=============================================================================
  238.  
  239. public OnPlayerSpawn(playerid)
  240. {
  241.     if(Tuxedo[playerid] == 1)
  242.     {
  243.         Delete3DTextLabel(TuxedoLabel[playerid]);
  244.         TuxedoLabel[playerid] = Create3DTextLabel("Tuxedo Suit",0xFF000099,0,0,0,50,-1,1);
  245.         Attach3DTextLabelToPlayer(TuxedoLabel[playerid], playerid, 0,0,0);
  246.     }
  247. }
  248. //==========================Kangaroo============================================
  249. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  250. {
  251.     if(Kangaroo[playerid] == 1)
  252.     {
  253.         if(newkeys == KEY_JUMP)
  254.         {
  255.             new Float:MJump[3];
  256.             GetPlayerVelocity(playerid, MJump[0], MJump[1], MJump[2]);
  257.             SetPlayerVelocity(playerid, MJump[0], MJump[1], MJump[2]+5);
  258.             PlayerPlaySound(playerid, 1190, 0.0, 0.0, 0.0);
  259.         }
  260.     }
  261.     if(Flash[playerid] == 1)
  262.     {
  263.         if (newkeys == KEY_SPRINT)
  264.         {
  265.             if(Slow[playerid] == 1)
  266.             {
  267.                 new Float:pAng;
  268.                 new Float:X, Float:Y, Float:Z;
  269.                 GetPlayerFacingAngle(playerid, pAng);
  270.                 GetPlayerVelocity(playerid, X, Y, Z);
  271.                 SetPlayerVelocity(playerid, floatsin(-pAng, degrees) * 1.5, floatcos(pAng, degrees) * 1.5 , (Z*2)+0.01);
  272.             }
  273.             if(Average[playerid] == 1)
  274.             {
  275.                 new Float:pAng;
  276.                 new Float:X, Float:Y, Float:Z;
  277.                 GetPlayerFacingAngle(playerid, pAng);
  278.                 GetPlayerVelocity(playerid, X, Y, Z);
  279.                 SetPlayerVelocity(playerid, floatsin(-pAng, degrees) * 1.8, floatcos(pAng, degrees) * 1.8 , (Z*2)+0.03);
  280.             }
  281.             if(High[playerid] == 1)
  282.             {
  283.                 new Float:pAng;
  284.                 new Float:X, Float:Y, Float:Z;
  285.                 GetPlayerFacingAngle(playerid, pAng);
  286.                 GetPlayerVelocity(playerid, X, Y, Z);
  287.                 SetPlayerVelocity(playerid, floatsin(-pAng, degrees) * 1.12, floatcos(pAng, degrees) * 1.12 , (Z*2)+0.09);
  288.             }
  289.         }
  290.     }
  291.     return 1;
  292. }
  293. //==============================================================================
  294. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  295. {
  296.     if(dialogid == SUIT)
  297.     {
  298.         if(response)
  299.         {
  300.             switch(listitem)
  301.             {
  302.                 case 0:
  303.                 {
  304.                     if(God[playerid] == 0)
  305.                     {
  306.                         God[playerid] = 1;
  307.                         SetPlayerHealth(playerid,100000);
  308.                         SetPlayerArmour(playerid,100000);
  309.                         SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}UnStoppable Mode {0AF71E}Enabled");
  310.                         ApplyAnimation(playerid,"SWEET","ho_ass_slapped",4.0,0,0,0,0,0);
  311.                     }
  312.                     else
  313.                     {
  314.                         God[playerid] = 0;
  315.                         SetPlayerHealth(playerid,100);
  316.                         SetPlayerArmour(playerid,100);
  317.                         SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}UnStoppable Mode {F00E0E}Disabled");
  318.                         ApplyAnimation(playerid,"SWEET","ho_ass_slapped",4.0,0,0,0,0,0);
  319.                     }
  320.                 }
  321.                 case 1:
  322.                 {
  323.                     if(Kangaroo[playerid] == 0)
  324.                     {
  325.                         Kangaroo[playerid] = 1;
  326.                         SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}Kangaroo Mode {0AF71E}Enabled");
  327.                         ApplyAnimation(playerid,"SWEET","ho_ass_slapped",4.0,0,0,0,0,0);
  328.                     }
  329.                     else
  330.                     {
  331.                         Kangaroo[playerid] = 0;
  332.                         SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}Kangaroo Mode {F00E0E}Disabled");
  333.                         ApplyAnimation(playerid,"SWEET","ho_ass_slapped",4.0,0,0,0,0,0);
  334.                     }
  335.                 }
  336.                 case 2:
  337.                 {
  338.                     if(Tuxedo[playerid] == 1)
  339.                     {
  340.                         Flash[playerid] = 1;
  341.                         ApplyAnimation(playerid,"SWEET","ho_ass_slapped",4.0,0,0,0,0,0);
  342.                         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  343.                         ShowPlayerDialog(playerid, FDialog, DIALOG_STYLE_LIST, "Flash", "Slow Velocity\nAverage Velocity\nHigh Velocity\n{FA0A0A}Turn Off\n", "Choose", "Back");
  344.                     }
  345.                 }
  346.                 case 3:
  347.                 {
  348.                     if(Tuxedo[playerid] == 1)
  349.                     {
  350.                         ShowPlayerDialog(playerid, TDialog, DIALOG_STYLE_LIST, "Tuxedo Teleport", "{3EFA0A}Los Santos\n{3EFA0A}Bank\n{3EFA0A}Airport\n{3EFA0A}Skate\n{3EFA0A}Jefferson\n{3EFA0A}Ganton\n{3EFA0A}Staduim\n", "Choose", "Back");
  351.                     }
  352.                 }
  353.                 case 4:
  354.                 {
  355.                     if(Armored[playerid] == 0)
  356.                     {
  357.                         Armored[playerid] = 1;
  358.                         SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}Armory Mode {0AF71E}Enabled");
  359.                         ApplyAnimation(playerid,"SWEET","ho_ass_slapped",4.0,0,0,0,0,0);
  360.                         PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  361.                         GivePlayerWeapon(playerid,8,60000);
  362.                         GivePlayerWeapon(playerid,24,60000);
  363.                         GivePlayerWeapon(playerid,27,60000);
  364.                         GivePlayerWeapon(playerid,31,60000);
  365.                         GivePlayerWeapon(playerid,34,60000);
  366.                         GivePlayerWeapon(playerid,39,60000);
  367.                         GivePlayerWeapon(playerid,41,60000);
  368.                         GivePlayerWeapon(playerid,44,60000);
  369.                         GivePlayerWeapon(playerid,46,60000);
  370.                     }
  371.                     else
  372.                     {
  373.                         Armored[playerid] = 0;
  374.                         ResetPlayerWeapons(playerid);
  375.                         SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}Armory Mode {F00E0E}Disabled");
  376.                         ApplyAnimation(playerid,"SWEET","ho_ass_slapped",4.0,0,0,0,0,0);
  377.                         PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
  378.                     }
  379.                 }
  380.                 case 5:
  381.                 {
  382.                     if(IsPlayerInAnyVehicle(playerid) || GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  383.                     {
  384.                         if(Invisible[playerid] == 0)
  385.                         {
  386.                             new int1 = GetPlayerInterior(playerid);
  387.                             Invisible[playerid] = 1;
  388.                             LinkVehicleToInterior(GetPlayerVehicleID(playerid),int1+1);
  389.                             SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}Invisibilty Mode {0AF71E}Enabled");
  390.                             PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  391.                         }
  392.                         else
  393.                         {
  394.                             new int1 = GetPlayerInterior(playerid);
  395.                             Invisible[playerid] = 0;
  396.                             LinkVehicleToInterior(GetPlayerVehicleID(playerid),int1);
  397.                             SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}Invisibilty Mode {F00E0E}Disabled");
  398.                             PlayerPlaySound(playerid, 1147, 0.0, 0.0, 0.0);
  399.                         }
  400.                     }
  401.                     else SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: {B4BAB3}You must be in a vehicle");
  402.                 }
  403.                 case 6:
  404.                 {
  405.                     if(Tuxedo[playerid] == 1)
  406.                     {
  407.                         ShowPlayerDialog(playerid, WDialog, DIALOG_STYLE_LIST, "Tuxedo Weather", "{FFFF00}Sunny\n{FFFF00}Cloudy\n{FFFF00}Rainy\n{FFFF00}Foggy\n{FFFF00}SandStorm\n{FFFF00}Greenish\n", "Choose", "Cancel");
  408.                     }
  409.                 }
  410.                 case 7:
  411.                 {
  412.                     if(Tuxedo[playerid] == 1)
  413.                     {
  414.                         ShowPlayerDialog(playerid, UDialog, DIALOG_STYLE_LIST, "Tuxedo Uniform", "{FF8000}Tuxedo Suit\n{FF8000}Tuxedo Suit {FF0000}2\n{FF8000}Tuxedo Suit {FF0000}3\n{FF8000}Tuxedo Suit {FF0000}4\n{FF8000}Tuxedo Suit {FF0000}5\n{FF8000}Tuxedo Girl\n", "Choose", "Back");
  415.                     }
  416.                 }
  417.                 case 8:
  418.                 {
  419.                     if(Tuxedo[playerid] == 1)
  420.                     {
  421.                         ShowPlayerDialog(playerid, CDialog, DIALOG_STYLE_LIST, "Transport", "{FA0000}[{41F016}Sport{FA0000}]\n{FA0000}[{41F016}Bikes{FA0000}]\n{FA0000}[{41F016}Helicopters{FA0000}]\n{FA0000}[{41F016}Boats{FA0000}]\n{FA0000}[{41F016}OffRoad{FA0000}]\n", "Choose", "Back");
  422.                     }
  423.                 }
  424.                 case 9:
  425.                 {
  426.                     if(Tuxedo[playerid] == 1)
  427.                     {
  428.                         ShowPlayerDialog(playerid, GDialog, DIALOG_STYLE_LIST, "Gravity System", "{0AF2C0}Moon {FF0000}Gravity\n{0AF2C0}Stable {FF0000}Gravity\n{0AF2C0}Mars {FF0000}Gravity\n", "Choose", "Back");
  429.                     }
  430.                 }
  431.             }
  432.         }
  433.         else SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: {B4BAB3}Operation Canceled");
  434.     }
  435.     if(dialogid == RDialog)
  436.     {
  437.         if(response)
  438.         {
  439.             Nothing[playerid] = 0;
  440.         }
  441.         return 1;
  442.     }
  443.     if(dialogid == WDialog)
  444.     {
  445.         if(response)
  446.         {
  447.             switch(listitem)
  448.             {
  449.                 case 0:
  450.                 {
  451.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{C2A2DA}Weather is now {FFFF00}Sunny {C2A2DA}Sir.");
  452.                     SetPlayerWeather(playerid, 1);
  453.                 }
  454.                 case 1:
  455.                 {
  456.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}}[Tuxedo]:{C2A2DA}Weather is now {0000FF}Cloudy {C2A2DA}Sir.");
  457.                     SetPlayerWeather(playerid, 4);
  458.                 }
  459.                 case 2:
  460.                 {
  461.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{C2A2DA}Weather is now {00FFFF}Rainy {C2A2DA}Sir.");
  462.                     SetPlayerWeather(playerid, 8);
  463.                 }
  464.                 case 3:
  465.                 {
  466.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{C2A2DA}Weather is now {808080}Foggy {C2A2DA}Sir.");
  467.                     SetPlayerWeather(playerid, 9);
  468.                 }
  469.                 case 4:
  470.                 {
  471.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{C2A2DA}Weather is now {FFFF80}SandStorm {C2A2DA}Sir.");
  472.                     SetPlayerWeather(playerid, 19);
  473.                 }
  474.                 case 5:
  475.                 {
  476.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{008000}Weather is now {008000}Greenish {C2A2DA}Sir.");
  477.                     SetPlayerWeather(playerid, 20);
  478.                 }
  479.             }
  480.             return 1;
  481.         }
  482.     }
  483.     if(dialogid == TDialog)
  484.     {
  485.         if(response)
  486.         {
  487.             switch(listitem)
  488.             {
  489.                 case 0:
  490.                 {
  491.                     SetPlayerPos(playerid, 1607.6703,-1721.9176,13.5469);
  492.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{3412DE}You have been teleported to {21F505}Los Santos Sir.");
  493.                 }
  494.                 case 1:
  495.                 {
  496.                     SetPlayerPos(playerid, 1442.8214,-1027.5615,23.8281);
  497.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{3412DE}You have been teleported to {21F505}Bank Sir.");
  498.                 }
  499.                 case 2:
  500.                 {  
  501.                     SetPlayerPos(playerid, 1962.0656,-2173.3665,13.4496);
  502.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{3412DE}You have been teleported to {21F505}Los Santos Airport Sir.");
  503.                 }
  504.                 case 3:
  505.                 {
  506.                     SetPlayerPos(playerid, 1879.9102,-1392.4220,13.5703);
  507.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{3412DE}You have been teleported to {21F505}Skate Sir.");
  508.                 }
  509.                 case 4:
  510.                 {
  511.                     SetPlayerPos(playerid, 2220.4182,-1144.1377,25.8002);
  512.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{3412DE}You have been teleported to {21F505}Jefferson Sir.");
  513.                 }
  514.                 case 5:
  515.                 {
  516.                     SetPlayerPos(playerid, 2223.5178,-1725.3273,13.5625);
  517.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{3412DE}You have been teleported to {21F505}Ganton Sir.");
  518.                 }
  519.                 case 6:
  520.                 {
  521.                     SetPlayerPos(playerid, 2685.4214,-1690.5787,9.4332);
  522.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{3412DE}You have been teleported to {21F505}Staduim Sir.");
  523.                 }
  524.             }
  525.         }
  526.         else ShowPlayerDialog(playerid, SUIT, DIALOG_STYLE_LIST, "Tuxedo Suit", "UnStoppable\nKangaroo\nFlash\nTeleporter\nArmory\nInvisibilty\nStorm\nUniform\nTransport\nGravity\n", "Choose", "Cancel");
  527.     }
  528.     if(dialogid == UDialog)
  529.     {
  530.         if(response)
  531.         {
  532.             switch(listitem)
  533.             {
  534.                 case 0:
  535.                 {
  536.                     SetPlayerSkin(playerid, 163);
  537.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{F5B507}You have changed your Suit.");
  538.                 }
  539.                 case 1:
  540.                 {
  541.                     SetPlayerSkin(playerid, 164);
  542.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{F5B507}You have changed your Suit.");
  543.                 }
  544.                 case 2:
  545.                 {
  546.                     SetPlayerSkin(playerid, 165);
  547.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{F5B507}You have changed your Suit.");
  548.                 }
  549.                 case 3:
  550.                 {
  551.                     SetPlayerSkin(playerid, 166);
  552.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{F5B507}You have changed your Suit.");
  553.                 }
  554.                 case 4:
  555.                 {
  556.                     SetPlayerSkin(playerid, 171);
  557.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{F5B507}You have changed your Suit.");
  558.                 }
  559.                 case 5:
  560.                 {
  561.                     SetPlayerSkin(playerid, 172);
  562.                     SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{F5B507}You have changed your Suit.");
  563.                 }
  564.             }
  565.         }
  566.         else ShowPlayerDialog(playerid, SUIT, DIALOG_STYLE_LIST, "Tuxedo Suit", "UnStoppable\nKangaroo\nFlash\nTeleporter\nArmory\nInvisibilty\nStorm\nUniform\nTransport\nGravity\n", "Choose", "Cancel");
  567.     }
  568.     if(dialogid == CDialog)
  569.     {
  570.         if(response)
  571.         {
  572.             switch(listitem)
  573.             {
  574.                case 0:
  575.                {  
  576.                     if(Tuxedo[playerid] == 1)
  577.                     {
  578.                         new cars[20];
  579.                         cars[0] = 602;
  580.                         cars[1] = 429;
  581.                         cars[2] = 402;
  582.                         cars[3] = 541;
  583.                         cars[4] = 415;
  584.                         cars[5] = 587;
  585.                         cars[6] = 558;
  586.                         cars[7] = 565;
  587.                         cars[8] = 494;
  588.                         cars[9] = 411;
  589.                         cars[10] = 559;
  590.                         cars[11] = 603;
  591.                         cars[12] = 506;
  592.                         cars[13] = 451;
  593.                         cars[14] = 477;
  594.                         ShowModelSelectionMenuEx(playerid, cars, 15, "Select Your Sport Vehicle", CUSTOM_SPORT_MENU, -20.0, 0.0, -75.0 , 1.0);
  595.                     }  
  596.                 }
  597.                 case 1:
  598.                 {  
  599.                     if(Tuxedo[playerid] == 1)
  600.                     {
  601.                         new bikes[20];
  602.                         bikes[0] = 448;
  603.                         bikes[1] = 461;
  604.                         bikes[2] = 462;
  605.                         bikes[3] = 463;
  606.                         bikes[4] = 468;
  607.                         bikes[5] = 471;
  608.                         bikes[6] = 521;
  609.                         bikes[7] = 522;
  610.                         bikes[8] = 523;
  611.                         bikes[9] = 581;
  612.                         bikes[10] = 586;
  613.                         bikes[11] = 481;
  614.                         bikes[12] = 509;
  615.                         bikes[13] = 510;
  616.                         ShowModelSelectionMenuEx(playerid, bikes, 14, "Select Your Bike", CUSTOM_BIKE_MENU, -20.0, 0.0, -75.0 , 1.0);
  617.                     }  
  618.                 }
  619.                 case 2:
  620.                 {
  621.                     if(Tuxedo[playerid] == 1)
  622.                     {
  623.                         new helicopters[15];
  624.                         helicopters[0] = 417;
  625.                         helicopters[1] = 425;
  626.                         helicopters[2] = 447;
  627.                         helicopters[3] = 469;
  628.                         helicopters[4] = 487;
  629.                         helicopters[5] = 488;
  630.                         helicopters[6] = 497;
  631.                         helicopters[7] = 548;
  632.                         helicopters[8] = 563;
  633.                         ShowModelSelectionMenuEx(playerid, helicopters, 9, "Select Your Helicopter", CUSTOM_HELICOPTER_MENU, -20.0, 0.0, -75.0 , 1.0);
  634.                     }   return 1;
  635.                 }
  636.                 case 3:
  637.                 {
  638.                     if(Tuxedo[playerid] == 1)
  639.                     {
  640.                         new boats[15];
  641.                         boats[0] = 430;
  642.                         boats[1] = 446;
  643.                         boats[2] = 452;
  644.                         boats[3] = 453;
  645.                         boats[4] = 454;
  646.                         boats[5] = 472;
  647.                         boats[6] = 473;
  648.                         boats[7] = 484;
  649.                         boats[8] = 493;
  650.                         boats[9] = 595;
  651.                         ShowModelSelectionMenuEx(playerid, boats, 9, "Select Your Boat", CUSTOM_BOAT_MENU, -20.0, 0.0, -75.0 , 1.0);
  652.                     }  return 1;
  653.                 }
  654.                 case 4:
  655.                 {
  656.                     if(Tuxedo[playerid] == 1)
  657.                     {
  658.                         new offroad[15];
  659.                         offroad[0] = 568;
  660.                         offroad[1] = 424;
  661.                         offroad[2] = 579;
  662.                         offroad[3] = 400;
  663.                         offroad[4] = 500;
  664.                         offroad[5] = 444;
  665.                         offroad[6] = 556;
  666.                         offroad[7] = 557;
  667.                         offroad[8] = 470;
  668.                         offroad[9] = 489;
  669.                         offroad[10] = 505;
  670.                         offroad[11] = 495;
  671.                         ShowModelSelectionMenuEx(playerid, offroad, 12, "Select Your OffRoad Vehicle", CUSTOM_OFFROAD_MENU, -20.0, 0.0, -75.0 , 1.0);
  672.                     }   return 1;
  673.                 }
  674.             }
  675.         }
  676.         else ShowPlayerDialog(playerid, SUIT, DIALOG_STYLE_LIST, "Tuxedo Suit", "UnStoppable\nKangaroo\nFlash\nTeleporter\nArmory\nInvisibilty\nStorm\nUniform\nTransport\nGravity\n", "Choose", "Cancel");
  677.     }  
  678.     if(dialogid == GDialog)
  679.     {
  680.        if(response)
  681.        {
  682.            switch(listitem)
  683.            {
  684.               case 0:
  685.               {
  686.                   SetGravity(0.001);
  687.                   SendClientMessage(playerid, COLOR_GREY, "{FA0A0A}[Tuxedo]:{E010BA}You have changed the Gravity.");
  688.               }
  689.               case 1:
  690.               {
  691.                   SetGravity(0.008);
  692.                   SendClientMessage(playerid, COLOR_GREY, "{FA0A0A}[Tuxedo]:{E010BA}You have changed the Gravity.");
  693.               }
  694.               case 2:
  695.               {
  696.                   SetGravity(0.080);
  697.                   SendClientMessage(playerid, COLOR_GREY, "{FA0A0A}[Tuxedo]:{E010BA}You have changed the Gravity.");
  698.               }
  699.            }
  700.        }
  701.        else ShowPlayerDialog(playerid, SUIT, DIALOG_STYLE_LIST, "Tuxedo Suit", "UnStoppable\nKangaroo\nFlash\nTeleporter\nArmory\nInvisibilty\nStorm\nUniform\nTransport\nGravity\n", "Choose", "Cancel");
  702.     }
  703.     if(dialogid == FDialog)
  704.     {
  705.        if(response)
  706.        {
  707.            switch(listitem)
  708.            {
  709.                case 0:
  710.                {
  711.                    Slow[playerid] = 1;
  712.                    SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}Flash Mode {0AF71E}Enabled {FFFF00}[{00FFFF}Velocity = {FF0080}Slow]{FFFF00}");
  713.                }
  714.                case 1:
  715.                {
  716.                    Average[playerid] = 1;
  717.                    SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}Flash Mode {0AF71E}Enabled {FFFF00}[{00FFFF}Velocity = {00FF00}Average]{FFFF00}");
  718.                }
  719.                case 2:
  720.                {
  721.                    High[playerid] = 1;
  722.                    SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}Flash Mode {0AF71E}Enabled {FFFF00}[{00FFFF}Velocity = {FF0000}High]{FFFF00}");
  723.                }
  724.                case 3:
  725.                {
  726.                    Flash[playerid] = 0;
  727.                    SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}Flash Mode {F00E0E}Disabled");
  728.                }
  729.            }
  730.        }
  731.        else ShowPlayerDialog(playerid, SUIT, DIALOG_STYLE_LIST, "Tuxedo Suit", "UnStoppable\nKangaroo\nFlash\nTeleporter\nArmory\nInvisibilty\nStorm\nUniform\nTransport\nGravity\n", "Choose", "Cancel");
  732.     }
  733.     if(dialogid == KDialog)
  734.     {
  735.        if(response)
  736.        {
  737.            switch(listitem)
  738.            {
  739.                case 0:
  740.                {
  741.                    Slow[playerid] = 1;
  742.                    SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}Flash Mode {0AF71E}Enabled {FFFF00}[{00FFFF}Velocity = {FF0080}Slow]{FFFF00}");
  743.                }
  744.                case 1:
  745.                {
  746.                    Average[playerid] = 1;
  747.                    SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}Flash Mode {0AF71E}Enabled {FFFF00}[{00FFFF}Velocity = {00FF00}Average]{FFFF00}");
  748.                }
  749.                case 2:
  750.                {
  751.                    High[playerid] = 1;
  752.                    SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}Flash Mode {0AF71E}Enabled {FFFF00}[{00FFFF}Velocity = {FF0000}High]{FFFF00}");
  753.                }
  754.                case 3:
  755.                {
  756.                    Kangaroo[playerid] = 0;
  757.                    SendClientMessage(playerid, COLOR_ORANGE, "{FA0A0A}[Tuxedo]:{D2F50C}Flash Mode {F00E0E}Disabled");
  758.                }
  759.            }
  760.        }
  761.        else ShowPlayerDialog(playerid, SUIT, DIALOG_STYLE_LIST, "Tuxedo Suit", "UnStoppable\nKangaroo\nFlash\nTeleporter\nArmory\nInvisibilty\nStorm\nUniform\nTransport\nGravity\n", "Choose", "Cancel");
  762.     }
  763.     return 0;
  764. }
  765. //=============================================================================================================
  766. public OnPlayerModelSelectionEx(playerid, response, extraid, modelid)
  767. {
  768.     if(extraid == CUSTOM_SPORT_MENU)
  769.     {
  770.         if(response)
  771.         {
  772.             if(DeliverTimer[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: {B4BAB3}System needs to load untill you can have another Vehicle."); //To Prevent Abuse
  773.             DeliverTimer[playerid] = 1;
  774.             SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]:{3DF011}Your Luxory Car is now Ready");
  775.             DeliverVehicleTimer[playerid]= SetTimerEx("Delivery", 60000, false, "d", playerid);
  776.             new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  777.             CreateVehicle(modelid, pos[0] + 2.5, pos[1], pos[2] + 2.5, 0.0, random(128), random(128), -1);
  778.         }
  779.         else SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: {B4BAB3}Operation Canceled");
  780.     }
  781.     if(extraid == CUSTOM_BIKE_MENU)
  782.     {
  783.         if(response)
  784.         {
  785.             if(DeliverTimer[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: {B4BAB3}System needs to load untill you can have another Vehicle.");//To Prevent Abuse
  786.             {
  787.                 DeliverTimer[playerid] = 1;
  788.                 SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]:{3DF011}Your Bike is now Ready");
  789.                 DeliverVehicleTimer[playerid]= SetTimerEx("Delivery", 60000, false, "d", playerid);
  790.                 new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  791.                 CreateVehicle(modelid, pos[0] + 2.5, pos[1], pos[2] + 2.5, 0.0, random(128), random(128), -1);
  792.             }
  793.         }
  794.         else SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: {B4BAB3}Operation Canceled");
  795.     }
  796.     if(extraid == CUSTOM_HELICOPTER_MENU)
  797.     {
  798.         if(response)
  799.         {
  800.             if(DeliverTimer[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: {B4BAB3}System needs to load untill you can have another Vehicle.");//To Prevent Abuse
  801.             {
  802.                 DeliverTimer[playerid] = 1;
  803.                 SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]:{3DF011}Your Helicopter is now Ready");
  804.                 DeliverVehicleTimer[playerid]= SetTimerEx("Delivery", 60000, false, "d", playerid);
  805.                 new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  806.                 CreateVehicle(modelid, pos[0] + 2.5, pos[1], pos[2] + 2.5, 0.0, random(128), random(128), -1);
  807.             }
  808.         }
  809.         else SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: {B4BAB3}Operation Canceled");
  810.     }
  811.     if(extraid == CUSTOM_BOAT_MENU)
  812.     {
  813.         if(response)
  814.         {
  815.             if(DeliverTimer[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: {B4BAB3}System needs to load untill you can have another Vehicle.");//To Prevent Abuse
  816.             {
  817.                 DeliverTimer[playerid] = 1;
  818.                 SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]:{3DF011}Your Boat is now Ready");
  819.                 DeliverVehicleTimer[playerid]= SetTimerEx("Delivery", 60000, false, "d", playerid);
  820.                 new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  821.                 CreateVehicle(modelid, pos[0] + 2.5, pos[1], pos[2] + 2.5, 0.0, random(128), random(128), -1);
  822.             }
  823.         }
  824.         else SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: {B4BAB3}Operation Canceled");
  825.     }
  826.     if(extraid == CUSTOM_OFFROAD_MENU)
  827.     {
  828.         if(response)
  829.         {
  830.             if(DeliverTimer[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: {B4BAB3}System needs to load untill you can have another Vehicle.");//To Prevent Abuse
  831.             {
  832.                 DeliverTimer[playerid] = 1;
  833.                 SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]:{3DF011}Your OffRoad Car is now Ready");
  834.                 DeliverVehicleTimer[playerid]= SetTimerEx("Delivery", 60000, false, "d", playerid);
  835.                 new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  836.                 CreateVehicle(modelid, pos[0] + 2.5, pos[1], pos[2] + 2.5, 0.0, random(128), random(128), -1);
  837.             }
  838.         }
  839.         else SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: {B4BAB3}Operation Canceled");
  840.     }
  841.     return 1;
  842. }
  843.  
  844. forward Delivery(playerid);
  845. public Delivery(playerid)
  846. {
  847.     DeliverTimer[playerid] = 0;
  848.     SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: {B4BAB3}System loaded Succefully and Ready to work.");
  849.     return 1;
  850. }
  851. //================================================================================================================
  852. //AutoSuggestion System
  853. //1.Vehicle Detection
  854. public OnPlayerStateChange(playerid, newstate, oldstate)
  855. {
  856.     if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
  857.     {
  858.         if(Tuxedo[playerid] == 1)
  859.         {
  860.             DetectionTimer[playerid] = 1;
  861.             SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: Vehicle Detection System.... Loading");
  862.             DetectionVehicleTimer[playerid]= SetTimerEx("Detection", 6000, false, "d", playerid);
  863.         }
  864.     }
  865.     return 1;
  866. }
  867.  
  868. forward Detection(playerid);
  869. public Detection(playerid)
  870. {
  871.     if(Invisible[playerid] == 0 || PLAYER_STATE_DRIVER)
  872.     {
  873.         DetectionTimer[playerid] = 0;
  874.         SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: {B4BAB3}System Suggests that you should {41F016}Enable {B4BAB3}the {FFFF00}Invisibilty Vehicle Mode");
  875.     }
  876.     if(Invisible[playerid] == 1 || PLAYER_STATE_DRIVER)
  877.     {
  878.         DetectionTimer[playerid] = 0;
  879.         SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: Vehicle Detection System.... {3EFA0A}Completed");
  880.     }
  881.     return 1;
  882. }
  883. //==============================================================================
  884. //2.Health Detection
  885. public OnPlayerUpdate(playerid)
  886. {
  887.     new Float:fHealth;
  888.  
  889.     GetPlayerHealth(playerid, fHealth);
  890.  
  891.     if(fHealth != GetPVarFloat(playerid, "faPlayerHealth"))
  892.     {
  893.         if(fHealth > GetPVarFloat(playerid, "faPlayerHealth"))
  894.         {
  895.             HealthIncrease[playerid] = 1;
  896.         }
  897.         else
  898.         {
  899.             HealthDecrease[playerid] = 1;
  900.             new Float:health;
  901.             GetPlayerHealth(playerid,health);
  902.             if (health < 50.0)
  903.             {
  904.                 DetectionHealthTimer[playerid]= SetTimerEx("DetectionHealth", 1000, false, "d", playerid);
  905.             }
  906.         }
  907.  
  908.         SetPVarFloat(playerid, "faPlayerHealth", fHealth);
  909.     }
  910. }
  911.  
  912. forward DetectionHealth(playerid);
  913. public DetectionHealth(playerid)
  914. {
  915.     if(God[playerid] == 0)
  916.     {
  917.         HealthDecrease[playerid] = 0;
  918.         SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Tuxedo]: {B4BAB3}System Suggests that you should {41F016}Enable{B4BAB3}the {FFFF00}UnStoppable Mode");
  919.     }
  920.     return 1;
  921. }
  922. //================================================================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement