Guest User

[WIP]Axemption's Stunt/Drift/Freeroam/RP

a guest
Mar 27th, 2015
581
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 125.30 KB | None | 0 0
  1. #include <a_samp>
  2. #include <YSI\y_ini>
  3. #include <zcmd>
  4. #include <sscanf2>
  5. #include <streamer>
  6. #include <aim>
  7. #include <airbreak>
  8. #include <foreach>
  9.  
  10. #define DIALOG_REGISTER 1
  11. #define DIALOG_LOGIN 2
  12. #define DIALOG_SUCCESS_1 3
  13. #define DIALOG_SUCCESS_2 4
  14. #define DIALOG_PMENU 5
  15. #define DIALOG_MADMIN 6
  16. #define DIALOG_PKICK 7
  17. #define DIALOG_PBAN 8
  18. #define DIALOG_MAIN 9
  19. #define DIALOG_AIRBREAK 10
  20. #define DIALOG_VTUNE 11
  21. #define DIALOG_SPEED 12
  22. #define DIALOG_AIM 13
  23. #define DIALOG_GODMODE 14
  24. #define DIALOG_AIRBREAKC 15
  25. #define DIALOG_VTUNEC 16
  26. #define DIALOG_SPEEDC 17
  27. #define DIALOG_AIMC 18
  28. #define DIALOG_GODMODEC 19
  29. #define DIALOG_MAIN2 20
  30. #define DIALOG_PMUTE 21
  31. #define DIALOG_PUNMUTE 22
  32.  
  33. #define COLOR_YELLOW            0xFFFF00AA
  34. #define COLOR_RED               0xFF808085
  35. #define COLOR_WHITE             0xFFFFFFFF
  36. #define COLOR_GREEN             0x00FF0000
  37. #define COLOR_ERROR             0x3366FFFF
  38. #define COLOR_ADUTY             0x66FFFF00
  39. #define COLOR_LIGHTRED          0xFF808085
  40.  
  41. #define COLOR_Label 0xFFFFFFFF
  42. #define COLOR_LabelOut 0x00000040
  43. #define COLOR_ValueOut 0xFFFFFF40
  44. #define COLOR_Value 0x000000FF
  45.  
  46. #define PATH "CAS/Players/%s.ini"
  47. #define AC_CONFIG_FILE "CAS/Anticheat/Config.cfg"
  48. #define BPATH "CAS/Business/%i.ini"
  49. #define SCM SendClientMessage
  50. #define SCMToAll SendClientMessageToAll
  51. #define ERROR "You don't have access to use that command."
  52.  
  53. #define DRIFT_MINKAT 10.0
  54. #define DRIFT_MAXKAT 90.0
  55. #define DRIFT_SPEED 30.0
  56. #define Label_X 500
  57. #define Value_X 500
  58. #define TD_Y 100
  59.  
  60. //Reaction system defines
  61. #define TIME 180000
  62. #define Loop(%0,%1) \
  63.     for(new %0 = 0; %0 != %1; %0++)
  64. #define function%0(%1) \
  65.     forward%0(%1); public%0(%1)
  66. //End here
  67.  
  68. //LMB NOS system
  69. #define HOLDING(%0) \
  70.     ((newkeys & (%0)) == (%0))
  71. #define RELEASED(%0) \
  72.     (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
  73. //End here
  74.  
  75. forward LoadUser_data(playerid, name[], value[]);
  76. forward SendAdminMessage(color, text[]);
  77. forward PlayerSpeed(playerid);
  78. forward loadac_data(idx, name[],value[]);
  79. forward GeneralTimer();
  80. forward DelayedKick(playerid);
  81. forward settime(playerid);
  82. forward AutoCarFixer(playerid);
  83. forward SpeedoUpdate();
  84. forward SaveBusiness(id);
  85. forward loadbiz_data(idx, name[], value[]);
  86. forward Drift();
  87. forward AngleUpdate();
  88. forward DriftExit(playerid);
  89. forward CheckPlayerState();
  90.  
  91. new SwearWords[][] =
  92. {
  93.   "noob",
  94.   "fuck u",
  95.   "fuck",
  96.   "gay",
  97.   "retard"
  98. };
  99.  
  100. enum pInfo
  101. {
  102.     pPass,
  103.     pCash,
  104.     pAdmin,
  105.     pKills,
  106.     pDeaths,
  107.     pSkin,
  108.     pAduty,
  109.     pMuted,
  110.     pMutedTime,
  111.     pScore,
  112.     pDonator,
  113.     pReportmute,
  114.     BizID,
  115.     DM1Kills,
  116.     DM1Deaths,
  117.     DM2Kills,
  118.     DM2Deaths
  119. }
  120.  
  121. enum acInfo
  122. {
  123.     Airbreak,
  124.     vTune,
  125.     SpeedCheat,
  126.     GodMode,
  127.     AimScript,
  128.     AirbreakC,
  129.     vTuneC,
  130.     SpeedCheatC,
  131.     GodModeC,
  132.     AimScriptC
  133. }
  134.  
  135. enum bInfo
  136. {
  137.     bOwner[MAX_PLAYER_NAME],
  138.     bName[123],
  139.     bOwned,
  140.     bPrice,
  141.     bType,
  142.     bLocked,
  143.     Float:bEntranceX,
  144.     Float:bEntranceY,
  145.     Float:bEntranceZ,
  146.     Float:bEntranceA,
  147.     Float:bExitX,
  148.     Float:bExitY,
  149.     Float:bExitZ,
  150.     Float:bExitA,
  151.     bInt,
  152.     bWorld,
  153.     bInsideInt,
  154.     bInsideWorld,
  155.     bInsideIcon,
  156.     bOutsideIcon,
  157.     bLevel,
  158.     bPay
  159. }
  160.  
  161. new PlayerInfo[MAX_PLAYERS][pInfo];
  162. new ACInfo[acInfo];
  163. new BusinessInfo[200][bInfo];
  164. new LogAttemps[MAX_PLAYERS];
  165. new InsideBiz[MAX_PLAYERS];
  166. new Text:Textdraw1; //Clock's textdraw
  167. new Godmode[MAX_PLAYERS];
  168. new Text:speed[MAX_PLAYERS], Text:health[MAX_PLAYERS];
  169. new InDM[MAX_PLAYERS] = 0;
  170. //Drift system start
  171. new DriftTimer[MAX_PLAYERS];
  172. new TimerA, TimerC;
  173. new DriftPointsNow[MAX_PLAYERS];
  174. new PlayerDriftCancellation[MAX_PLAYERS];
  175. new Float:ppos[MAX_PLAYERS][3];
  176. enum Float:Pos{ Float:sX,Float:sY,Float:sZ };
  177. new Float:SavedPos[MAX_PLAYERS][Pos];
  178. new bool:DriftMode[MAX_PLAYERS]=false;
  179. new DriftBonus[MAX_PLAYERS]=1;
  180. new Float:HealthInit[MAX_PLAYERS]=1000.0;
  181. new bool:AutoFixBool[MAX_PLAYERS]=true;
  182. new Text:TDLabels[3];
  183. new Text:TDValueDrift[MAX_PLAYERS];
  184. new Text:TDValueBonus[MAX_PLAYERS];
  185. new Text:TDValueCash[MAX_PLAYERS];
  186. //Drift system end
  187. new
  188.     xCharacters[][] =
  189.     {
  190.         "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
  191.         "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
  192.         "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
  193.         "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
  194.         "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ",", ".", "!",
  195.         "?", "/"
  196.     },
  197.     xChars[16] = "",
  198.     xReactionTimer,
  199.     xCash,
  200.     xScore,
  201.     bool: xTestBusy
  202. ;
  203.  
  204. public LoadUser_data(playerid,name[],value[])
  205. {
  206.     INI_Int("Password",PlayerInfo[playerid][pPass]);
  207.     INI_Int("Cash",PlayerInfo[playerid][pCash]);
  208.     INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
  209.     INI_Int("Kills",PlayerInfo[playerid][pKills]);
  210.     INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
  211.     INI_Int("Skin",PlayerInfo[playerid][pSkin]);
  212.     INI_Int("Adminduty",PlayerInfo[playerid][pAduty]);
  213.     INI_Int("Muted",PlayerInfo[playerid][pMuted]);
  214.     INI_Int("MutedTime",PlayerInfo[playerid][pMutedTime]);
  215.     INI_Int("Score",PlayerInfo[playerid][pScore]);
  216.     INI_Int("Donator",PlayerInfo[playerid][pDonator]);
  217.     INI_Int("Reportmute",PlayerInfo[playerid][pReportmute]);
  218.     INI_Int("BizID",PlayerInfo[playerid][BizID]);
  219.     INI_Int("DM1Kills",PlayerInfo[playerid][DM1Kills]);
  220.     INI_Int("DM1Deaths",PlayerInfo[playerid][DM1Deaths]);
  221.     INI_Int("DM2Kills",PlayerInfo[playerid][DM2Kills]);
  222.     INI_Int("DM2Deaths",PlayerInfo[playerid][DM2Deaths]);
  223.     return 1;
  224. }
  225.  
  226. /*Created by Dracoblue*/
  227. stock udb_hash(buf[]) {
  228.     new length=strlen(buf);
  229.     new s1 = 1;
  230.     new s2 = 0;
  231.     new n;
  232.     for (n=0; n<length; n++)
  233.     {
  234.        s1 = (s1 + buf[n]) % 65521;
  235.        s2 = (s2 + s1)     % 65521;
  236.     }
  237.     return (s2 << 16) + s1;
  238. }
  239.  
  240. main()
  241. {
  242.     print("Drift/Freeroam by Axemption");
  243. }
  244.  
  245. Float:GetPlayerTheoreticAngle(i)
  246. {
  247.         new Float:sin;
  248.         new Float:dis;
  249.         new Float:angle2;
  250.         new Float:x,Float:y,Float:z;
  251.         new Float:tmp3;
  252.         new Float:tmp4;
  253.         new Float:MindAngle;
  254.  
  255.         if(IsPlayerConnected(i)){
  256.  
  257.                 GetPlayerPos(i,x,y,z);
  258.  
  259.                 dis = floatsqroot(floatpower(floatabs(floatsub(x,ppos[i][0])),2)+floatpower(floatabs(floatsub(y,ppos[i][1])),2));
  260.  
  261.                 if(IsPlayerInAnyVehicle(i)){GetVehicleZAngle(GetPlayerVehicleID(i), angle2);}else{GetPlayerFacingAngle(i, angle2);}
  262.  
  263.                 if(x>ppos[i][0]){tmp3=x-ppos[i][0];}else{tmp3=ppos[i][0]-x;}
  264.                 if(y>ppos[i][1]){tmp4=y-ppos[i][1];}else{tmp4=ppos[i][1]-y;}
  265.  
  266.                 if(ppos[i][1]>y && ppos[i][0]>x){
  267.                     sin = asin(tmp3/dis);
  268.                     MindAngle = floatsub(floatsub(floatadd(sin, 90), floatmul(sin, 2)), -90.0);
  269.                 }
  270.  
  271.                 if(ppos[i][1]<y && ppos[i][0]>x){
  272.                     sin = asin(tmp3/dis);
  273.                     MindAngle = floatsub(floatadd(sin, 180), 180.0);
  274.                 }
  275.  
  276.                 if(ppos[i][1]<y && ppos[i][0]<x){
  277.                     sin = acos(tmp4/dis);
  278.                     MindAngle = floatsub(floatadd(sin, 360), floatmul(sin, 2));
  279.                 }
  280.  
  281.                 if(ppos[i][1]>y && ppos[i][0]<x){
  282.                     sin = asin(tmp3/dis);
  283.                     MindAngle = floatadd(sin, 180);
  284.                 }
  285.         }
  286.  
  287.         if(MindAngle == 0.0){return angle2;}else{return MindAngle;}
  288. }
  289.  
  290. public OnGameModeInit()
  291. {
  292.     new str[58];
  293.     for(new idx = 1; idx < sizeof(ACInfo); idx++)
  294.     {
  295.         format(str, sizeof(str), AC_CONFIG_FILE, idx);
  296.         INI_ParseFile(str, "loadac_%s", .bExtra = true, .extra = idx );
  297.     }
  298.     SetTimer("GeneralTimer", 1000, 1);
  299.     SetTimer("settime", 1000, 1);
  300.     SetTimer("AutoCarFixer", 3000, 1);
  301.     SetTimer("SpeedoUpdate",100, true);
  302.     TimerA = SetTimer("AngleUpdate", 200, true);
  303.     TimerC = SetTimer("CheckPlayerState", 100, true);
  304.    
  305.     xReactionTimer = SetTimer("xReactionTest", TIME, 1);
  306.     SetGameModeText("ENG/Drift/Freeroam");
  307.     DisableInteriorEnterExits();
  308.     LoadTextDraws();
  309.     AddPlayerClass(146,  1481.2080, -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Civilian 1
  310.     AddPlayerClass(154, 1481.2080-1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Civilian 2
  311.     AddPlayerClass(19,  1481.2080-1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Civilian 3
  312.     AddPlayerClass(59,  1481.2080-1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Civilian 4
  313.     AddPlayerClass(15, 1481.2080,   -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Civilian 5
  314.     AddPlayerClass(46, 1481.2080,   -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Civilian 6
  315.     AddPlayerClass(47, 1481.2080,   -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Civilian 7
  316.     AddPlayerClass(49, 1481.2080,   -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Civilian 8
  317.     AddPlayerClass(19, 1481.2080,   -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Civilian 9
  318.     AddPlayerClass(20, 1481.2080,   -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Civilian 10
  319.     AddPlayerClass(12, 1481.2080,   -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Girls 11
  320.     AddPlayerClass(11, 1481.2080,   -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //girls 12
  321.     AddPlayerClass(90, 1481.2080,   -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //girls 13
  322.     AddPlayerClass(91, 1481.2080,   -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //girls 14
  323.     AddPlayerClass(93,  1481.2080-1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //girls 15
  324.     AddPlayerClass(169,  1481.2080, -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //girls 16
  325.     AddPlayerClass(28, 1481.2080,   -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Drugs dealer 17
  326.     AddPlayerClass(29, 1481.2080,   -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Drugs dealer 18
  327.     AddPlayerClass(30, 1481.2080,   -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Drugs dealer 19
  328.     AddPlayerClass(254, 1481.2080-1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Drugs dealer 20
  329.     AddPlayerClass(47, 1481.2080,   -1770.6204, 18.7958,    359.4039, -1, -1, -1, -1, -1, -1); //Drugs dealer 21
  330.  
  331.     for(new idx = 1; idx < sizeof(BusinessInfo); idx++)
  332.     {
  333.         format(str, sizeof(str), BPATH, idx);
  334.         INI_ParseFile(str, "loadbiz_%s", .bExtra = true, .extra = idx );
  335.         BusinessInfo[idx][bOutsideIcon] = CreateDynamicPickup(1272, 1, BusinessInfo[idx][bEntranceX], BusinessInfo[idx][bEntranceY], BusinessInfo[idx][bEntranceZ], BusinessInfo[idx][bWorld]);
  336.         BusinessInfo[idx][bInsideIcon] = CreateDynamicPickup(1272, 1, BusinessInfo[idx][bExitX], BusinessInfo[idx][bExitY], BusinessInfo[idx][bExitZ], BusinessInfo[idx][bInsideWorld]);
  337.     }
  338.    
  339.     //Glass tunnel to LV Airport
  340.     CreateDynamicObject(18801, 2158.24829, 1414.46729, 32.59080,   0.00000, 0.00000, 10.00000);
  341.     CreateDynamicObject(18779, 2179.81860, 1411.26819, 19.63820,   0.00000, 0.00000, 182.00000);
  342.     CreateDynamicObject(18838, 2118.36548, 1397.84131, 69.88161,   0.00000, 0.00000, 180.00000);
  343.     CreateDynamicObject(18809, 2085.95874, 1398.54468, 30.44908,   90.00000, 90.00000, 0.00000);
  344.     CreateDynamicObject(18809, 2036.04834, 1398.53149, 30.44908,   90.00000, 90.00000, 0.00000);
  345.     CreateDynamicObject(18826, 2000.00928, 1414.78320, 77.88970,   90.00000, 0.00000, 0.00000);
  346.     CreateDynamicObject(18809, 2035.40259, 1398.43176, 62.03074,   90.00000, 90.00000, -0.36000);
  347.     CreateDynamicObject(18809, 2085.39380, 1398.02148, 77.84918,   90.00000, 90.00000, -0.36000);
  348.     CreateDynamicObject(18838, 2118.95386, 1398.41833, 22.85140,   0.00000, 0.00000, 180.00000);
  349.     CreateDynamicObject(18809, 2085.30859, 1398.20313, 62.03074,   90.00000, 90.00000, -0.36000);
  350.     CreateDynamicObject(18809, 2035.54382, 1398.45605, 77.84918,   90.00000, 90.00000, -0.36000);
  351.     CreateDynamicObject(18826, 2000.19434, 1398.59229, 46.23103,   0.00000, 0.00000, 0.00000);
  352.     CreateDynamicObject(18809, 2035.56519, 1430.47803, 77.84918,   90.00000, 90.00000, -0.36000);
  353.     CreateDynamicObject(18809, 2085.55371, 1430.03455, 77.84918,   90.00000, 90.00000, -0.36000);
  354.     CreateDynamicObject(18809, 2135.41064, 1429.71790, 77.84918,   90.00000, 90.00000, -0.36000);
  355.     CreateDynamicObject(18809, 2185.35327, 1429.49487, 77.84918,   90.00000, 90.00000, -0.36000);
  356.     CreateDynamicObject(18809, 2235.20605, 1429.14502, 77.84918,   90.00000, 90.00000, -0.36000);
  357.     CreateDynamicObject(18809, 2285.01001, 1428.89490, 77.84918,   90.00000, 90.00000, -0.36000);
  358.     CreateDynamicObject(18826, 2320.37354, 1444.61340, 77.88970,   90.00000, 180.00000, 0.00000);
  359.     CreateDynamicObject(18809, 2284.89355, 1460.62500, 77.84918,   90.00000, 90.00000, -0.36000);
  360.     CreateDynamicObject(18809, 2234.98242, 1460.92212, 77.84918,   90.00000, 90.00000, -0.36000);
  361.     CreateDynamicObject(18809, 2184.93872, 1461.21582, 77.84918,   90.00000, 90.00000, -0.36000);
  362.     CreateDynamicObject(18809, 2135.06177, 1461.35168, 77.84918,   90.00000, 90.00000, -0.36000);
  363.     CreateDynamicObject(18826, 2099.52075, 1477.49646, 77.88970,   90.00000, 0.00000, 0.00000);
  364.     CreateDynamicObject(18809, 2135.14746, 1493.27332, 77.84918,   90.00000, 90.00000, -0.36000);
  365.     CreateDynamicObject(18826, 2170.61938, 1509.15417, 77.88970,   90.00000, 180.00000, 0.00000);
  366.     CreateDynamicObject(18809, 2135.13818, 1525.19116, 77.84918,   90.00000, 90.00000, -0.36000);
  367.     CreateDynamicObject(18809, 2085.18677, 1525.52795, 77.84918,   90.00000, 90.00000, -0.36000);
  368.     CreateDynamicObject(18826, 2049.63428, 1509.81934, 77.88970,   90.00000, 0.00000, 0.00000);
  369.     CreateDynamicObject(18826, 2070.70581, 1477.94934, 77.88970,   90.00000, 180.00000, 0.00000);
  370.     CreateDynamicObject(18809, 2035.09021, 1462.12756, 77.84918,   90.00000, 90.00000, -0.36000);
  371.     CreateDynamicObject(18809, 1985.18591, 1462.51147, 77.84918,   90.00000, 90.00000, -0.36000);
  372.     CreateDynamicObject(18826, 1949.82837, 1478.49243, 77.88970,   90.00000, 0.00000, 0.00000);
  373.     CreateDynamicObject(18809, 1985.43604, 1494.24268, 77.84918,   90.00000, 90.00000, -0.36000);
  374.     CreateDynamicObject(18826, 2020.94482, 1509.95471, 77.88970,   90.00000, 180.00000, 0.00000);
  375.     CreateDynamicObject(18826, 1999.75342, 1541.79553, 77.88970,   90.00000, 0.00000, 0.00000);
  376.     CreateDynamicObject(18809, 2035.48975, 1557.38733, 77.84918,   90.00000, 90.00000, -0.36000);
  377.     CreateDynamicObject(18809, 2085.37451, 1557.00952, 77.84918,   90.00000, 90.00000, -0.36000);
  378.     CreateDynamicObject(18809, 2135.31934, 1556.67920, 77.84918,   90.00000, 90.00000, -0.36000);
  379.     CreateDynamicObject(18826, 2170.70679, 1572.46521, 77.88970,   90.00000, 180.00000, 0.00000);
  380.     CreateDynamicObject(18809, 2135.18286, 1588.51697, 77.84918,   90.00000, 90.00000, -0.36000);
  381.     CreateDynamicObject(18809, 2085.16553, 1588.92200, 77.84918,   90.00000, 90.00000, -0.36000);
  382.     CreateDynamicObject(18826, 2049.52637, 1605.04883, 77.88970,   90.00000, 0.00000, 0.00000);
  383.     CreateDynamicObject(18809, 2085.13135, 1620.68506, 77.84918,   90.00000, 90.00000, -0.36000);
  384.     CreateDynamicObject(18826, 2120.64038, 1636.43884, 77.88970,   90.00000, 180.00000, 0.00000);
  385.     CreateDynamicObject(18809, 2085.17358, 1652.37207, 77.84918,   90.00000, 90.00000, -0.36000);
  386.     CreateDynamicObject(18809, 2035.44397, 1652.66321, 77.84918,   90.00000, 90.00000, -0.36000);
  387.     CreateDynamicObject(18826, 1999.73669, 1637.01953, 77.88970,   90.00000, 0.00000, 0.00000);
  388.     CreateDynamicObject(18826, 2020.90076, 1605.22302, 77.88970,   90.00000, 180.00000, 0.00000);
  389.     CreateDynamicObject(18809, 1985.49329, 1589.48315, 77.84918,   90.00000, 90.00000, -0.36000);
  390.     CreateDynamicObject(18826, 1949.94617, 1573.75146, 77.88970,   90.00000, 0.00000, 0.00000);
  391.     CreateDynamicObject(18826, 1971.01392, 1541.89160, 77.88970,   90.00000, 180.00000, 0.00000);
  392.     CreateDynamicObject(18809, 1935.42029, 1526.03430, 77.84918,   90.00000, 90.00000, -0.36000);
  393.     CreateDynamicObject(18809, 1885.48633, 1526.15027, 77.84918,   90.00000, 90.00000, -0.36000);
  394.     CreateDynamicObject(18826, 1849.81030, 1510.45691, 77.88970,   90.00000, 0.00000, 0.00000);
  395.     CreateDynamicObject(18809, 1885.42224, 1494.32983, 77.84918,   90.00000, 90.00000, -0.36000);
  396.     CreateDynamicObject(18826, 1921.02661, 1478.29810, 77.88970,   90.00000, 180.00000, 0.00000);
  397.     CreateDynamicObject(18809, 1885.44946, 1462.49170, 77.84918,   90.00000, 90.00000, -0.36000);
  398.     CreateDynamicObject(18826, 1850.09338, 1446.80334, 77.88970,   90.00000, 0.00000, 0.00000);
  399.     CreateDynamicObject(18809, 1885.74817, 1430.52649, 77.84918,   90.00000, 90.00000, -0.36000);
  400.     CreateDynamicObject(18826, 1921.17249, 1414.60474, 77.88970,   90.00000, 180.00000, 0.00000);
  401.     CreateDynamicObject(18809, 1885.60999, 1398.92480, 77.84918,   90.00000, 90.00000, -0.36000);
  402.     CreateDynamicObject(18809, 1835.58386, 1399.52905, 77.84918,   90.00000, 90.00000, -0.36000);
  403.     CreateDynamicObject(18826, 1799.91345, 1415.73767, 77.88970,   90.00000, 0.00000, 0.00000);
  404.     CreateDynamicObject(18826, 1821.20630, 1447.54700, 77.88970,   90.00000, 180.00000, 0.00000);
  405.     CreateDynamicObject(18809, 1786.09021, 1463.52112, 77.84918,   90.00000, 90.00000, -0.36000);
  406.     CreateDynamicObject(18826, 1750.56995, 1479.59753, 77.88970,   90.00000, 0.00000, 0.00000);
  407.     CreateDynamicObject(18809, 1786.14966, 1495.32190, 77.84918,   90.00000, 90.00000, -0.36000);
  408.     CreateDynamicObject(18826, 1821.58777, 1511.10400, 77.88970,   90.00000, 180.00000, 0.00000);
  409.     CreateDynamicObject(18809, 1785.93982, 1527.16516, 77.84918,   90.00000, 90.00000, -0.36000);
  410.     CreateDynamicObject(18809, 1736.07385, 1527.48938, 77.84918,   90.00000, 90.00000, -0.36000);
  411.     CreateDynamicObject(18826, 1700.41516, 1511.64844, 77.88970,   90.00000, 0.00000, 0.00000);
  412.     CreateDynamicObject(18826, 1721.58118, 1479.71594, 77.88970,   90.00000, 180.00000, 0.00000);
  413.     CreateDynamicObject(18826, 1700.33167, 1447.94189, 77.88970,   90.00000, 0.00000, 0.00000);
  414.     CreateDynamicObject(18809, 1735.79370, 1431.68994, 77.84918,   90.00000, 90.00000, -0.36000);
  415.     CreateDynamicObject(18826, 1771.37170, 1415.44153, 77.88970,   90.00000, 180.00000, 0.00000);
  416.     CreateDynamicObject(18809, 1735.91113, 1399.73962, 77.84918,   90.00000, 90.00000, -0.36000);
  417.     CreateDynamicObject(18809, 1685.91931, 1400.12146, 77.84918,   90.00000, 90.00000, -0.36000);
  418.     CreateDynamicObject(18826, 1650.57495, 1384.48767, 77.88970,   90.00000, 0.00000, 0.00000);
  419.     CreateDynamicObject(18826, 1671.73755, 1352.57532, 77.88970,   90.00000, 180.00000, 0.00000);
  420.     CreateDynamicObject(18809, 1636.08899, 1336.74036, 77.84918,   90.00000, 90.00000, -0.36000);
  421.     CreateDynamicObject(18809, 1586.21875, 1337.25354, 77.84918,   90.00000, 90.00000, -0.36000);
  422.     return 1;
  423. }
  424.  
  425. public OnGameModeExit()
  426. {
  427.     new INI:File = INI_Open(AC_CONFIG_FILE);
  428.     INI_WriteInt(File,"Airbreak",ACInfo[Airbreak]);
  429.     INI_WriteInt(File,"VehicleTune",ACInfo[vTune]);
  430.     INI_WriteInt(File,"SpeedHack",ACInfo[SpeedCheat]);
  431.     INI_WriteInt(File,"GodMode",ACInfo[GodMode]);
  432.     INI_WriteInt(File,"AimScript",ACInfo[AimScript]);
  433.     INI_WriteInt(File,"AirbreakC",ACInfo[AirbreakC]);
  434.     INI_WriteInt(File,"VehicleTuneC",ACInfo[vTuneC]);
  435.     INI_WriteInt(File,"SpeedHackC",ACInfo[SpeedCheatC]);
  436.     INI_WriteInt(File,"GodModeC",ACInfo[GodModeC]);
  437.     INI_WriteInt(File,"AimScriptC",ACInfo[AimScriptC]);
  438.     INI_Close(File);
  439.    
  440.     for(new id = 1; id < sizeof(BusinessInfo); id++)
  441.     {
  442.         if(BusinessInfo[id][bPrice] == 0) break;
  443.         SaveBusiness(id);
  444.     }
  445.     KillTimer(TimerA);
  446.     KillTimer(TimerC);
  447.     return 1;
  448. }
  449.  
  450. public OnPlayerRequestClass(playerid, classid)
  451. {
  452.     return 1;
  453. }
  454.  
  455. public OnPlayerConnect(playerid)
  456. {
  457.     if(fexist(UserPath(playerid)))
  458.     {
  459.         INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  460.         ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Logging","{FF0000}Please, enter your password to continue.","Login","Exit");
  461.     }
  462.     else
  463.     {
  464.         ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Registering","{00FF00}Please, enter password to register your account.","Register","Exit");
  465.     }
  466.     for(new idx = 1; idx < sizeof(BusinessInfo); idx++)
  467.     {
  468.         new str[40], string[1256];
  469.         format(str, sizeof(str), BPATH, idx);
  470.         INI_ParseFile(str, "loadbiz_%s", .bExtra = true, .extra = idx );
  471.         BusinessInfo[idx][bOutsideIcon] = CreatePickup(1272, 1, BusinessInfo[idx][bEntranceX], BusinessInfo[idx][bEntranceY], BusinessInfo[idx][bEntranceZ], BusinessInfo[idx][bWorld]);
  472.         if(BusinessInfo[idx][bOwned] == 1)
  473.         {
  474.             format(string, sizeof(string), "Name: %s \nOwner: %s \nPrice: %d\nType: %s", BusinessInfo[idx][bName], BusinessInfo[idx][bOwner], BusinessInfo[idx][bPrice], BusinessInfo[idx][bType]);
  475.             Create3DTextLabel(string, 0x008080FF, BusinessInfo[idx][bEntranceX], BusinessInfo[idx][bEntranceY], BusinessInfo[idx][bEntranceZ]+1, 35.0, BusinessInfo[idx][bWorld], 0);
  476.         }
  477.         else if(BusinessInfo[idx][bOwned] == 0)
  478.         {
  479.             format(string, sizeof(string), "Name: %s \nPrice: $%d\nType: %s", BusinessInfo[idx][bName], BusinessInfo[idx][bPrice], BusinessInfo[idx][bType]);
  480.             Create3DTextLabel(string, 0x008080FF, BusinessInfo[idx][bEntranceX], BusinessInfo[idx][bEntranceY], BusinessInfo[idx][bEntranceZ]+1, 35.0, BusinessInfo[idx][bWorld], 0);
  481.         }
  482.         BusinessInfo[idx][bInsideIcon] = CreatePickup(1272, 1, BusinessInfo[idx][bExitX], BusinessInfo[idx][bExitY], BusinessInfo[idx][bExitZ], BusinessInfo[idx][bInsideWorld]);
  483.     }
  484.     Textdraw1 = TextDrawCreate(546.000000,28.000000,"--");
  485.     TextDrawFont(Textdraw1,3);
  486.     TextDrawLetterSize(Textdraw1,0.4,1.5);
  487.     TextDrawColor(Textdraw1, 0xFFFFFFAA);
  488.     TextDrawSetShadow(Textdraw1,1);
  489.     TextDrawBackgroundColor(Textdraw1,0x000000FF);
  490.    
  491.     speed[playerid] = TextDrawCreate(478,389,"_");
  492.     TextDrawLetterSize(speed[playerid],0.37,1.099999);
  493.     TextDrawSetOutline(speed[playerid],1);
  494.  
  495.     health[playerid] = TextDrawCreate(478,401,"_");
  496.     TextDrawLetterSize(health[playerid],0.37,1.099999);
  497.     TextDrawSetOutline(health[playerid],1);
  498.    
  499.     RemoveBuildingForPlayer(playerid, 8931, 2162.4766, 1403.4375, 14.6563, 0.25);
  500.     RemoveBuildingForPlayer(playerid, 8839, 2162.4766, 1403.4375, 14.6563, 0.25);
  501.     return 1;
  502. }
  503.  
  504. public OnPlayerDisconnect(playerid, reason)
  505. {
  506.     new INI:File = INI_Open(UserPath(playerid));
  507.     INI_WriteInt(File,"Cash", GetPlayerMoney(playerid));
  508.     INI_WriteInt(File,"Admin", PlayerInfo[playerid][pAdmin]);
  509.     INI_WriteInt(File,"Kills", PlayerInfo[playerid][pKills]);
  510.     INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
  511.     INI_WriteInt(File,"Skin", GetPlayerSkin(playerid));
  512.     INI_WriteInt(File,"Adminduty", PlayerInfo[playerid][pAduty]);
  513.     INI_WriteInt(File,"Muted", PlayerInfo[playerid][pMuted]);
  514.     INI_WriteInt(File,"MutedTime", PlayerInfo[playerid][pMutedTime]);
  515.     INI_WriteInt(File,"Score", GetPlayerScore(playerid));
  516.     INI_WriteInt(File,"Donator", PlayerInfo[playerid][pDonator]);
  517.     INI_WriteInt(File,"Reportmute", PlayerInfo[playerid][pReportmute]);
  518.     INI_WriteInt(File,"BizID", PlayerInfo[playerid][BizID]);
  519.     INI_WriteInt(File,"DM1Kills", PlayerInfo[playerid][DM1Kills]);
  520.     INI_WriteInt(File,"DM1Deaths", PlayerInfo[playerid][DM1Deaths]);
  521.     INI_WriteInt(File,"DM2Kills", PlayerInfo[playerid][DM2Kills]);
  522.     INI_WriteInt(File,"DM2Deaths", PlayerInfo[playerid][DM2Deaths]);
  523.     INI_Close(File);
  524.     return 1;
  525. }
  526.  
  527. public OnPlayerSpawn(playerid)
  528. {
  529.     SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
  530.     TextDrawShowForPlayer(playerid, Textdraw1);
  531.     if(InDM[playerid] == 1)
  532.     {
  533.         SetPlayerInterior(playerid, 1);
  534.         SetPlayerVirtualWorld(playerid, 22);
  535.         SetPlayerPos(playerid, 1412.639892, -1.787510, 1000.924377);
  536.         SetPlayerHealth(playerid, 100);
  537.         SetPlayerArmour(playerid, 100);
  538.         ResetPlayerWeapons(playerid);
  539.         GivePlayerWeapon(playerid, 38, 50000);
  540.     }
  541.     else if(InDM[playerid] == 2)
  542.     {
  543.         SetPlayerInterior(playerid, 1);
  544.         SetPlayerVirtualWorld(playerid, 23);
  545.         SetPlayerPos(playerid, 1412.639892, -1.787510, 1000.924377);
  546.         SetPlayerHealth(playerid, 100);
  547.         ResetPlayerWeapons(playerid);
  548.         switch(random(9))
  549.         {
  550.             case 0:
  551.             {
  552.                 GivePlayerWeapon(playerid, 4, 1);
  553.             }
  554.             case 1:
  555.             {
  556.                 GivePlayerWeapon(playerid, 12, 1);
  557.             }
  558.             case 2:
  559.             {
  560.                 GivePlayerWeapon(playerid, 16, 50000);
  561.             }
  562.             case 3:
  563.             {
  564.                 GivePlayerWeapon(playerid, 24, 50000);
  565.             }
  566.             case 4:
  567.             {
  568.                 GivePlayerWeapon(playerid, 27, 50000);
  569.             }
  570.             case 5:
  571.             {
  572.                 GivePlayerWeapon(playerid, 28, 50000);
  573.             }
  574.             case 6:
  575.             {
  576.                 GivePlayerWeapon(playerid, 31, 50000);
  577.             }
  578.             case 7:
  579.             {
  580.                 GivePlayerWeapon(playerid, 26, 50000);
  581.             }
  582.             case 8:
  583.             {
  584.                 GivePlayerWeapon(playerid, 25, 50000);
  585.             }
  586.         }
  587.     }
  588.     return 1;
  589. }
  590.  
  591. public loadac_data(idx, name[], value[])
  592. {
  593.     INI_Int("Airbreak", ACInfo[Airbreak]);
  594.     INI_Int("VehicleTune", ACInfo[vTune]);
  595.     INI_Int("SpeedHack", ACInfo[SpeedCheat]);
  596.     INI_Int("GodMode", ACInfo[GodMode]);
  597.     INI_Int("AimScript", ACInfo[AimScript]);
  598.     INI_Int("AirbreakC", ACInfo[AirbreakC]);
  599.     INI_Int("VehicleTuneC", ACInfo[vTuneC]);
  600.     INI_Int("SpeedHackC", ACInfo[SpeedCheatC]);
  601.     INI_Int("GodModeC", ACInfo[GodModeC]);
  602.     INI_Int("AimScriptC", ACInfo[AimScriptC]);
  603.     return 1;
  604. }
  605.  
  606. public OnPlayerDeath(playerid, killerid, reason)
  607. {
  608.     new string[256];
  609.     if(InDM[playerid] == 0)
  610.     {
  611.         PlayerInfo[killerid][pKills]++;
  612.         PlayerInfo[playerid][pDeaths]++;
  613.         GivePlayerMoney(playerid, -100);
  614.         GivePlayerMoney(killerid, 100);
  615.     }
  616.     else if(InDM[playerid] == 1)
  617.     {
  618.         PlayerInfo[killerid][DM1Kills]++;
  619.         PlayerInfo[playerid][DM1Deaths]++;
  620.         format(string, sizeof(string), "DM: You have %d kills in minigun arena now.", PlayerInfo[killerid][DM1Kills]);
  621.         SCM(killerid, COLOR_GREEN, string);
  622.         format(string, sizeof(string), "DM: You have %d deaths in minigun arena now.", PlayerInfo[playerid][DM1Deaths]);
  623.         SCM(playerid, COLOR_LIGHTRED, string);
  624.     }
  625.     else if(InDM[playerid] == 2)
  626.     {
  627.         PlayerInfo[killerid][DM2Kills]++;
  628.         PlayerInfo[playerid][DM2Deaths]++;
  629.         new Float:armour;
  630.         GetPlayerArmour(killerid, armour);
  631.         SetPlayerArmour(killerid, armour+25);
  632.         format(string, sizeof(string), "DM: You have %d kills in random weapon arena now.", PlayerInfo[killerid][DM2Kills]);
  633.         SCM(killerid, COLOR_GREEN, string);
  634.         format(string, sizeof(string), "DM: You have %d deaths in random weapon arena now.", PlayerInfo[playerid][DM2Deaths]);
  635.         SCM(playerid, COLOR_LIGHTRED, string);
  636.     }
  637.     SendDeathMessage(killerid, playerid, reason);
  638.     return 1;
  639. }
  640.  
  641.  
  642.  
  643. public OnVehicleSpawn(vehicleid)
  644. {
  645.     return 1;
  646. }
  647.  
  648. public OnVehicleDeath(vehicleid, killerid)
  649. {
  650.     SetVehicleToRespawn(vehicleid);
  651.     return 1;
  652. }
  653.  
  654. public OnPlayerText(playerid, text[])
  655. {
  656.     new string[256];
  657.     if(PlayerInfo[playerid][pMuted] == 1)
  658.     {
  659.         SCM(playerid, COLOR_LIGHTRED, "You are muted.");
  660.         return 0;
  661.     }
  662.     switch(xTestBusy)
  663.     {
  664.         case true:
  665.         {
  666.             if(!strcmp(xChars, text, false))
  667.             {
  668.                 new pName[MAX_PLAYER_NAME];
  669.                 GetPlayerName(playerid, pName, sizeof(pName));
  670.                 format(string, sizeof(string), "« %s has won the reaction test. »", pName);
  671.                 SCMToAll(COLOR_GREEN, string);
  672.                 format(string, sizeof(string), "« You have earned $%d + %d score points. »", xCash, xScore);
  673.                 SCM(playerid, COLOR_GREEN, string);
  674.                 GivePlayerMoney(playerid, xCash);
  675.                 SetPlayerScore(playerid, GetPlayerScore(playerid) + xScore);
  676.                 xReactionTimer = SetTimer("xReactionTest", TIME, 1);
  677.                 xTestBusy = false;
  678.             }
  679.         }
  680.     }
  681.     for(new words; words<sizeof(SwearWords); words++)
  682.     {
  683.         if(strfind(text,SwearWords[words], true) != -1 ) { SCM(playerid, COLOR_YELLOW, "Swearing is not allowed."); return 0;}
  684.     }
  685.     if(PlayerInfo[playerid][pAdmin] > 0)
  686.     {
  687.         format(string, sizeof(string), "{BA0000}[Admin] {%06x}%s (%d): {FFFFFF}%s", (GetPlayerColor(playerid) >>> 8), GetName(playerid), playerid, text);
  688.         SCMToAll(-1, string);
  689.         return 0;
  690.     }
  691.     else if(PlayerInfo[playerid][pDonator] > 0)
  692.     {
  693.         format(string, sizeof(string), "{BA0000}[Donator] {%06x}%s (%d): {FFFFFF}%s", (GetPlayerColor(playerid) >>> 8), GetName(playerid), playerid, text);
  694.         SCMToAll(-1, string);
  695.         return 0;
  696.     }
  697.     else if(PlayerInfo[playerid][pAdmin] == 0)
  698.     {
  699.         format(string, sizeof(string), "{BA0000}[Player] {%06x}%s (%d): {FFFFFF}%s", (GetPlayerColor(playerid) >>> 8), GetName(playerid), playerid, text);
  700.         SCMToAll(-1, string);
  701.         return 0;
  702.     }
  703.     return 1;
  704. }
  705.  
  706. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  707. {
  708.     return 1;
  709. }
  710.  
  711. public OnPlayerExitVehicle(playerid, vehicleid)
  712. {
  713.     return 1;
  714. }
  715.  
  716. public OnPlayerStateChange(playerid, newstate, oldstate)
  717. {
  718.     return 1;
  719. }
  720.  
  721. public OnPlayerEnterCheckpoint(playerid)
  722. {
  723.     return 1;
  724. }
  725.  
  726. public OnPlayerLeaveCheckpoint(playerid)
  727. {
  728.     return 1;
  729. }
  730.  
  731. public OnPlayerEnterRaceCheckpoint(playerid)
  732. {
  733.     return 1;
  734. }
  735.  
  736. public OnPlayerLeaveRaceCheckpoint(playerid)
  737. {
  738.     return 1;
  739. }
  740.  
  741. public OnRconCommand(cmd[])
  742. {
  743.     return 1;
  744. }
  745.  
  746. public OnPlayerRequestSpawn(playerid)
  747. {
  748.     return 1;
  749. }
  750.  
  751. public OnObjectMoved(objectid)
  752. {
  753.     return 1;
  754. }
  755.  
  756. public OnPlayerObjectMoved(playerid, objectid)
  757. {
  758.     return 1;
  759. }
  760.  
  761. public OnPlayerPickUpPickup(playerid, pickupid)
  762. {
  763.     return 1;
  764. }
  765.  
  766. public OnVehicleMod(playerid, vehicleid, componentid)
  767. {
  768.     if(!IsComponentidCompatible(GetVehicleModel(vehicleid), componentid)) RemoveVehicleComponent(vehicleid, componentid);
  769.     return 1;
  770. }
  771.  
  772. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  773. {
  774.     return 1;
  775. }
  776.  
  777. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  778. {
  779.     return 1;
  780. }
  781.  
  782. public OnPlayerSelectedMenuRow(playerid, row)
  783. {
  784.     return 1;
  785. }
  786.  
  787. public OnPlayerExitedMenu(playerid)
  788. {
  789.     return 1;
  790. }
  791.  
  792. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  793. {
  794.     return 1;
  795. }
  796.  
  797. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  798. {
  799.     if (HOLDING(KEY_FIRE) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  800.     {
  801.           AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
  802.     }
  803.  
  804.     if (RELEASED(KEY_FIRE) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  805.     {
  806.           RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
  807.     }
  808.     if(IsPlayerInAnyVehicle(playerid))
  809.     {
  810.         if(newkeys == KEY_CROUCH)
  811.         {
  812.        
  813.             new currentveh;
  814.             new Float:angle;
  815.             currentveh = GetPlayerVehicleID(playerid);
  816.             GetVehicleZAngle(currentveh, angle);
  817.             SetVehicleZAngle(currentveh, angle);
  818.             SendClientMessage(playerid, COLOR_YELLOW, "Your vehicle has been flipped.");
  819.         }
  820.     }
  821.     if(newkeys & KEY_SECONDARY_ATTACK)
  822.     {
  823.         for(new b = 1; b < sizeof(BusinessInfo); b++)
  824.         {
  825.             if(IsPlayerInRangeOfPoint(playerid, 2.0, BusinessInfo[b][bExitX], BusinessInfo[b][bExitY], BusinessInfo[b][bExitZ]) && GetPlayerVirtualWorld(playerid) == BusinessInfo[b][bInsideWorld])
  826.             {
  827.                 SetPlayerPos(playerid, BusinessInfo[b][bEntranceX], BusinessInfo[b][bEntranceY], BusinessInfo[b][bEntranceZ]);
  828.                 SetPlayerFacingAngle(playerid, BusinessInfo[b][bEntranceA]);
  829.                 SetPlayerInterior(playerid, 0);
  830.                 SetPlayerVirtualWorld(playerid, 0);
  831.                 InsideBiz[playerid] = 0;
  832.                 return 1;
  833.             }
  834.             else if(IsPlayerInRangeOfPoint(playerid, 1.0, BusinessInfo[b][bEntranceX], BusinessInfo[b][bEntranceY], BusinessInfo[b][bEntranceZ]))
  835.             {
  836.                 if(BusinessInfo[b][bLocked] == 1) return SendClientMessage(playerid, COLOR_ERROR, "This Business is locked!");
  837.                 SetPlayerPos(playerid, BusinessInfo[b][bExitX], BusinessInfo[b][bExitY], BusinessInfo[b][bExitZ]);
  838.                 SetPlayerFacingAngle(playerid, BusinessInfo[b][bExitA]);
  839.                 SetPlayerInterior(playerid, BusinessInfo[b][bInsideInt]);
  840.                 SetPlayerVirtualWorld(playerid, BusinessInfo[b][bInsideWorld]);
  841.                 InsideBiz[playerid] = b;
  842.                 return 1;
  843.             }
  844.         }
  845.     }
  846.     return 1;
  847. }
  848.  
  849. public OnRconLoginAttempt(ip[], password[], success)
  850. {
  851.     return 1;
  852. }
  853.  
  854. public OnPlayerUpdate(playerid)
  855. {
  856.     if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  857.     {
  858.         new Float:vec[3];
  859.         GetPlayerCameraFrontVector(playerid, vec[0], vec[1], vec[2]);
  860.         new bool:possible_crasher = false;
  861.         for (new i = 0; !possible_crasher && i < sizeof(vec); i++)
  862.             if (floatabs(vec[i]) > 10.0)
  863.                 possible_crasher = true;
  864.  
  865.         if (possible_crasher)
  866.             return 0;
  867.     }
  868.  
  869.     return 1;
  870. }
  871.  
  872. public OnPlayerStreamIn(playerid, forplayerid)
  873. {
  874.     return 1;
  875. }
  876.  
  877. public OnPlayerStreamOut(playerid, forplayerid)
  878. {
  879.     return 1;
  880. }
  881.  
  882. public OnVehicleStreamIn(vehicleid, forplayerid)
  883. {
  884.     return 1;
  885. }
  886.  
  887. public OnVehicleStreamOut(vehicleid, forplayerid)
  888. {
  889.     return 1;
  890. }
  891.  
  892. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  893. {
  894.     new string[256], string2[256], string3[256], string4[256], string5[256], status5[32], status1[32], status2[32], status3[32], status4[32];
  895.     new string6[256], string7[256], string8[256], string9[256], string10[256];
  896.     if(ACInfo[AirbreakC] == 0) { status5 = "Kick"; }
  897.     else if(ACInfo[AirbreakC] == 1) { status5 = "Message to admins"; }
  898.     else if(ACInfo[vTuneC] == 0) { status1 = "Kick"; }
  899.     else if(ACInfo[vTuneC] == 1) { status1 = "Message to admins"; }
  900.     else if(ACInfo[SpeedCheatC] == 0) { status2 = "Kick"; }
  901.     else if(ACInfo[SpeedCheatC] == 1) { status2 = "Message to admins"; }
  902.     else if(ACInfo[AimScriptC] == 0) { status3 = "Kick"; }
  903.     else if(ACInfo[AimScriptC] == 1) { status3 = "Message to admins"; }
  904.     else if(ACInfo[GodModeC] == 0) { status4 = "Kick"; }
  905.     else if(ACInfo[GodModeC] == 1) { status4 = "Message to admins"; }
  906.     if(dialogid == DIALOG_MAIN)
  907.     {
  908.         if(response)
  909.         {
  910.             format(string, sizeof(string), "Airbreak protection = %d\nEnter 0 to stop it or 1 to start it.", ACInfo[Airbreak]);
  911.             format(string2, sizeof(string2), "Vehicle Tune protection = %d\nEnter 0 to stop it or 1 to start it.", ACInfo[vTune]);
  912.             format(string3, sizeof(string3), "Speed Hack protection = %d\nEnter 0 to stop it or 1 to start it.", ACInfo[SpeedCheat]);
  913.             format(string4, sizeof(string4), "Aimbot protection = %d\nEnter 0 to stop it or 1 to start it.", ACInfo[AimScript]);
  914.             format(string5, sizeof(string5), "Godmode protection = %d\nEnter 0 to stop it or 1 to start it.", ACInfo[GodMode]);
  915.             switch(listitem)
  916.             {
  917.                 case 0: ShowPlayerDialog(playerid, DIALOG_AIRBREAK, DIALOG_STYLE_INPUT, "Airbreak protection", string, "Change", "Close");
  918.                 case 1: ShowPlayerDialog(playerid, DIALOG_VTUNE, DIALOG_STYLE_INPUT, "Vehicle Tune protection", string2, "Change", "Close");
  919.                 case 2: ShowPlayerDialog(playerid, DIALOG_SPEED, DIALOG_STYLE_INPUT, "Speed Hack protection", string3, "Change", "Close");
  920.                 case 3: ShowPlayerDialog(playerid, DIALOG_VTUNE, DIALOG_STYLE_INPUT, "Aimbot protection", string4, "Change", "Close");
  921.                 case 4: ShowPlayerDialog(playerid, DIALOG_GODMODE, DIALOG_STYLE_INPUT, "Godmode protection", string5, "Change", "Close");
  922.             }
  923.         }
  924.         return 1;
  925.     }
  926.     if(dialogid == DIALOG_MAIN2)
  927.     {
  928.         if(response)
  929.         {
  930.             format(string6, sizeof(string), "Airbreak punish = %s\nEnter 0 for kick or 1 for message to admins.", status5);
  931.             format(string7, sizeof(string2), "Vehicle Tune punish = %s\nEnter 0 for kick or 1 for message to admins.", status1);
  932.             format(string8, sizeof(string3), "Speed Hack punish = %s\nEnter 0 for kick or 1 for message to admins.", status2);
  933.             format(string9, sizeof(string4), "Aimbot punish = %s\nEnter 0 for kick or 1 for message to admins.", status3);
  934.             format(string10, sizeof(string5), "Godmode punish = %s\nEnter 0 for kick or 1 for message to admins.", status4);
  935.             switch(listitem)
  936.             {
  937.                 case 0: ShowPlayerDialog(playerid, DIALOG_AIRBREAKC, DIALOG_STYLE_INPUT, "Airbreak punish", string6, "Change", "Close");
  938.                 case 1: ShowPlayerDialog(playerid, DIALOG_VTUNEC, DIALOG_STYLE_INPUT, "Vehicle Tune punish", string7, "Change", "Close");
  939.                 case 2: ShowPlayerDialog(playerid, DIALOG_SPEEDC, DIALOG_STYLE_INPUT, "Speed Hack punish", string8, "Change", "Close");
  940.                 case 3: ShowPlayerDialog(playerid, DIALOG_VTUNEC, DIALOG_STYLE_INPUT, "Aimbot punish", string9, "Change", "Close");
  941.                 case 4: ShowPlayerDialog(playerid, DIALOG_GODMODEC, DIALOG_STYLE_INPUT, "Godmode punish", string10, "Change", "Close");
  942.             }
  943.         }
  944.         return 1;
  945.     }
  946.     if(dialogid == DIALOG_AIRBREAK)
  947.     {
  948.         if(response)
  949.         {
  950.             new status[32];
  951.             if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
  952.             ACInfo[Airbreak] = strlen(inputtext);
  953.             if(strlen(inputtext) == 0) { status = "stopped"; }
  954.             else if(strlen(inputtext) == 1) { status = "started"; }
  955.             format(string, sizeof(string), "Anticheat: You %s Airbreak protection.", status);
  956.             SCM(playerid, COLOR_RED, string);
  957.         }
  958.         else
  959.         {
  960.             format(string, sizeof(string), "{00FF00}Airbreak protection = {FF0000}%d\n{00FF00}Vehicle Tune protection = {FF0000}%d\n{00FF00}Speed Hack protection = {FF0000}%d\n{00FF00}Aimbot protection = {FF0000}%d\n{00FF00}Godmode protection = {FF0000}%d\n", ACInfo[Airbreak], ACInfo[vTune], ACInfo[SpeedCheat], ACInfo[AimScript], ACInfo[GodMode]);
  961.             ShowPlayerDialog(playerid, DIALOG_MAIN, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
  962.         }
  963.         return 1;
  964.     }
  965.     if(dialogid == DIALOG_VTUNE)
  966.     {
  967.         if(response)
  968.         {
  969.             new status[32];
  970.             if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
  971.             ACInfo[vTune] = strlen(inputtext);
  972.             if(strlen(inputtext) == 0) { status = "stopped"; }
  973.             else if(strlen(inputtext) == 1) { status = "started"; }
  974.             format(string, sizeof(string), "Anticheat: You %s Vehicle tune script protection.", status);
  975.             SCM(playerid, COLOR_RED, string);
  976.         }
  977.         else
  978.         {
  979.             format(string, sizeof(string), "{00FF00}Airbreak protection = {FF0000}%d\n{00FF00}Vehicle Tune protection = {FF0000}%d\n{00FF00}Speed Hack protection = {FF0000}%d\n{00FF00}Aimbot protection = {FF0000}%d\n{00FF00}Godmode protection = {FF0000}%d\n", ACInfo[Airbreak], ACInfo[vTune], ACInfo[SpeedCheat], ACInfo[AimScript], ACInfo[GodMode]);
  980.             ShowPlayerDialog(playerid, DIALOG_MAIN, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
  981.         }
  982.         return 1;
  983.     }
  984.     if(dialogid == DIALOG_SPEED)
  985.     {
  986.         if(response)
  987.         {
  988.             new status[32];
  989.             if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
  990.             ACInfo[SpeedCheat] = strlen(inputtext);
  991.             if(strlen(inputtext) == 0) { status = "stopped"; }
  992.             else if(strlen(inputtext) == 1) { status = "started"; }
  993.             format(string, sizeof(string), "Anticheat: You %s Speed Hack protection.", status);
  994.             SCM(playerid, COLOR_RED, string);
  995.         }
  996.         else
  997.         {
  998.             format(string, sizeof(string), "{00FF00}Airbreak protection = {FF0000}%d\n{00FF00}Vehicle Tune protection = {FF0000}%d\n{00FF00}Speed Hack protection = {FF0000}%d\n{00FF00}Aimbot protection = {FF0000}%d\n{00FF00}Godmode protection = {FF0000}%d\n", ACInfo[Airbreak], ACInfo[vTune], ACInfo[SpeedCheat], ACInfo[AimScript], ACInfo[GodMode]);
  999.             ShowPlayerDialog(playerid, DIALOG_MAIN, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
  1000.         }
  1001.         return 1;
  1002.     }
  1003.     if(dialogid == DIALOG_AIM)
  1004.     {
  1005.         if(response)
  1006.         {
  1007.             new status[32];
  1008.             if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
  1009.             ACInfo[AimScript] = strlen(inputtext);
  1010.             if(strlen(inputtext) == 0) { status = "stopped"; }
  1011.             else if(strlen(inputtext) == 1) { status = "started"; }
  1012.             format(string, sizeof(string), "Anticheat: You %s Aimbot protection.", status);
  1013.             SCM(playerid, COLOR_RED, string);
  1014.         }
  1015.         else
  1016.         {
  1017.             format(string, sizeof(string), "{00FF00}Airbreak protection = {FF0000}%d\n{00FF00}Vehicle Tune protection = {FF0000}%d\n{00FF00}Speed Hack protection = {FF0000}%d\n{00FF00}Aimbot protection = {FF0000}%d\n{00FF00}Godmode protection = {FF0000}%d\n", ACInfo[Airbreak], ACInfo[vTune], ACInfo[SpeedCheat], ACInfo[AimScript], ACInfo[GodMode]);
  1018.             ShowPlayerDialog(playerid, DIALOG_MAIN, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
  1019.         }
  1020.         return 1;
  1021.     }
  1022.     if(dialogid == DIALOG_GODMODE)
  1023.     {
  1024.         if(response)
  1025.         {
  1026.             new status[32];
  1027.             if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
  1028.             ACInfo[GodMode] = strlen(inputtext);
  1029.             if(strlen(inputtext) == 0) { status = "stopped"; }
  1030.             else if(strlen(inputtext) == 1) { status = "started"; }
  1031.             format(string, sizeof(string), "Anticheat: You %s GodMode protection.", status);
  1032.             SCM(playerid, COLOR_RED, string);
  1033.         }
  1034.         else
  1035.         {
  1036.             format(string, sizeof(string), "{00FF00}Airbreak protection = {FF0000}%d\n{00FF00}Vehicle Tune protection = {FF0000}%d\n{00FF00}Speed Hack protection = {FF0000}%d\n{00FF00}Aimbot protection = {FF0000}%d\n{00FF00}Godmode protection = {FF0000}%d\n", ACInfo[Airbreak], ACInfo[vTune], ACInfo[SpeedCheat], ACInfo[AimScript], ACInfo[GodMode]);
  1037.             ShowPlayerDialog(playerid, DIALOG_MAIN, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
  1038.         }
  1039.         return 1;
  1040.     }
  1041.     if(dialogid == DIALOG_AIRBREAKC)
  1042.     {
  1043.         if(response)
  1044.         {
  1045.             new status[32];
  1046.             if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
  1047.             ACInfo[AirbreakC] = strlen(inputtext);
  1048.             if(strlen(inputtext) == 0) { status = "Kick"; }
  1049.             else if(strlen(inputtext) == 1) { status = "Message to admins"; }
  1050.             format(string, sizeof(string), "Anticheat: When someone is suspicious: %s", status);
  1051.             SCM(playerid, COLOR_RED, string);
  1052.         }
  1053.         else
  1054.         {
  1055.             format(string, sizeof(string), "{00FF00}Airbreak punish = {FF0000}%s\n{00FF00}Vehicle Tune punish = {FF0000}%s\n{00FF00}Speed Hack punish = {FF0000}%s\n{00FF00}Aimbot punish = {FF0000}%s\n{00FF00}Godmode punish = {FF0000}%s\n", status5, status1, status2, status3, status4);
  1056.             ShowPlayerDialog(playerid, DIALOG_MAIN2, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
  1057.         }
  1058.         return 1;
  1059.     }
  1060.     if(dialogid == DIALOG_VTUNEC)
  1061.     {
  1062.         if(response)
  1063.         {
  1064.             new status[32];
  1065.             if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
  1066.             ACInfo[vTuneC] = strlen(inputtext);
  1067.             if(strlen(inputtext) == 0) { status = "Kick"; }
  1068.             else if(strlen(inputtext) == 1) { status = "Message to admins"; }
  1069.             format(string, sizeof(string), "Anticheat: When someone is suspicious: %s", status);
  1070.             SCM(playerid, COLOR_RED, string);
  1071.         }
  1072.         else
  1073.         {
  1074.             format(string, sizeof(string), "{00FF00}Airbreak punish = {FF0000}%s\n{00FF00}Vehicle Tune punish = {FF0000}%s\n{00FF00}Speed Hack punish = {FF0000}%s\n{00FF00}Aimbot punish = {FF0000}%s\n{00FF00}Godmode punish = {FF0000}%s\n", status5, status1, status2, status3, status4);
  1075.             ShowPlayerDialog(playerid, DIALOG_MAIN2, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
  1076.         }
  1077.         return 1;
  1078.     }
  1079.     if(dialogid == DIALOG_SPEEDC)
  1080.     {
  1081.         if(response)
  1082.         {
  1083.             new status[32];
  1084.             if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
  1085.             ACInfo[SpeedCheatC] = strlen(inputtext);
  1086.             if(strlen(inputtext) == 0) { status = "Kick"; }
  1087.             else if(strlen(inputtext) == 1) { status = "Message to admins"; }
  1088.             format(string, sizeof(string), "Anticheat: When someone is suspicious: %s", status);
  1089.             SCM(playerid, COLOR_RED, string);
  1090.         }
  1091.         else
  1092.         {
  1093.             format(string, sizeof(string), "{00FF00}Airbreak punish = {FF0000}%s\n{00FF00}Vehicle Tune punish = {FF0000}%s\n{00FF00}Speed Hack punish = {FF0000}%s\n{00FF00}Aimbot punish = {FF0000}%s\n{00FF00}Godmode punish = {FF0000}%s\n", status5, status1, status2, status3, status4);
  1094.             ShowPlayerDialog(playerid, DIALOG_MAIN2, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
  1095.         }
  1096.         return 1;
  1097.     }
  1098.     if(dialogid == DIALOG_AIMC)
  1099.     {
  1100.         if(response)
  1101.         {
  1102.             new status[32];
  1103.             if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
  1104.             ACInfo[AimScriptC] = strlen(inputtext);
  1105.             if(strlen(inputtext) == 0) { status = "Kick"; }
  1106.             else if(strlen(inputtext) == 1) { status = "Message to admins"; }
  1107.             format(string, sizeof(string), "Anticheat: When someone is suspicious: %s", status);
  1108.             SCM(playerid, COLOR_RED, string);
  1109.         }
  1110.         else
  1111.         {
  1112.             format(string, sizeof(string), "{00FF00}Airbreak punish = {FF0000}%s\n{00FF00}Vehicle Tune punish = {FF0000}%s\n{00FF00}Speed Hack punish = {FF0000}%s\n{00FF00}Aimbot punish = {FF0000}%s\n{00FF00}Godmode punish = {FF0000}%s\n", status5, status1, status2, status3, status4);
  1113.             ShowPlayerDialog(playerid, DIALOG_MAIN2, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
  1114.         }
  1115.         return 1;
  1116.     }
  1117.     if(dialogid == DIALOG_GODMODEC)
  1118.     {
  1119.         if(response)
  1120.         {
  1121.             new status[32];
  1122.             if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
  1123.             ACInfo[GodModeC] = strlen(inputtext);
  1124.             if(strlen(inputtext) == 0) { status = "Kick"; }
  1125.             else if(strlen(inputtext) == 1) { status = "Message to admins"; }
  1126.             format(string, sizeof(string), "Anticheat: When someone is suspicious: %s", status);
  1127.             SCM(playerid, COLOR_RED, string);
  1128.         }
  1129.         else
  1130.         {
  1131.             format(string, sizeof(string), "{00FF00}Airbreak punish = {FF0000}%s\n{00FF00}Vehicle Tune punish = {FF0000}%s\n{00FF00}Speed Hack punish = {FF0000}%s\n{00FF00}Aimbot punish = {FF0000}%s\n{00FF00}Godmode punish = {FF0000}%s\n", status5, status1, status2, status3, status4);
  1132.             ShowPlayerDialog(playerid, DIALOG_MAIN2, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
  1133.         }
  1134.         return 1;
  1135.     }
  1136.     switch(dialogid)
  1137.     {
  1138.         case DIALOG_REGISTER:
  1139.         {
  1140.             if (!response) return Kick(playerid);
  1141.             if(response)
  1142.             {
  1143.                 if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registering","{FF0000}This password is invalid.\n{00FF00}Please, enter valid password to register your account.","Register","Exit");
  1144.                 new INI:File = INI_Open(UserPath(playerid));
  1145.                 INI_SetTag(File,"data");
  1146.                 INI_WriteInt(File,"Password",udb_hash(inputtext));
  1147.                 INI_Close(File);
  1148.                 SetPlayerColor(playerid, COLOR_GREEN);
  1149.                 SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
  1150.                 SpawnPlayer(playerid);
  1151.                 GivePlayerMoney(playerid, 5000);
  1152.             }
  1153.         }
  1154.         case DIALOG_LOGIN:
  1155.         {
  1156.             if (!response) return Kick ( playerid );
  1157.             if(response)
  1158.             {
  1159.                 if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
  1160.                 {
  1161.                     INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  1162.                     GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  1163.                     SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
  1164.                     SetPlayerColor(playerid, COLOR_GREEN);
  1165.                     SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
  1166.                     SpawnPlayer(playerid);
  1167.                 }
  1168.                 else
  1169.                 {
  1170.                     if(LogAttemps[playerid] < 3)
  1171.                     {
  1172.                         LogAttemps[playerid]++;
  1173.                         format(string, sizeof(string), "{FF0000}You have entered wrong password.\nYou have {00FF00}%d {FF0000}attempts to enter your password.", 3-LogAttemps[playerid]);
  1174.                         ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Logging",string,"Login","Exit");
  1175.                     }
  1176.                     else if(LogAttemps[playerid] == 3) return Kick(playerid);
  1177.                 }
  1178.                 return 1;
  1179.             }
  1180.         }
  1181.         case DIALOG_PMENU:
  1182.         {
  1183.             if(response)
  1184.             {
  1185.                 if(listitem == 0)
  1186.                 {
  1187.                     ShowPlayerDialog(playerid, DIALOG_MADMIN, DIALOG_STYLE_INPUT, "Set admin level", "Enter the level you want to apply.", "Set", "Exit");
  1188.                 }
  1189.                 if(listitem == 1)
  1190.                 {
  1191.                     new kname[256];
  1192.                     format(kname, 256, "Are you sure u want to kick %s?", GetName(GetPVarInt(playerid,"pplayerid")));
  1193.                     ShowPlayerDialog(playerid, DIALOG_PKICK, DIALOG_STYLE_MSGBOX, "Kicking player", kname, "Kick", "Exit");
  1194.                 }
  1195.                 if(listitem == 2)
  1196.                 {
  1197.                     new kname[256];
  1198.                     format(kname, 256, "Are you sure u want to ban %s?", GetName(GetPVarInt(playerid,"pplayerid")));
  1199.                     ShowPlayerDialog(playerid, DIALOG_PBAN, DIALOG_STYLE_MSGBOX, "Banning player", kname, "Ban", "Exit");
  1200.                 }
  1201.                 if(listitem == 3)
  1202.                 {
  1203.                     new kname[256];
  1204.                     format(kname, 256, "Choose reason to mute %s:\n1.Spamming, 2.Swearing, 3.Spamming & swearing\n4.Advertising,", GetName(GetPVarInt(playerid,"pplayerid")));
  1205.                     ShowPlayerDialog(playerid, DIALOG_PMUTE, DIALOG_STYLE_INPUT, "Muting player", kname, "Mute", "Exit");
  1206.                 }
  1207.                 if(listitem == 4)
  1208.                 {
  1209.                     PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMutedTime] = 0;
  1210.                     PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMuted] = 0;
  1211.                     format(string, sizeof(string), "ADMIN: %s unmuted %s.", GetName(playerid), GetName(GetPVarInt(playerid,"pplayerid")));
  1212.                     SCMToAll(COLOR_GREEN, string);
  1213.                 }
  1214.                 return 1;
  1215.             }
  1216.         }
  1217.         case DIALOG_MADMIN:
  1218.         {
  1219.             if(response)
  1220.             {
  1221.                 if(strval(inputtext) < 0 || strval(inputtext) > 5) return SCM(playerid, COLOR_YELLOW, "ERROR: Admin levels are from 1 to 5.");
  1222.                 PlayerInfo[GetPVarInt(playerid,"pplayerid")][pAdmin] = strval(inputtext);
  1223.                 format(string, 256, "ADMIN: %s gave %d admin level to %s.", GetName(playerid), PlayerInfo[GetPVarInt(playerid,"pplayerid")][pAdmin], GetName(GetPVarInt(playerid,"pplayerid")));
  1224.                 SCMToAll(COLOR_YELLOW, string);
  1225.                 SetPVarInt(playerid,"pplayerid",999);
  1226.                 return 1;
  1227.             }
  1228.         }
  1229.         case DIALOG_PKICK:
  1230.         {
  1231.             if(response)
  1232.             {
  1233.                 Kick(GetPVarInt(playerid,"pplayerid"));
  1234.                 format(string, 256, "ADMIN: %s kicked %s from the server.", GetName(playerid), GetName(GetPVarInt(playerid,"pplayerid")));
  1235.                 SCMToAll(COLOR_YELLOW, string);
  1236.                 SetPVarInt(playerid,"pplayerid",999);
  1237.                 return 1;
  1238.             }
  1239.         }
  1240.         case DIALOG_PBAN:
  1241.         {
  1242.             if(response)
  1243.             {
  1244.                 Ban(GetPVarInt(playerid,"pplayerid"));
  1245.                 format(string, 256, "ADMIN: %s banned %s from the server.", GetName(playerid), GetName(GetPVarInt(playerid,"pplayerid")));
  1246.                 SCMToAll(COLOR_YELLOW, string);
  1247.                 SetPVarInt(playerid,"pplayerid",999);
  1248.                 return 1;
  1249.             }
  1250.         }
  1251.         case DIALOG_PMUTE:
  1252.         {
  1253.             if(response)
  1254.             {
  1255.                 if(strlen(inputtext) < 1 || strlen(inputtext) > 4) return SCM(playerid,COLOR_LIGHTRED,"Options are from 1 to 4.");
  1256.                 if(strlen(inputtext) == 1)
  1257.                 {
  1258.                     format(string, sizeof(string), "ADMIN: %s was muted by %s for 30 minutes.Reason: Spamming", GetName(GetPVarInt(playerid,"pplayerid")), GetName(playerid));
  1259.                     PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMutedTime] = 30*60;
  1260.                     SCMToAll(COLOR_LIGHTRED, string);
  1261.                     PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMuted] = 1;
  1262.                     SetPVarInt(playerid,"pplayerid",999);
  1263.                 }
  1264.                 if(strlen(inputtext) == 2)
  1265.                 {
  1266.                     format(string, sizeof(string), "ADMIN: %s was muted by %s for 60 minutes.Reason: Swearing",  GetName(GetPVarInt(playerid,"pplayerid")), GetName(playerid));
  1267.                     PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMutedTime] = 60*60;
  1268.                     SCMToAll(COLOR_LIGHTRED, string);
  1269.                     PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMuted] = 1;
  1270.                     SetPVarInt(playerid,"pplayerid",999);
  1271.                 }
  1272.                 if(strlen(inputtext) == 3)
  1273.                 {
  1274.                     format(string, sizeof(string), "ADMIN: %s was muted by %s for 90 minutes.Reason: Spamming and swearing", GetName(GetPVarInt(playerid,"pplayerid")), GetName(playerid));
  1275.                     PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMutedTime] = 90*60;
  1276.                     SCMToAll(COLOR_LIGHTRED, string);
  1277.                     PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMuted] = 1;
  1278.                     SetPVarInt(playerid,"pplayerid",999);
  1279.                 }
  1280.                 if(strlen(inputtext) == 4)
  1281.                 {
  1282.                     format(string, sizeof(string), "ADMIN: %s was muted by %s for 120 minutes.Reason: Advertising", GetName(GetPVarInt(playerid,"pplayerid")), GetName(playerid));
  1283.                     PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMutedTime] = 120*60;
  1284.                     SCMToAll(COLOR_LIGHTRED, string);
  1285.                     PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMuted] = 1;
  1286.                     SetPVarInt(playerid,"pplayerid",999);
  1287.                 }
  1288.                 return 1;
  1289.             }
  1290.         }
  1291.     }
  1292.     return 1;
  1293. }
  1294.  
  1295. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  1296. {
  1297.     if(IsPlayerAdmin(playerid))
  1298.     {
  1299.         ShowPlayerDialog(playerid, DIALOG_PMENU, DIALOG_STYLE_LIST, GetName(clickedplayerid), "Set admin level\nKick\nBan\nMute\nUnMute", "Choose", "Exit");
  1300.         SetPVarInt(playerid,"pplayerid",clickedplayerid);
  1301.         return 1;
  1302.     }
  1303.     return 1;
  1304. }
  1305.  
  1306. public SendAdminMessage(color, text[])
  1307. {
  1308.     foreach(new i : Player)
  1309.     {
  1310.         if(PlayerInfo[i][pAdmin] > 0)
  1311.         {
  1312.             SCM(i, color, text);
  1313.         }
  1314.     }
  1315.     return 1;
  1316. }
  1317.  
  1318. public OnPlayerStartAim(playerid,aimedplayer)
  1319. {
  1320.     new string[256];
  1321.     if(ACInfo[AimScriptC] == 0)
  1322.     {
  1323.         format(string, sizeof(string), "Anticheat: %s(ID: %d) has been kicked from the server.Reason: Aimbot", GetName(playerid), playerid);
  1324.         SCMToAll(COLOR_RED, string);
  1325.         Kick(playerid);
  1326.     }
  1327.     else
  1328.     {
  1329.         format(string, sizeof(string), "Anticheat: %s(ID: %d) is using Aimbot.Please, check him.", GetName(playerid), playerid);
  1330.         SendAdminMessage(COLOR_RED, string);
  1331.     }
  1332.     return 1;
  1333. }
  1334.  
  1335. public OnPlayerAirbreak(playerid)
  1336. {
  1337.     if(ACInfo[Airbreak] == 1)
  1338.     {
  1339.         if(PlayerInfo[playerid][pAduty] == 0)
  1340.         {
  1341.             new string[128];
  1342.             if(ACInfo[AirbreakC] == 0)
  1343.             {
  1344.                 format(string, sizeof(string), "Anticheat: %s(ID: %d) has been kicked from the server.Reason: Airbreak Detected", GetName(playerid), playerid);
  1345.                 SCMToAll(COLOR_RED, string);
  1346.                 Kick(playerid);
  1347.             }
  1348.             else
  1349.             {
  1350.                 format(string, sizeof(string), "Anticheat: %s(ID: %d) is using Airbreak.Please, check him.", GetName(playerid), playerid);
  1351.                 SendAdminMessage(COLOR_RED, string);
  1352.             }
  1353.         }
  1354.         return 1;
  1355.     }
  1356.     return 1;
  1357. }
  1358.  
  1359. public PlayerSpeed(playerid)
  1360. {
  1361.     if(ACInfo[SpeedCheat] == 1)
  1362.     {
  1363.         if(GetPlayerSpeed(playerid) > 350)
  1364.         {
  1365.             new string[256];
  1366.             if(ACInfo[SpeedCheatC] == 0)
  1367.             {
  1368.                 format(string, sizeof(string), "Anticheat: %s(ID: %d) has been kicked from the server.Reason: Speed Hack", GetName(playerid), playerid);
  1369.                 SCMToAll(COLOR_RED, string);
  1370.                 Kick(playerid);
  1371.             }
  1372.             else
  1373.             {
  1374.                 format(string, sizeof(string), "Anticheat: %s(ID: %d) is using Speed Hack.Please, check him.", GetName(playerid), playerid);
  1375.                 SendAdminMessage(COLOR_RED, string);
  1376.             }
  1377.         }
  1378.     }
  1379.     return 1;
  1380. }
  1381.  
  1382. public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
  1383. {
  1384.     if(ACInfo[GodMode] == 1)
  1385.     {
  1386.         if(PlayerInfo[playerid][pAdmin] < 1)
  1387.         {
  1388.             if(playerid != INVALID_PLAYER_ID)
  1389.             {
  1390.                 if(Godmode[playerid] == 0)
  1391.                 {
  1392.                     if(amount == 0)
  1393.                     {
  1394.                         new string[256];
  1395.                         if(ACInfo[GodModeC] == 0)
  1396.                         {
  1397.                             format(string, sizeof(string), "Anticheat: %s(ID: %d) has been kicked from the server.Reason: God mode", GetName(playerid), playerid);
  1398.                             SCMToAll(COLOR_RED, string);
  1399.                             Kick(playerid);
  1400.                         }
  1401.                         else
  1402.                         {
  1403.                             format(string, sizeof(string), "Anticheat: %s(ID: %d) is using God mode.Please, check him.", GetName(playerid), playerid);
  1404.                             SendAdminMessage(COLOR_RED, string);
  1405.                         }
  1406.                     }
  1407.                 }
  1408.             }
  1409.         }
  1410.     }
  1411.     return 1;
  1412. }
  1413.  
  1414. public GeneralTimer()
  1415. {
  1416.     new string[256];
  1417.     foreach(new i : Player)
  1418.     {
  1419.         if(IsPlayerConnected(i))
  1420.         {
  1421.             if(PlayerInfo[i][pMutedTime] > 0)
  1422.             {
  1423.                 if(PlayerInfo[i][pMutedTime] > 0)
  1424.                 {
  1425.                     PlayerInfo[i][pMutedTime]--;
  1426.                 }
  1427.                 if(PlayerInfo[i][pMutedTime] <= 0)
  1428.                 {
  1429.                     PlayerInfo[i][pMuted] = 0;
  1430.                     format(string, sizeof(string), "ADMIN: %s was unmuted by the SERVER, Reason: Time Out", GetName(i));
  1431.                     SCMToAll(COLOR_GREEN, string);
  1432.                 }
  1433.             }
  1434.             if(PlayerInfo[i][pReportmute] > 0)
  1435.             {
  1436.                 if(PlayerInfo[i][pReportmute] > 0)
  1437.                 {
  1438.                     PlayerInfo[i][pReportmute]--;
  1439.                 }
  1440.                 if(PlayerInfo[i][pReportmute] <= 0)
  1441.                 {
  1442.                     PlayerInfo[i][pReportmute] = 0;
  1443.                     SCM(i, COLOR_GREEN, "ADMIN: You are now 'Report' unmuted by the SERVER, Reason: Time Out");
  1444.                 }
  1445.             }
  1446.         }
  1447.     }
  1448.     return 1;
  1449. }
  1450.  
  1451. public AutoCarFixer(playerid)
  1452. {
  1453.     new Float:hp;
  1454.     new vehi = GetPlayerVehicleID(playerid);
  1455.     GetVehicleHealth(vehi, hp);
  1456.     if(hp <= 850)
  1457.     {
  1458.         RepairVehicle(vehi);
  1459.     }
  1460.     return 1;
  1461. }
  1462.  
  1463. public DelayedKick(playerid)
  1464. {
  1465.     Kick(playerid);
  1466. }
  1467.  
  1468. public settime(playerid)
  1469. {
  1470.     new string[256],hours, minutes, seconds;
  1471.     gettime(hours, minutes, seconds);
  1472.     format(string, sizeof string, "~w~%s%d:~g~%s%d:~r~%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
  1473.     TextDrawSetString(Textdraw1, string);
  1474. }
  1475.  
  1476. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  1477. {
  1478.     if(!success) return SCM(playerid, COLOR_ERROR, "SERVER: Unknown command.Please, use /cmds to see all available commands.");
  1479.     return 1;
  1480. }
  1481.  
  1482. public SaveBusiness(id)
  1483. {
  1484.     new file4[40];
  1485.     format(file4, sizeof(file4), BPATH, id);
  1486.     new INI:File = INI_Open(file4);
  1487.     INI_SetTag(File,"data");
  1488.     INI_WriteString(File,"bOwner", BusinessInfo[id][bOwner]);
  1489.     INI_WriteString(File,"bName", BusinessInfo[id][bName]);
  1490.     INI_WriteInt(File,"bOwned", BusinessInfo[id][bOwned]);
  1491.     INI_WriteInt(File,"bPrice", BusinessInfo[id][bPrice]);
  1492.     INI_WriteInt(File,"bType", BusinessInfo[id][bType]);
  1493.     INI_WriteInt(File,"bLocked", BusinessInfo[id][bLocked]);
  1494.     INI_WriteFloat(File,"bEntranceX", BusinessInfo[id][bEntranceX]);
  1495.     INI_WriteFloat(File,"bEntranceY", BusinessInfo[id][bEntranceY]);
  1496.     INI_WriteFloat(File,"bEntranceZ", BusinessInfo[id][bEntranceZ]);
  1497.     INI_WriteFloat(File,"bEntranceA", BusinessInfo[id][bEntranceA]);
  1498.     INI_WriteFloat(File,"bExitX", BusinessInfo[id][bExitX]);
  1499.     INI_WriteFloat(File,"bExitY", BusinessInfo[id][bExitY]);
  1500.     INI_WriteFloat(File,"bExitZ", BusinessInfo[id][bExitZ]);
  1501.     INI_WriteFloat(File,"bExitA", BusinessInfo[id][bExitA]);
  1502.     INI_WriteInt(File,"bInt", BusinessInfo[id][bInt]);
  1503.     INI_WriteInt(File,"bWorld", BusinessInfo[id][bWorld]);
  1504.     INI_WriteInt(File,"bInsideInt", BusinessInfo[id][bInsideInt]);
  1505.     INI_WriteInt(File,"bInsideWorld", BusinessInfo[id][bInsideWorld]);
  1506.     INI_WriteInt(File,"bLevel", BusinessInfo[id][bLevel]);
  1507.     INI_WriteInt(File,"bPay", BusinessInfo[id][bPay]);
  1508.     INI_Close(File);
  1509.     return 1;
  1510. }
  1511.  
  1512. public loadbiz_data(idx, name[], value[])
  1513. {
  1514.     INI_String("bOwner", BusinessInfo[idx][bOwner], 32);
  1515.     INI_String("bName", BusinessInfo[idx][bName], 128);
  1516.     INI_Int("bOwned", BusinessInfo[idx][bOwned]);
  1517.     INI_Int("bPrice", BusinessInfo[idx][bPrice]);
  1518.     INI_Int("bType", BusinessInfo[idx][bType]);
  1519.     INI_Int("bLocked", BusinessInfo[idx][bLocked]);
  1520.     INI_Float("bEntranceX", BusinessInfo[idx][bEntranceX]);
  1521.     INI_Float("bEntranceY", BusinessInfo[idx][bEntranceY]);
  1522.     INI_Float("bEntranceZ", BusinessInfo[idx][bEntranceZ]);
  1523.     INI_Float("bEntranceA", BusinessInfo[idx][bEntranceA]);
  1524.     INI_Float("bExitX", BusinessInfo[idx][bExitX]);
  1525.     INI_Float("bExitY", BusinessInfo[idx][bExitY]);
  1526.     INI_Float("bExitZ", BusinessInfo[idx][bExitZ]);
  1527.     INI_Float("bExitA", BusinessInfo[idx][bExitA]);
  1528.     INI_Int("bInt", BusinessInfo[idx][bInt]);
  1529.     INI_Int("bWorld", BusinessInfo[idx][bWorld]);
  1530.     INI_Int("bInsideInt", BusinessInfo[idx][bInsideInt]);
  1531.     INI_Int("bInsideWorld", BusinessInfo[idx][bInsideWorld]);
  1532.     INI_Int("bLevel", BusinessInfo[idx][bLevel]);
  1533.     INI_Int("bPay", BusinessInfo[idx][bPay]);
  1534.     return 1;
  1535. }
  1536.  
  1537. function xReactionProgress()
  1538. {
  1539.     switch(xTestBusy)
  1540.     {
  1541.         case true:
  1542.         {
  1543.             new string[128];
  1544.             format(string, sizeof(string), "« No-one won the reaction-test. New one starting in %d minutes. »", (TIME/60000));
  1545.             SCMToAll(COLOR_LIGHTRED, string);
  1546.             xReactionTimer = SetTimer("xReactionTest", TIME, 1);
  1547.         }
  1548.     }
  1549.     return 1;
  1550. }
  1551.  
  1552. function xReactionTest()
  1553. {
  1554.         new xLength = (random(8) + 2), string[128];
  1555.         xCash = (random(10000) + 20000);
  1556.         xScore = (random(2)+1);
  1557.         format(xChars, sizeof(xChars), "");
  1558.         Loop(x, xLength) format(xChars, sizeof(xChars), "%s%s", xChars, xCharacters[random(sizeof(xCharacters))][0]);
  1559.         format(string, sizeof(string), "« Who first types %s wins $%d + %d score points. »", xChars, xCash, xScore);
  1560.         SCMToAll(COLOR_LIGHTRED, string);
  1561.         KillTimer(xReactionTimer);
  1562.         xTestBusy = true;
  1563.         SetTimer("xReactionProgress", 30000, 0);
  1564.         return 1;
  1565. }
  1566.  
  1567. public SpeedoUpdate()
  1568. {
  1569.     for(new i = 0;i<MAX_PLAYERS;i++)
  1570.     {
  1571.         if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
  1572.         {
  1573.             new Float:x,Float:y,Float:z,Float:hp,string[24],vehicleid = GetPlayerVehicleID(i);
  1574.             GetVehicleVelocity(vehicleid,x,y,z);
  1575.             GetVehicleHealth(vehicleid,hp);
  1576.             format(string,sizeof(string),"~w~ Speed: %d km/h",floatround(floatsqroot(((x*x)+(y*y))+(z*z))*181.5));
  1577.             TextDrawSetString(speed[i],string);
  1578.             format(string,sizeof(string),"~g~ Health: %d",floatround(hp));
  1579.             TextDrawSetString(health[i],string);
  1580.             TextDrawShowForPlayer(i,speed[i]);
  1581.             TextDrawShowForPlayer(i,health[i]);
  1582.         }
  1583.         if(!IsPlayerInAnyVehicle(i))
  1584.         {
  1585.             TextDrawHideForPlayer(i,speed[i]);
  1586.             TextDrawHideForPlayer(i,health[i]);
  1587.         }
  1588.     }
  1589. }
  1590.  
  1591. public CheckPlayerState(){
  1592.         new i,cs;
  1593.  
  1594.         for(i=0;i<=MAX_PLAYERS;i++){
  1595.             cs=GetPlayerState(i);
  1596.             if(DriftMode[i] && cs==PLAYER_STATE_DRIVER && DriftPointsNow[i]>70){
  1597.                 new Float:h;
  1598.                 GetVehicleHealth(GetPlayerVehicleID(i),h);
  1599.                 if(h<HealthInit[i]){
  1600.                         KillTimer(DriftTimer[i]);
  1601.                         DriftExit(i);
  1602.                         GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~r~Boom",800,5);
  1603.                         DriftMode[i]=false;
  1604.                         }
  1605.                 }
  1606.             if(cs==PLAYER_STATE_DRIVER && DriftMode[i]==false){
  1607.                 if(GetVType(GetPlayerVehicleID(i))){
  1608.                         DriftMode[i]=true;
  1609.                         GetVehicleHealth(GetPlayerVehicleID(i),HealthInit[i]);
  1610.                         AutoFixBool[i]=false;
  1611.                         DriftTimer[i]=SetTimerEx("Drift", 200, true, "i", i);
  1612.                         }
  1613.                 }
  1614.                 else if(cs!=PLAYER_STATE_DRIVER && DriftMode[i]==true){
  1615.                     KillTimer(DriftTimer[i]);
  1616.                     DriftMode[i]=false;
  1617.                     AutoFixBool[i]=true;
  1618.                 }
  1619.                 else{}
  1620.         }
  1621.         return 1;
  1622. }
  1623.  
  1624. public DriftExit(playerid){
  1625.         PlayerDriftCancellation[playerid] = 0;
  1626.  
  1627.         new Float:h;
  1628.         GetVehicleHealth(GetPlayerVehicleID(playerid),h);
  1629.         if(DriftPointsNow[playerid]>70 && DriftPointsNow[playerid]<10000 && h==HealthInit[playerid]) GivePlayerMoney(playerid,DriftPointsNow[playerid]*DriftBonus[playerid]);
  1630.         TextDrawHideForPlayer(playerid,TDLabels[0]);
  1631.         TextDrawHideForPlayer(playerid,TDLabels[1]);
  1632.         TextDrawHideForPlayer(playerid,TDLabels[2]);
  1633.         TextDrawHideForPlayer(playerid,TDValueDrift[playerid]);
  1634.         TextDrawHideForPlayer(playerid,TDValueBonus[playerid]);
  1635.         TextDrawHideForPlayer(playerid,TDValueCash[playerid]);
  1636.         DriftBonus[playerid]=1;
  1637.         AutoFixBool[playerid]=true;
  1638.         SetVehicleHealth(GetPlayerVehicleID(playerid),HealthInit[playerid]);
  1639.  
  1640.         DriftPointsNow[playerid] = 0;
  1641. }
  1642.  
  1643. Float:ReturnPlayerAngle(playerid){
  1644.         new Float:Ang;
  1645.         if(IsPlayerInAnyVehicle(playerid))GetVehicleZAngle(GetPlayerVehicleID(playerid), Ang); else GetPlayerFacingAngle(playerid, Ang);
  1646.         return Ang;
  1647. }
  1648.  
  1649. public Drift(){
  1650.         new Float:Angle1, Float:Angle2, Float:BySpeed;
  1651.         new Float:Z;
  1652.         new Float:X;
  1653.         new Float:Y;
  1654.         new Float:SpeedX;
  1655.         for(new g=0;g<200;g++){
  1656.                 GetPlayerPos(g, X, Y, Z);
  1657.                 SpeedX = floatsqroot(floatadd(floatadd(floatpower(floatabs(floatsub(X,SavedPos[ g ][ sX ])),2),floatpower(floatabs(floatsub(Y,SavedPos[ g ][ sY ])),2)),floatpower(floatabs(floatsub(Z,SavedPos[ g ][ sZ ])),2)));
  1658.                 Angle1 = ReturnPlayerAngle(g);
  1659.                 Angle2 = GetPlayerTheoreticAngle(g);
  1660.                 BySpeed = floatmul(SpeedX, 12);
  1661.                 if(IsPlayerInAnyVehicle(g) && GetVType(GetPlayerVehicleID(g)) && floatabs(floatsub(Angle1, Angle2)) > DRIFT_MINKAT && floatabs(floatsub(Angle1, Angle2)) < DRIFT_MAXKAT && BySpeed > DRIFT_SPEED){
  1662.                         if(PlayerDriftCancellation[g] > 0)KillTimer(PlayerDriftCancellation[g]);
  1663.                         PlayerDriftCancellation[g] = 0;
  1664.                         DriftPointsNow[g] += floatval( floatabs(floatsub(Angle1, Angle2)) * 3 * (BySpeed*0.1) )/10;
  1665.                         PlayerDriftCancellation[g] = SetTimerEx("DriftExit", 3000, 0, "d", g);
  1666.                 }
  1667.  
  1668.                 if(DriftPointsNow[g] > 70 && DriftPointsNow[g]<10000){
  1669.                     if(DriftPointsNow[g]<500)
  1670.                     {
  1671.                         DriftBonus[g]=1;
  1672.                     }
  1673.                     if(DriftPointsNow[g]>=500 && DriftPointsNow[g]<1000)
  1674.                     {
  1675.                         DriftBonus[g]=2;
  1676.                     }
  1677.                     if(DriftPointsNow[g]>=1000 && DriftPointsNow[g]<1700)
  1678.                     {
  1679.                         DriftBonus[g]=3;
  1680.                     }
  1681.                     if(DriftPointsNow[g]>=1700 && DriftPointsNow[g]<2500)
  1682.                     {
  1683.                         DriftBonus[g]=4;
  1684.                     }
  1685.                     if(DriftPointsNow[g]>=2500)
  1686.                     {
  1687.                         DriftBonus[g]=5;
  1688.                     }
  1689.  
  1690.                     TextDrawShowForPlayer(g,TDLabels[0]);
  1691.                     TextDrawShowForPlayer(g,TDLabels[1]);
  1692.                     TextDrawShowForPlayer(g,TDLabels[2]);
  1693.  
  1694.                     TextDrawShowForPlayer(g,TDValueDrift[g]);
  1695.                     TextDrawShowForPlayer(g,TDValueBonus[g]);
  1696.                     TextDrawShowForPlayer(g,TDValueCash[g]);
  1697.  
  1698.                     new DPs[128],DBn[128],Cash[128],csh;
  1699.  
  1700.                     valstr(DPs,DriftPointsNow[g],false);
  1701.                     format(DBn,sizeof(DBn),"X%i",DriftBonus[g]);
  1702.                     csh=DriftPointsNow[g]*DriftBonus[g];
  1703.                     format(Cash,sizeof(Cash),"$%i",csh);
  1704.  
  1705.                     TextDrawSetString(TDValueDrift[g],DPs);
  1706.                     TextDrawSetString(TDValueBonus[g],DBn);
  1707.                     TextDrawSetString(TDValueCash[g],Cash);
  1708.                 }
  1709.                 SavedPos[ g ][ sX ] = X;
  1710.                 SavedPos[ g ][ sY ] = Y;
  1711.                 SavedPos[ g ][ sZ ] = Z;
  1712.         }
  1713. }
  1714.  
  1715. public AngleUpdate(){
  1716.         for(new g=0;g<=MAX_PLAYERS;g++){
  1717.                 new Float:x, Float:y, Float:z;
  1718.                 if(IsPlayerInAnyVehicle(g))GetVehiclePos(GetPlayerVehicleID(g), x, y, z); else GetPlayerPos(g, x, y, z);
  1719.                 ppos[g][0] = x;
  1720.                 ppos[g][1] = y;
  1721.                 ppos[g][2] = z;
  1722.         }
  1723. }
  1724.  
  1725. //Player commands
  1726.  
  1727. CMD:helpme(playerid, params[])
  1728. {
  1729.     new string[128], text[48];
  1730.     if(sscanf(params, "s[48]", text)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /helpme [Text]");
  1731.     format(string,sizeof(string),"HelpME: %s(ID: %d) asked: %s", GetName(playerid), playerid, text);
  1732.     SendAdminMessage(COLOR_YELLOW, string);
  1733.     return 1;
  1734. }
  1735.  
  1736. CMD:cmds(playerid, params[])
  1737. {
  1738.     new String[2048];
  1739.     strins(String,"\n",strlen(String));
  1740.     strins(String,"{FFFFFF}/helpme - sending question to all ONLINE admins.\n",strlen(String));
  1741.     strins(String,"{FFFFFF}/parkour - teleporting to parkour arena.\n",strlen(String));
  1742.     strins(String,"{FFFFFF}/drift - teleporting to drift arena.\n",strlen(String));
  1743.     strins(String,"{FFFFFF}/admins - showing all online admins.\n",strlen(String));
  1744.     strins(String,"{FFFFFF}/report - sending report for player to admins.\n",strlen(String));
  1745.     strins(String,"{FFFFFF}/buybiz - buying a business.\n",strlen(String));
  1746.     strins(String,"{FFFFFF}/glasstunel - teleporting to glass tunel.\n",strlen(String));
  1747.     strins(String,"{FFFFFF}/joindm - joining DM arena.\n",strlen(String));
  1748.     strins(String,"{FFFFFF}/leavedm - leaving DM arena.\n",strlen(String));
  1749.     strins(String,"{FFFFFF}/veh - spawning vehicle for you.\n",strlen(String));
  1750.     strins(String,"\n",strlen(String));
  1751.     ShowPlayerDialog(playerid, 5679, DIALOG_STYLE_MSGBOX, "Player commands", String, "Close", "");
  1752.     return 1;
  1753. }
  1754.  
  1755. CMD:report(playerid, params[])
  1756. {
  1757.     new string[256], targetid, text[128];
  1758.     if(PlayerInfo[playerid][pReportmute] > 0) return SCM(playerid, COLOR_ERROR, "You are 'Report' muted.");
  1759.     if(sscanf(params, "rs[128]", targetid, text)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /report [PlayerID][Reason]");
  1760.     if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
  1761.     foreach(new i : Player)
  1762.     {
  1763.         if(PlayerInfo[i][pAdmin] > 0)
  1764.         format(string, sizeof(string), "REPORT: %s reported %s for: %s", GetName(playerid), GetName(targetid), text);
  1765.         SCMToAll(COLOR_YELLOW, string);
  1766.     }
  1767.     return 1;
  1768. }
  1769.  
  1770. CMD:buybiz(playerid, params[])
  1771. {
  1772.     new id = IsPlayerNearBizEnt(playerid), pmoney;
  1773.     if(id == -1 || id == 0) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~You are not near a biz", 3000, 4);
  1774.     if(BusinessInfo[id][bOwned] != 0 || BusinessInfo[id][bPrice] == 0) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~This biz is not for sale.", 3000, 4);
  1775.     if(PlayerInfo[playerid][BizID] != 0) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~You already own a biz.", 3000, 4);
  1776.     pmoney = GetPlayerMoney(playerid);
  1777.     if(pmoney < BusinessInfo[id][bPrice]) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~Sorry, you can not afford this biz.", 3000, 4);
  1778.  
  1779.     PlayerInfo[playerid][BizID] = id;
  1780.     PlayerInfo[playerid][pCash] -= BusinessInfo[id][bPrice];
  1781.     GivePlayerMoney(playerid, -BusinessInfo[id][bPrice]);
  1782.  
  1783.     BusinessInfo[id][bLocked] = 0;
  1784.     BusinessInfo[id][bOwned] = 1;
  1785.     BusinessInfo[id][bOwner] = GetName(playerid);
  1786.  
  1787.     SendClientMessage(playerid, COLOR_GREEN, "Congratulations on your new biz! Use /bizhelp to get help, or /helpme!");
  1788.     return 1;
  1789. }
  1790.  
  1791. CMD:admins(playerid,params[])
  1792. {
  1793.     if(IsPlayerConnected(playerid))
  1794.     {
  1795.         new string[256], count = 0, status[32], sendername[MAX_PLAYER_NAME];
  1796.         foreach(new i : Player)
  1797.         {
  1798.             if(IsPlayerConnected(i))
  1799.             {
  1800.                 if(PlayerInfo[i][pAdmin] > 0)
  1801.                 {
  1802.                     if(PlayerInfo[i][pAduty] == 0) { status = "{FF0000}Off-Duty"; }
  1803.                     else if(PlayerInfo[i][pAduty] == 1) { status = "{00FF00}On-Duty"; }
  1804.                     GetPlayerName(i, sendername, sizeof(sendername));
  1805.                     format(string, 256, "%s {00CCFF}Level %d: {FFFFFF}%s (ID: %d) Status: %s \n", string, PlayerInfo[i][pAdmin], sendername, i, status);
  1806.                     count++;
  1807.                 }
  1808.             }
  1809.         }
  1810.         if(count >= 1) { ShowPlayerDialog(playerid, 21323123, DIALOG_STYLE_MSGBOX, "Online admins", string, "Close", ""); }
  1811.         else { SCM(playerid, COLOR_ERROR, "There aren't any online admins."); }
  1812.     }
  1813.     return 1;
  1814. }
  1815.  
  1816. CMD:veh(playerid, params[])
  1817. {
  1818.     new vehicle, Float:CarToX, Float:CarToY, Float:CarToZ, car, color1, color2;
  1819.     if(sscanf(params, "iii", vehicle, color1, color2)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /veh [VehicleID(400-611)][Color1][Color2]");
  1820.     if(IsValidCar(vehicle) == 0) return SCM(playerid, COLOR_ERROR, "You can't spawn that vehicle.");
  1821.     if(color1 < 0 || color1 > 252) return SCM(playerid, COLOR_RED, "Wrong color1 ID (min: 0 max: 252)");
  1822.     if(color2 < 0 || color2 > 252) return SCM(playerid, COLOR_RED, "Wrong color2 ID (min: 0 max: 252)");
  1823.     GetPlayerPos(playerid, CarToX, CarToY, CarToZ);
  1824.     car = CreateVehicle(vehicle, CarToX, CarToY+4, CarToZ, 90, color1, color2, -1);
  1825.     LinkVehicleToInterior(car, GetPlayerInterior(playerid));
  1826.     SetVehicleVirtualWorld(car, GetPlayerVirtualWorld(playerid));
  1827.     PutPlayerInVehicle(playerid, car, 0);
  1828.     SCM(playerid, COLOR_GREEN, "You spawned vehicle for you.");
  1829.     return 1;
  1830. }
  1831.  
  1832. CMD:parkour(playerid, params[])
  1833. {
  1834.     new arenan;
  1835.     if(sscanf(params, "i", arenan)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /parkour [Arena(1-3)]");
  1836.     if(arenan < 1 || arenan > 3) return SCM(playerid, COLOR_LIGHTRED, "Parkour arenas are from 1 to 3.");
  1837.     if(arenan == 1)
  1838.     {
  1839.         SetPlayerPos(playerid, -3404.9995, 1569.8923, 18.5673);
  1840.         SCM(playerid, COLOR_YELLOW, "You have been teleported to parkour arena 1.");
  1841.     }
  1842.     else if(arenan == 2)
  1843.     {
  1844.         SetPlayerPos(playerid, -812.9838, -2149.4014, 152.2032);
  1845.         SCM(playerid, COLOR_YELLOW, "You have been teleported to parkour arena 2.");
  1846.     }
  1847.     else if(arenan == 3)
  1848.     {
  1849.         SetPlayerPos(playerid, 1475.7789, -1346.7761, 164.0319);
  1850.         SCM(playerid, COLOR_YELLOW, "You have been teleported to parkour arena 3.");
  1851.     }
  1852.     return 1;
  1853. }
  1854.  
  1855. CMD:drift(playerid, params[])
  1856. {
  1857.     new drifta;
  1858.     if(sscanf(params, "i", drifta)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /drift [Track(1-2)]");
  1859.     if(drifta < 1 || drifta > 2) return SCM(playerid, COLOR_LIGHTRED, "Drift tracks are from 1 to 2.");
  1860.     if(drifta == 1)
  1861.     {
  1862.         SetPlayerPos(playerid, 1339.9473, 1577.5769, 10.5474);
  1863.         SCM(playerid, COLOR_YELLOW, "You have been teleported to drift track 1.");
  1864.     }
  1865.     else if(drifta == 2)
  1866.     {
  1867.         SetPlayerPos(playerid, -311.9832,1536.7848,75.5625);
  1868.         SCM(playerid, COLOR_YELLOW, "You have been teleported to drift track 2.");
  1869.     }
  1870.     return 1;
  1871. }
  1872.  
  1873. CMD:glasstunel(playerid,params[])
  1874. {
  1875.     new tunel;
  1876.     if(sscanf(params, "i", tunel)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /glasstunel [Tunel(1-1)]");
  1877.     if(tunel < 1 || tunel > 1) return SCM(playerid, COLOR_LIGHTRED, "Glass tunels are from 1 to 1.");
  1878.     if(tunel == 1)
  1879.     {
  1880.         SetPlayerPos(playerid, 2083.1738, 1399.0817, 10.8203);
  1881.         SetPlayerFacingAngle(playerid, 267.6060);
  1882.         SCM(playerid, COLOR_YELLOW, "You have been teleported to glass tunel 1.");
  1883.     }
  1884.     return 1;
  1885. }
  1886.  
  1887. CMD:joindm(playerid, params[])
  1888. {
  1889.     new dmarena;
  1890.     if(InDM[playerid] != 0) return SCM(playerid, COLOR_ERROR, "You must leave this arena to join another.");
  1891.     if(sscanf(params, "i", dmarena))
  1892.     {
  1893.         SCM(playerid, COLOR_LIGHTRED, "Usage: /joindm [Arena(1-2)]");
  1894.         SCM(playerid, COLOR_YELLOW, "Types: 1.Minigun , 2.Random weapon");
  1895.         return 1;
  1896.     }
  1897.     if(dmarena < 1 || dmarena > 2) return SCM(playerid, COLOR_LIGHTRED, "Deathmatch arenas are from 1 to 2.");
  1898.     if(dmarena == 1)
  1899.     {
  1900.         SetPlayerInterior(playerid, 1);
  1901.         SetPlayerVirtualWorld(playerid, 22);
  1902.         SetPlayerPos(playerid, 1412.639892, -1.787510, 1000.924377);
  1903.         SetPlayerHealth(playerid, 100);
  1904.         SetPlayerArmour(playerid, 100);
  1905.         ResetPlayerWeapons(playerid);
  1906.         InDM[playerid] = 1;
  1907.         GivePlayerWeapon(playerid, 38, 50000);
  1908.         SCM(playerid, COLOR_GREEN, "DM: You joined minigun arena.You can leave it with /leavedm.");
  1909.     }
  1910.     else if(dmarena == 2)
  1911.     {
  1912.         SetPlayerInterior(playerid, 1);
  1913.         SetPlayerVirtualWorld(playerid, 23);
  1914.         SetPlayerPos(playerid, 1412.639892, -1.787510, 1000.924377);
  1915.         SetPlayerHealth(playerid, 100);
  1916.         SCM(playerid, COLOR_GREEN, "DM: You joined random weapon arena.You can leave it with /leavedm.");
  1917.         ResetPlayerWeapons(playerid);
  1918.         InDM[playerid] = 2;
  1919.         switch(random(9))
  1920.         {
  1921.             case 0:
  1922.             {
  1923.                 GivePlayerWeapon(playerid, 4, 1);
  1924.             }
  1925.             case 1:
  1926.             {
  1927.                 GivePlayerWeapon(playerid, 12, 1);
  1928.             }
  1929.             case 2:
  1930.             {
  1931.                 GivePlayerWeapon(playerid, 16, 50000);
  1932.             }
  1933.             case 3:
  1934.             {
  1935.                 GivePlayerWeapon(playerid, 24, 50000);
  1936.             }
  1937.             case 4:
  1938.             {
  1939.                 GivePlayerWeapon(playerid, 27, 50000);
  1940.             }
  1941.             case 5:
  1942.             {
  1943.                 GivePlayerWeapon(playerid, 28, 50000);
  1944.             }
  1945.             case 6:
  1946.             {
  1947.                 GivePlayerWeapon(playerid, 31, 50000);
  1948.             }
  1949.             case 7:
  1950.             {
  1951.                 GivePlayerWeapon(playerid, 26, 50000);
  1952.             }
  1953.             case 8:
  1954.             {
  1955.                 GivePlayerWeapon(playerid, 25, 50000);
  1956.             }
  1957.         }
  1958.     }
  1959.     return 1;
  1960. }
  1961.  
  1962. CMD:leavedm(playerid, params[])
  1963. {
  1964.     if(InDM[playerid] == 0) return SCM(playerid, COLOR_ERROR, "You are not in deathmatch arena.");
  1965.     InDM[playerid] = 0;
  1966.     SCM(playerid, COLOR_LIGHTRED, "You left the deathmatch arena.");
  1967.     SetPlayerInterior(playerid, 0);
  1968.     SetPlayerVirtualWorld(playerid, 0);
  1969.     SetPlayerPos(playerid, 1958.33, 1343.12, 15.36);
  1970.     ResetPlayerWeapons(playerid);
  1971.     return 1;
  1972. }
  1973.  
  1974. //Donator level 1+ commands
  1975. CMD:jetpack(playerid, params[])
  1976. {
  1977.     if(PlayerInfo[playerid][pDonator] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
  1978.     SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
  1979.     SCM(playerid, COLOR_GREEN, "Donator: You spawned jetpack for you.");
  1980.     return 1;
  1981. }
  1982.  
  1983. CMD:god(playerid, params[])
  1984. {
  1985.     if(PlayerInfo[playerid][pDonator] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
  1986.     if(Godmode[playerid] == 0)
  1987.     {
  1988.         SetPlayerHealth(playerid, 99999);
  1989.         Godmode[playerid] = 1;
  1990.         SCM(playerid, COLOR_GREEN, "Donator: You started your godmode.");
  1991.     }
  1992.     else
  1993.     {
  1994.         SetPlayerHealth(playerid, 100);
  1995.         Godmode[playerid] = 0;
  1996.         SCM(playerid, COLOR_GREEN, "Donator: You stopped your godmode.");
  1997.     }
  1998.     return 1;
  1999. }
  2000.  
  2001. CMD:skin(playerid, params[])
  2002. {
  2003.     new skin, string[256];
  2004.     if(PlayerInfo[playerid][pDonator] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
  2005.     if(sscanf(params, "i", skin)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /skin [Skin ID]");
  2006.     if(IsValidSkin(skin) == 0) return SCM(playerid, COLOR_ERROR, "This skin is invalid, please choose another.");
  2007.     SetPlayerSkin(playerid, skin);
  2008.     format(string, sizeof(string), "Donator: You set your skin ID to %d.", skin);
  2009.     SCM(playerid, COLOR_GREEN, string);
  2010.     return 1;
  2011. }
  2012.  
  2013. //Admin level 1+ commands
  2014.  
  2015. CMD:ahelp(playerid,params[])
  2016. {
  2017.     new String[2048];
  2018.     if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
  2019.     if(PlayerInfo[playerid][pAdmin] >= 1)
  2020.     {
  2021.         strins(String,"\n",strlen(String));
  2022.         strins(String,"{FFFF00} Admin level 1 commands:\n",strlen(String));
  2023.         strins(String,"{FFFFFF} /aduty , /tmute , /kick , /akill\n",strlen(String));
  2024.         strins(String,"\n",strlen(String));
  2025.     }
  2026.     if(PlayerInfo[playerid][pAdmin] >= 2)
  2027.     {
  2028.         strins(String,"{FFFF00} Admin level 2 commands:\n",strlen(String));
  2029.         strins(String,"{FFFFFF} /apm , /clearchat , /unmute , /rmute\n",strlen(String));
  2030.         strins(String,"{FFFFFF} /runmute , /givemoney\n",strlen(String));
  2031.         strins(String,"\n",strlen(String));
  2032.     }
  2033.     if(PlayerInfo[playerid][pAdmin] >= 3)
  2034.     {
  2035.         strins(String,"{FFFF00} Admin level 3 commands\n",strlen(String));
  2036.         strins(String,"{FFFFFF} /ban , /spawnveh , /disablegod , /givegod\n",strlen(String));
  2037.         strins(String,"\n",strlen(String));
  2038.     }
  2039.     ShowPlayerDialog(playerid, 5678, DIALOG_STYLE_MSGBOX, "Admin commands", String, "Close", "");
  2040.     return 1;
  2041. }
  2042.  
  2043. CMD:akill(playerid, params[])
  2044. {
  2045.     new string[256], targetid;
  2046.     if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
  2047.     if(sscanf(params, "r", targetid)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /akill [PlayerID]");
  2048.     if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
  2049.     if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_LIGHTRED, "You can't kill players with higher admin level.");
  2050.     SetPlayerHealth(targetid, 0);
  2051.     format(string, sizeof(string), "ADMIN: %s killed you.", GetName(playerid));
  2052.     SCM(targetid, COLOR_YELLOW, string);
  2053.     return 1;
  2054. }
  2055.  
  2056. CMD:aduty(playerid, params[])
  2057. {
  2058.     if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
  2059.     if(PlayerInfo[playerid][pAduty] == 0)
  2060.     {
  2061.         PlayerInfo[playerid][pAduty] = 1;
  2062.         SetPlayerColor(playerid, COLOR_ADUTY);
  2063.         SCM(playerid, COLOR_WHITE, "You changed your admin status to: {00FF00}On duty{FFFFFF}.");
  2064.     }
  2065.     else if(PlayerInfo[playerid][pAduty] == 1)
  2066.     {
  2067.         PlayerInfo[playerid][pAduty] = 0;
  2068.         SetPlayerColor(playerid, COLOR_GREEN);
  2069.         SCM(playerid, COLOR_WHITE, "You changed your admin status to: {FF0000}Off Duty{FFFFFF}.");
  2070.     }
  2071.     return 1;
  2072. }
  2073.  
  2074. CMD:tmute(playerid, params[])
  2075. {
  2076.     if(IsPlayerConnected(playerid))
  2077.     {
  2078.         if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
  2079.         new targetid, rid, string[256];
  2080.         if(sscanf(params, "ri", targetid, rid))
  2081.         {
  2082.             SCM(playerid, COLOR_LIGHTRED, "Usage: /tmute [PlayerID] [option]");
  2083.             SCM(playerid, COLOR_LIGHTRED, "Options for muting:");
  2084.             SCM(playerid, COLOR_LIGHTRED, "1.Spamming, 2.Swearing, 3.Spamming & swearing");
  2085.             SCM(playerid, COLOR_LIGHTRED, "4.Advertising");
  2086.             return 1;
  2087.         }
  2088.         if(IsPlayerConnected(targetid))
  2089.         {
  2090.             if(rid < 1 || rid > 5) return SCM(playerid,COLOR_LIGHTRED,"Options are from 1 to 4.");
  2091.             if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_LIGHTRED, "You can't mute players with higher admin level.");
  2092.             if(rid == 1)
  2093.             {
  2094.                 format(string, sizeof(string), "ADMIN: %s was muted by %s for 30 minutes.Reason:Ñïàì", GetName(targetid), GetName(playerid));
  2095.                 PlayerInfo[targetid][pMutedTime] = 30*60;
  2096.                 SCMToAll(COLOR_LIGHTRED, string);
  2097.                 PlayerInfo[targetid][pMuted] = 1;
  2098.             }
  2099.             else if(rid == 2)
  2100.             {
  2101.                 format(string, sizeof(string), "ADMIN: %s was muted by %s for 60 minutes.Reason:Swearing",  GetName(targetid), GetName(playerid));
  2102.                 PlayerInfo[targetid][pMutedTime] = 60*60;
  2103.                 SCMToAll(COLOR_LIGHTRED, string);
  2104.                 PlayerInfo[targetid][pMuted] = 1;
  2105.             }
  2106.             else if(rid == 3)
  2107.             {
  2108.                 format(string, sizeof(string), "ADMIN: %s was muted by %s for 90 minutes.Reason:Spamming & swearing", GetName(targetid), GetName(playerid));
  2109.                 PlayerInfo[targetid][pMutedTime] = 90*60;
  2110.                 SCMToAll(COLOR_LIGHTRED, string);
  2111.                 PlayerInfo[targetid][pMuted] = 1;
  2112.             }
  2113.             else if(rid == 4)
  2114.             {
  2115.                 format(string, sizeof(string), "ADMIN: %s was muted by %s for 120 minutes.Reason:Advertising", GetName(targetid), GetName(playerid));
  2116.                 PlayerInfo[targetid][pMutedTime] = 120*60;
  2117.                 SCMToAll(COLOR_LIGHTRED, string);
  2118.                 PlayerInfo[targetid][pMuted] = 1;
  2119.             }
  2120.         }
  2121.         else if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
  2122.     }
  2123.     return 1;
  2124. }
  2125.  
  2126. CMD:kick(playerid, params[])
  2127. {
  2128.     new string[256], targetid;
  2129.     if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
  2130.     if(sscanf(params, "r", targetid)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /kick [PlayerID]");
  2131.     if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
  2132.     if(targetid == playerid) return SCM(playerid, COLOR_ERROR, "You can't kick yourself.");
  2133.     if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_LIGHTRED, "You can't kick players with higher admin level.");
  2134.     format(string, sizeof(string), "ADMIN: %s kicked %s.", GetName(playerid), GetName(targetid));
  2135.     Kick(targetid);
  2136.     return 1;
  2137. }
  2138.  
  2139. //Admin level 2+ commands
  2140.  
  2141. CMD:apm(playerid, params[])
  2142. {
  2143.     new targetid, text[256], string[256];
  2144.     if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, COLOR_ERROR, ERROR);
  2145.     if(sscanf(params, "rs[256]", targetid, text)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /apm [PlayerID][Text]");
  2146.     if(targetid == playerid) return SCM(playerid, COLOR_ERROR, "You can't AdminPM yourself.");
  2147.     if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
  2148.     format(string, sizeof(string), "Admin PM from %s: %s", GetName(playerid), text);
  2149.     SCM(targetid, COLOR_YELLOW, string);
  2150.     format(string, sizeof(string), "Admin PM to %s: %s", GetName(targetid), text);
  2151.     SCM(playerid, COLOR_YELLOW, string);
  2152.     return 1;
  2153. }
  2154.  
  2155. CMD:clearchat(playerid, params[])
  2156. {
  2157.     if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, COLOR_ERROR, ERROR);
  2158.     for(new i = 0; i < 200; i++) SCMToAll(COLOR_WHITE, " ");
  2159.     return 1;
  2160. }
  2161.  
  2162. CMD:rmute(playerid, params[])
  2163. {
  2164.     new targetid, time, oldtime, time2, string[256];
  2165.     if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, COLOR_ERROR, ERROR);
  2166.     if(sscanf(params, "ri", targetid, time)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /rmute [PlayerID][Time in minutes]");
  2167.     if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
  2168.     if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_LIGHTRED, "You can't report mute players with higher admin level.");
  2169.     if(PlayerInfo[targetid][pReportmute] == 0)
  2170.     {
  2171.         PlayerInfo[targetid][pReportmute] = time*60;
  2172.         format(string, sizeof(string), "ADMIN: %s report muted you for %d minutes.", GetName(playerid), time);
  2173.         SCM(targetid, COLOR_RED, string);
  2174.     }
  2175.     else if(PlayerInfo[playerid][pReportmute] > 0)
  2176.     {
  2177.         oldtime = PlayerInfo[targetid][pReportmute]/60;
  2178.         PlayerInfo[targetid][pReportmute] = time*60;
  2179.         time2 = PlayerInfo[targetid][pReportmute]+oldtime;
  2180.         format(string, sizeof(string), "ADMIN: %s report muted you for %d minutes.Time remaining: %d minutes", GetName(playerid), time, time2);
  2181.         SCM(playerid, COLOR_RED, string);
  2182.     }
  2183.     return 1;
  2184. }
  2185.  
  2186. CMD:unmute(playerid, params[])
  2187. {
  2188.     new targetid, string[256];
  2189.     if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, COLOR_ERROR, ERROR);
  2190.     if(sscanf(params, "r", targetid)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /unmute [PlayerID]");
  2191.     if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
  2192.     PlayerInfo[targetid][pMutedTime] = 0;
  2193.     PlayerInfo[targetid][pMuted] = 0;
  2194.     format(string, sizeof(string), "ADMIN: %s unmuted %s.", GetName(playerid), GetName(targetid));
  2195.     SCMToAll(COLOR_GREEN, string);
  2196.     return 1;
  2197. }
  2198.  
  2199. CMD:runmute(playerid, params[])
  2200. {
  2201.     new targetid, string[256];
  2202.     if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, COLOR_ERROR, ERROR);
  2203.     if(sscanf(params, "r", targetid)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /runmute [PlayerID]");
  2204.     if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
  2205.     PlayerInfo[targetid][pReportmute] = 0;
  2206.     format(string, sizeof(string), "ADMIN: %s 'Report' unmuted you.", GetName(playerid));
  2207.     SCM(targetid, COLOR_GREEN, string);
  2208.     return 1;
  2209. }
  2210.  
  2211. CMD:givemoney(playerid, params[])
  2212. {
  2213.     new targetid, money, string[256];
  2214.     if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, COLOR_ERROR, ERROR);
  2215.     if(sscanf(params, "ri", targetid, money)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /givemoney [PlayerID][Money]");
  2216.     if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
  2217.     GivePlayerMoney(targetid, money);
  2218.     format(string, sizeof(string), "ADMIN: %s gave u %d$.", GetName(playerid), money);
  2219.     SCM(targetid, COLOR_GREEN, string);
  2220.     return 1;
  2221. }
  2222.  
  2223. //Admin level 3+ commands
  2224.  
  2225. CMD:ban(playerid, params[])
  2226. {
  2227.     new targetid, reason[128], string[256];
  2228.     if(PlayerInfo[playerid][pAdmin] < 3) return SCM(playerid, COLOR_ERROR, ERROR);
  2229.     if(sscanf(params, "rs[128]", targetid, reason)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /ban [PlayerID][Reason]");
  2230.     if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
  2231.     if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_LIGHTRED, "You can't ban players with higher admin level.");
  2232.     format(string, sizeof(string), "ADMIN: %s banned %s. Reason: %s", GetName(playerid), GetName(targetid), reason);
  2233.     SCMToAll(COLOR_LIGHTRED, string);
  2234.     BanEx(targetid, reason);
  2235.     return 1;
  2236. }
  2237.  
  2238. CMD:spawnveh(playerid, params[])
  2239. {
  2240.     new carid, Float:CarToX, Float:CarToY, Float:CarToZ, car, color1, color2;
  2241.     if(PlayerInfo[playerid][pAdmin] < 3) return SCM(playerid, COLOR_ERROR, ERROR);
  2242.     if(sscanf(params, "iii", carid, color1, color2)) return  SCM(playerid, COLOR_LIGHTRED, "Usage: /spawncar [modelid] [color1] [color2]");
  2243.     if(carid < 400 || carid > 611) return SCM(playerid, COLOR_RED, "Wrong model ID (min: 400 max: 600)");
  2244.     if(color1 < 0 || color1 > 252) return SCM(playerid, COLOR_RED, "Wrong color1 ID (min: 0 max: 252)");
  2245.     if(color2 < 0 || color2 > 252) return SCM(playerid, COLOR_RED, "Wrong color2 ID (min: 0 max: 252)");
  2246.     GetPlayerPos(playerid, CarToX, CarToY, CarToZ);
  2247.     car = CreateVehicle(carid, CarToX, CarToY+4, CarToZ, 90, color1, color2, -1);
  2248.     LinkVehicleToInterior(car, GetPlayerInterior(playerid));
  2249.     SetVehicleVirtualWorld(car, GetPlayerVirtualWorld(playerid));
  2250.     PutPlayerInVehicle(playerid, car, 0);
  2251.     return 1;
  2252. }
  2253.  
  2254. CMD:givegod(playerid, params[])
  2255. {
  2256.     new targetid, string[256];
  2257.     if(PlayerInfo[playerid][pAdmin] < 3) return SCM(playerid, COLOR_ERROR, ERROR);
  2258.     if(sscanf(params, "r", targetid)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /givegod [PlayerID]");
  2259.     if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
  2260.     if(Godmode[targetid] == 1) return SCM(playerid, COLOR_LIGHTRED, "This player already have godmode.");
  2261.     Godmode[targetid] = 1;
  2262.     format(string, sizeof(string), "ADMIN: %s started your godmode.", GetName(playerid));
  2263.     SCM(targetid, COLOR_GREEN, string);
  2264.     return 1;
  2265. }
  2266.  
  2267. CMD:disablegod(playerid, params[])
  2268. {
  2269.     new targetid, string[256];
  2270.     if(PlayerInfo[playerid][pAdmin] < 3) return SCM(playerid, COLOR_ERROR, ERROR);
  2271.     if(sscanf(params, "r", targetid)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /dgod [PlayerID]");
  2272.     if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
  2273.     if(Godmode[targetid] == 0) return SCM(playerid, COLOR_LIGHTRED, "This player godmode is already stopped.");
  2274.     if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_LIGHTRED, "You can't disable players godmode with higher admin level.");
  2275.     Godmode[targetid] = 0;
  2276.     format(string, sizeof(string), "ADMIN: %s stopped your godmode.", GetName(playerid));
  2277.     SCM(targetid, COLOR_LIGHTRED, string);
  2278.     return 1;
  2279. }
  2280.  
  2281. //RCON admin commands
  2282.  
  2283. CMD:createbiz(playerid, params[])
  2284. {
  2285.     if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_ERROR, ERROR);
  2286.     new price, level, id, int, world, string[128], Float:Xi, Float:Yi, Float:Zi, inti, blvl, bname[32], entrable;
  2287.     if(sscanf(params, "dddfffdds[32]", price, level, inti, Xi, Yi, Zi, blvl, entrable, bname))
  2288.     {
  2289.         SendClientMessage(playerid, COLOR_LIGHTRED, "Usage: /createbiz [price] [type] [interior ID] [Exit X] [Exit Y] [Exit Z] [Level] [Locked] [Name(max char. 32)]");
  2290.         SendClientMessage(playerid, COLOR_YELLOW, "Types: 1.24/7, 2.Club, 3.Bar, 4.Clothes shop");
  2291.         SendClientMessage(playerid, COLOR_YELLOW, "Types: 4.Ammo, 6.Casino");
  2292.         return 1;
  2293.     }
  2294.     if(level < 0 || level > 6) return SendClientMessage(playerid, COLOR_ERROR, "Types are from 1 to 6.");
  2295.     if(price < 10000) return SendClientMessage(playerid, COLOR_ERROR, "Price must be atleast $10,000.");
  2296.     for(new h = 1;h < sizeof(BusinessInfo);h++)
  2297.     {
  2298.         if(BusinessInfo[h][bPrice] == 0)
  2299.         {
  2300.             id = h;
  2301.             break;
  2302.         }
  2303.     }
  2304.     new Float:X,Float:Y,Float:Z,Float:A;
  2305.     GetPlayerPos(playerid, X, Y, Z);
  2306.     GetPlayerFacingAngle(playerid, A);
  2307.     int = GetPlayerInterior(playerid);
  2308.     world = GetPlayerVirtualWorld(playerid);
  2309.     BusinessInfo[id][bInsideInt] = inti;    BusinessInfo[id][bExitX] = Xi;  BusinessInfo[id][bExitY] = Yi;
  2310.     BusinessInfo[id][bExitZ] = Zi;  BusinessInfo[id][bOwned] = 0;   BusinessInfo[id][bPrice] = price;
  2311.     BusinessInfo[id][bType] = level;    BusinessInfo[id][bEntranceX] = X;   BusinessInfo[id][bEntranceY] = Y;
  2312.     BusinessInfo[id][bEntranceZ] = Z;   BusinessInfo[id][bEntranceA] = A;   BusinessInfo[id][bLocked] = entrable;
  2313.     BusinessInfo[id][bInt] = int;   BusinessInfo[id][bWorld] =world;    BusinessInfo[id][bInsideWorld] = id;
  2314.     BusinessInfo[id][bLevel] = blvl;
  2315.  
  2316.     format(string, sizeof(string), "%s", bname);
  2317.     strmid(BusinessInfo[id][bName], string, 0, strlen(string), 255);
  2318.  
  2319.     if(BusinessInfo[id][bOutsideIcon]) DestroyPickup(BusinessInfo[id][bOutsideIcon]);
  2320.     if(BusinessInfo[id][bInsideIcon]) DestroyPickup(BusinessInfo[id][bInsideIcon]);
  2321.     BusinessInfo[id][bOutsideIcon] = CreatePickup(1272, 1, BusinessInfo[id][bEntranceX], BusinessInfo[id][bEntranceY], BusinessInfo[id][bEntranceZ], BusinessInfo[id][bWorld]);
  2322.     BusinessInfo[id][bInsideIcon] = CreatePickup(1272, 1, BusinessInfo[id][bExitX], BusinessInfo[id][bExitY], BusinessInfo[id][bExitZ], BusinessInfo[id][bInsideWorld]);
  2323.     new file4[40];
  2324.     format(file4, sizeof(file4), BPATH, id);
  2325.     new INI:File = INI_Open(file4);
  2326.     INI_SetTag(File,"data");
  2327.     INI_WriteString(File,"bOwner", BusinessInfo[id][bOwner]);
  2328.     INI_WriteString(File,"bName", BusinessInfo[id][bName]);
  2329.     INI_WriteInt(File,"bOwned", BusinessInfo[id][bOwned]);
  2330.     INI_WriteInt(File,"bPrice", BusinessInfo[id][bPrice]);
  2331.     INI_WriteInt(File,"bType", BusinessInfo[id][bType]);
  2332.     INI_WriteInt(File,"bLocked", BusinessInfo[id][bLocked]);
  2333.     INI_WriteFloat(File,"bEntranceX", BusinessInfo[id][bEntranceX]);
  2334.     INI_WriteFloat(File,"bEntranceY", BusinessInfo[id][bEntranceY]);
  2335.     INI_WriteFloat(File,"bEntranceZ", BusinessInfo[id][bEntranceZ]);
  2336.     INI_WriteFloat(File,"bEntranceA", BusinessInfo[id][bEntranceA]);
  2337.     INI_WriteFloat(File,"bExitX", BusinessInfo[id][bExitX]);
  2338.     INI_WriteFloat(File,"bExitY", BusinessInfo[id][bExitY]);
  2339.     INI_WriteFloat(File,"bExitZ", BusinessInfo[id][bExitZ]);
  2340.     INI_WriteFloat(File,"bExitA", BusinessInfo[id][bExitA]);
  2341.     INI_WriteInt(File,"bInt", BusinessInfo[id][bInt]);
  2342.     INI_WriteInt(File,"bWorld", BusinessInfo[id][bWorld]);
  2343.     INI_WriteInt(File,"bInsideInt", BusinessInfo[id][bInsideInt]);
  2344.     INI_WriteInt(File,"bInsideWorld", BusinessInfo[id][bInsideWorld]);
  2345.     INI_WriteInt(File,"bLevel", BusinessInfo[id][bLevel]);
  2346.     INI_Close(File);
  2347.     return 1;
  2348. }
  2349.  
  2350. CMD:setalevel(playerid, params[])
  2351. {
  2352.     new targetid, alevel, string[256];
  2353.     if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_ERROR, ERROR);
  2354.     if(sscanf(params, "ri", targetid, alevel)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /setalevel [PlayerID][Admin level(0-5)]");
  2355.     if(alevel < 0 || alevel > 5) return SCM(playerid, COLOR_LIGHTRED, "Admin levels are from 1 to 5.");
  2356.     if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
  2357.     if(alevel == 0)
  2358.     {
  2359.         PlayerInfo[targetid][pAdmin] = 0;
  2360.         format(string, sizeof(string), "ADMIN: %s isn't admin anymore.", GetName(targetid));
  2361.         SCMToAll(COLOR_LIGHTRED, string);
  2362.     }
  2363.     else if(alevel != 0)
  2364.     {
  2365.         PlayerInfo[targetid][pAdmin] = alevel;
  2366.         format(string, sizeof(string), "ADMIN: %s is now admin level %d.Congratulations!", GetName(targetid), alevel);
  2367.         SCMToAll(COLOR_LIGHTRED, string);
  2368.     }
  2369.     return 1;
  2370. }
  2371.  
  2372. CMD:setdonator(playerid, params[])
  2373. {
  2374.     new targetid, dlevel, string[256];
  2375.     if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_ERROR, ERROR);
  2376.     if(sscanf(params, "ri", targetid, dlevel)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /setdonator [PlayerID][Donator Level(0-3)]");
  2377.     if(dlevel < 0 || dlevel > 3) return SCM(playerid, COLOR_LIGHTRED, "Donator levels are from 1 to 3.");
  2378.     if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
  2379.     if(dlevel == 0)
  2380.     {
  2381.         PlayerInfo[playerid][pDonator] = 0;
  2382.         format(string, sizeof(string), "ADMIN: %s removed your donator status.", GetName(playerid));
  2383.         SCM(targetid, COLOR_LIGHTRED, string);
  2384.     }
  2385.     else if(dlevel != 0)
  2386.     {
  2387.         PlayerInfo[playerid][pDonator] = dlevel;
  2388.         format(string, sizeof(string), "ADMIN: %s gave you donator level %d.", GetName(playerid), dlevel);
  2389.         SCM(targetid, COLOR_LIGHTRED, string);
  2390.     }
  2391.     return 1;
  2392. }
  2393.  
  2394. //Business owners commands
  2395. CMD:lockbiz(playerid, params[])
  2396. {
  2397.     new id = IsPlayerNearBizEnt(playerid);
  2398.     if(id != PlayerInfo[playerid][BizID]) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~This isn't your biz!", 3000, 4);
  2399.     if(BusinessInfo[id][bLocked] == 1)
  2400.     {
  2401.         BusinessInfo[id][bLocked] = 0;
  2402.         GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~Biz ~g~unlocked!", 3000, 4);
  2403.     }
  2404.     else
  2405.     {
  2406.         BusinessInfo[id][bLocked] = 1;
  2407.         GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~Biz ~r~locked!", 3000, 4);
  2408.     }
  2409.     return 1;
  2410. }
  2411.  
  2412. CMD:sellbiz(playerid, params[])
  2413. {
  2414.     new id = PlayerInfo[playerid][BizID], string[256];
  2415.     if(PlayerInfo[playerid][BizID] == 0) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~You don't own a biz!", 3000, 4);
  2416.     BusinessInfo[id][bOwned] = 0;
  2417.     BusinessInfo[id][bOwner] = 0;
  2418.     BusinessInfo[id][bLocked] = 1;
  2419.     GivePlayerMoney(playerid, BusinessInfo[id][bPrice]-50000);
  2420.     PlayerInfo[playerid][BizID] = 0;
  2421.     format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~Business sold for ~r~%d", BusinessInfo[id][bPrice]-50000);
  2422.     GameTextForPlayer(playerid, string, 3000, 4);
  2423.     return 1;
  2424. }
  2425.  
  2426. //Anticheat commands
  2427.  
  2428. CMD:acsetup(playerid, params[])
  2429. {
  2430.     new string[256];
  2431.     if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_ERROR, ERROR);
  2432.     format(string, sizeof(string), "{00FF00}Airbreak protection = {FF0000}%d\n{00FF00}Vehicle Tune protection = {FF0000}%d\n{00FF00}Speed Hack protection = {FF0000}%d\n{00FF00}Aimbot protection = {FF0000}%d\n{00FF00}Godmode protection = {FF0000}%d\n", ACInfo[Airbreak], ACInfo[vTune], ACInfo[SpeedCheat], ACInfo[AimScript], ACInfo[GodMode]);
  2433.     ShowPlayerDialog(playerid, DIALOG_MAIN, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
  2434.     return 1;
  2435. }
  2436.  
  2437. CMD:acpunish(playerid, params[])
  2438. {
  2439.     new string[256], status[32], status1[32], status2[32], status3[32], status4[32];
  2440.     if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_ERROR, ERROR);
  2441.     if(ACInfo[AirbreakC] == 0) { status = "Kick"; }
  2442.     else if(ACInfo[AirbreakC] == 1) { status = "Message to admins"; }
  2443.     if(ACInfo[vTuneC] == 0) { status1 = "Kick"; }
  2444.     else if(ACInfo[vTuneC] == 1) { status1 = "Message to admins"; }
  2445.     if(ACInfo[SpeedCheatC] == 0) { status2 = "Kick"; }
  2446.     else if(ACInfo[SpeedCheatC] == 1) { status2 = "Message to admins"; }
  2447.     if(ACInfo[AimScriptC] == 0) { status3 = "Kick"; }
  2448.     else if(ACInfo[AimScriptC] == 1) { status3 = "Message to admins"; }
  2449.     if(ACInfo[GodModeC] == 0) { status4 = "Kick"; }
  2450.     else if(ACInfo[GodModeC] == 1) { status4 = "Message to admins"; }
  2451.     format(string, sizeof(string), "{00FF00}Airbreak punish = {FF0000}%s\n{00FF00}Vehicle Tune punish = {FF0000}%s\n{00FF00}Speed Hack punish = {FF0000}%s\n{00FF00}Aimbot punish = {FF0000}%s\n{00FF00}Godmode punish = {FF0000}%s\n", status, status1, status2, status3, status4);
  2452.     ShowPlayerDialog(playerid, DIALOG_MAIN2, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
  2453.     return 1;
  2454. }
  2455.  
  2456. //All stocks are here
  2457.  
  2458. stock GetPlayerSpeed(playerid)
  2459. {
  2460.     new Float:ST[4];
  2461.     if(IsPlayerInAnyVehicle(playerid))
  2462.     GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
  2463.     else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
  2464.     ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 181.5;
  2465.     return floatround(ST[3]);
  2466. }
  2467.  
  2468. stock GetName(playerid)
  2469. {
  2470.     new pname[MAX_PLAYER_NAME]; pname="Invalid PlayerID";
  2471.     if(IsPlayerConnected(playerid)) {
  2472.         GetPlayerName(playerid, pname, sizeof (pname));
  2473.     }
  2474.     return pname;
  2475. }
  2476.  
  2477. stock Path(playerid)
  2478. {
  2479.     new str[128],name[MAX_PLAYER_NAME];
  2480.     GetPlayerName(playerid,name,sizeof(name));
  2481.     format(str,sizeof(str),AC_DATA_FILE,name);
  2482.     return str;
  2483. }
  2484.  
  2485. stock IsPlayerInInvalidNosVehicle(playerid)
  2486. {
  2487.         new vehicleid = GetPlayerVehicleID(playerid);
  2488.         #define MAX_INVALID_NOS_VEHICLES 52
  2489.         new InvalidNosVehicles[MAX_INVALID_NOS_VEHICLES] =
  2490.         {
  2491.                 581,523,462,521,463,522,461,448,468,586,417,425,469,487,512,520,563,593,
  2492.                 509,481,510,472,473,493,520,595,484,430,453,432,476,497,513,533,577,
  2493.                 452,446,447,454,590,569,537,538,570,449,519,460,488,511,519,548,592
  2494.         };
  2495.         if(IsPlayerInAnyVehicle(playerid))
  2496.         {
  2497.                 for(new i = 0; i < MAX_INVALID_NOS_VEHICLES; i++)
  2498.         {
  2499.                 if(GetVehicleModel(vehicleid) == InvalidNosVehicles[i]) return true;
  2500.         }
  2501.         }
  2502.         return false;
  2503. }
  2504.  
  2505. IsPlayerNearBizEnt(playerid)
  2506. {
  2507.     for(new b = 1; b < sizeof(BusinessInfo); b++)
  2508.     {
  2509.         if(IsPlayerInRangeOfPoint(playerid, 2.0, BusinessInfo[b][bEntranceX], BusinessInfo[b][bEntranceY], BusinessInfo[b][bEntranceZ])) return b;
  2510.     }
  2511.     return -1;
  2512. }
  2513.  
  2514. stock BusinessType(b)
  2515. {
  2516.     new string[30];
  2517.     switch(BusinessInfo[b][bType])
  2518.     {
  2519.         case 1: string = "24/7";
  2520.         case 2: string = "Club";
  2521.         case 3: string = "Bar";
  2522.         case 4: string = "Clothes Shop";
  2523.         case 5: string = "Ammo";
  2524.         case 4: string = "Casino";
  2525.     }
  2526.     return string;
  2527. }
  2528.  
  2529. stock IsComponentidCompatible(modelid, componentid)
  2530. {
  2531.     if(componentid == 1025 || componentid == 1073 || componentid == 1074 || componentid == 1075 || componentid == 1076 ||
  2532.          componentid == 1077 || componentid == 1078 || componentid == 1079 || componentid == 1080 || componentid == 1081 ||
  2533.          componentid == 1082 || componentid == 1083 || componentid == 1084 || componentid == 1085 || componentid == 1096 ||
  2534.          componentid == 1097 || componentid == 1098 || componentid == 1087 || componentid == 1086)
  2535.          return true;
  2536.  
  2537.     switch (modelid)
  2538.     {
  2539.         case 400: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010);
  2540.         case 401: return (componentid == 1005 || componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 114 || componentid == 1020 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1003 || componentid == 1017 || componentid == 1007);
  2541.         case 402: return (componentid == 1009 || componentid == 1009 || componentid == 1010);
  2542.         case 404: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1002 || componentid == 1016 || componentid == 1000 || componentid == 1017 || componentid == 1007);
  2543.         case 405: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1014 || componentid == 1023 || componentid == 1000);
  2544.         case 409: return (componentid == 1009);
  2545.         case 410: return (componentid == 1019 || componentid == 1021 || componentid == 1020 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
  2546.         case 411: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2547.         case 412: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2548.         case 415: return (componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
  2549.         case 418: return (componentid == 1020 || componentid == 1021 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1016);
  2550.         case 419: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2551.         case 420: return (componentid == 1005 || componentid == 1004 || componentid == 1021 || componentid == 1019 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1003);
  2552.         case 421: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1014 || componentid == 1023 || componentid == 1016 || componentid == 1000);
  2553.         case 422: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1017 || componentid == 1007);
  2554.         case 426: return (componentid == 1005 || componentid == 1004 || componentid == 1021 || componentid == 1019 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1003);
  2555.         case 429: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2556.         case 436: return (componentid == 1020 || componentid == 1021 || componentid == 1022 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1003 || componentid == 1017 || componentid == 1007);
  2557.         case 438: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2558.         case 439: return (componentid == 1003 || componentid == 1023 || componentid == 1001 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1017 || componentid == 1007 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1013);
  2559.         case 442: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2560.         case 445: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2561.         case 451: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2562.         case 458: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2563.         case 466: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2564.         case 467: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2565.         case 474: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2566.         case 475: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2567.         case 477: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1017 || componentid == 1007);
  2568.         case 478: return (componentid == 1005 || componentid == 1004 || componentid == 1012 || componentid == 1020 || componentid == 1021 || componentid == 1022 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010);
  2569.         case 479: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2570.         case 480: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2571.         case 489: return (componentid == 1005 || componentid == 1004 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1016 || componentid == 1000);
  2572.         case 491: return (componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1014 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
  2573.         case 492: return (componentid == 1005 || componentid == 1004 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1016 || componentid == 1000);
  2574.         case 496: return (componentid == 1006 || componentid == 1017 || componentid == 1007 || componentid == 1011 || componentid == 1019 || componentid == 1023 || componentid == 1001 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1003 || componentid == 1002 || componentid == 1142 || componentid == 1143 || componentid == 1020);
  2575.         case 500: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010);
  2576.         case 506: return (componentid == 1009);
  2577.         case 507: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2578.         case 516: return (componentid == 1004 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1002 || componentid == 1015 || componentid == 1016 || componentid == 1000 || componentid == 1017 || componentid == 1007);
  2579.         case 517: return (componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1002 || componentid == 1023 || componentid == 1016 || componentid == 1003 || componentid == 1017 || componentid == 1007);
  2580.         case 518: return (componentid == 1005 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1018 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
  2581.         case 526: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2582.         case 527: return (componentid == 1021 || componentid == 1020 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1014 || componentid == 1015 || componentid == 1017 || componentid == 1007);
  2583.         case 529: return (componentid == 1012 || componentid == 1011 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
  2584.         case 533: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2585.         case 534: return (componentid == 1126 || componentid == 1127 || componentid == 1179 || componentid == 1185 || componentid == 1100 || componentid == 1123 || componentid == 1125 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1180 || componentid == 1178 || componentid == 1101 || componentid == 1122 || componentid == 1124 || componentid == 1106);
  2586.         case 535: return (componentid == 1109 || componentid == 1110 || componentid == 1113 || componentid == 1114 || componentid == 1115 || componentid == 1116 || componentid == 1117 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1120 || componentid == 1118 || componentid == 1121 || componentid == 1119);
  2587.         case 536: return (componentid == 1104 || componentid == 1105 || componentid == 1182 || componentid == 1181 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1184 || componentid == 1183 || componentid == 1128 || componentid == 1103 || componentid == 1107 || componentid == 1108);
  2588.         case 540: return (componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007);
  2589.         case 541: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2590.         case 542: return (componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1014 || componentid == 1015);
  2591.         case 545: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2592.         case 546: return (componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1019 || componentid == 1018 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007);
  2593.         case 547: return (componentid == 1142 || componentid == 1143 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1016 || componentid == 1003 || componentid == 1000);
  2594.         case 549: return (componentid == 1012 || componentid == 1011 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
  2595.         case 550: return (componentid == 1005 || componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003);
  2596.         case 551: return (componentid == 1005 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1023 || componentid == 1016 || componentid == 1003);
  2597.         case 555: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2598.         case 558: return (componentid == 1092 || componentid == 1089 || componentid == 1166 || componentid == 1165 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1168 || componentid == 1167 || componentid == 1088 || componentid == 1091 || componentid == 1164 || componentid == 1163 || componentid == 1094 || componentid == 1090 || componentid == 1095 || componentid == 1093);
  2599.         case 559: return (componentid == 1065 || componentid == 1066 || componentid == 1160 || componentid == 1173 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1159 || componentid == 1161 || componentid == 1162 || componentid == 1158 || componentid == 1067 || componentid == 1068 || componentid == 1071 || componentid == 1069 || componentid == 1072 || componentid == 1070 || componentid == 1009);
  2600.         case 560: return (componentid == 1028 || componentid == 1029 || componentid == 1169 || componentid == 1170 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1141 || componentid == 1140 || componentid == 1032 || componentid == 1033 || componentid == 1138 || componentid == 1139 || componentid == 1027 || componentid == 1026 || componentid == 1030 || componentid == 1031);
  2601.         case 561: return (componentid == 1064 || componentid == 1059 || componentid == 1155 || componentid == 1157 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1154 || componentid == 1156 || componentid == 1055 || componentid == 1061 || componentid == 1058 || componentid == 1060 || componentid == 1062 || componentid == 1056 || componentid == 1063 || componentid == 1057);
  2602.         case 562: return (componentid == 1034 || componentid == 1037 || componentid == 1171 || componentid == 1172 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1149 || componentid == 1148 || componentid == 1038 || componentid == 1035 || componentid == 1147 || componentid == 1146 || componentid == 1040 || componentid == 1036 || componentid == 1041 || componentid == 1039);
  2603.         case 565: return (componentid == 1046 || componentid == 1045 || componentid == 1153 || componentid == 1152 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1150 || componentid == 1151 || componentid == 1054 || componentid == 1053 || componentid == 1049 || componentid == 1050 || componentid == 1051 || componentid == 1047 || componentid == 1052 || componentid == 1048);
  2604.         case 566: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2605.         case 567: return (componentid == 1129 || componentid == 1132 || componentid == 1189 || componentid == 1188 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1187 || componentid == 1186 || componentid == 1130 || componentid == 1131 || componentid == 1102 || componentid == 1133);
  2606.         case 575: return (componentid == 1044 || componentid == 1043 || componentid == 1174 || componentid == 1175 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1176 || componentid == 1177 || componentid == 1099 || componentid == 1042);
  2607.         case 576: return (componentid == 1136 || componentid == 1135 || componentid == 1191 || componentid == 1190 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1192 || componentid == 1193 || componentid == 1137 || componentid == 1134);
  2608.         case 579: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2609.         case 580: return (componentid == 1020 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007);
  2610.         case 585: return (componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
  2611.         case 587: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2612.         case 589: return (componentid == 1005 || componentid == 1004 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1024 || componentid == 1013 || componentid == 1006 || componentid == 1016 || componentid == 1000 || componentid == 1017 || componentid == 1007);
  2613.         case 600: return (componentid == 1005 || componentid == 1004 || componentid == 1020 || componentid == 1022 || componentid == 1018 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1017 || componentid == 1007);
  2614.         case 602: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
  2615.         case 603: return (componentid == 1144 || componentid == 1145 || componentid == 1142 || componentid == 1143 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007);
  2616.     }
  2617.     return false;
  2618. }
  2619.  
  2620. stock UserPath(playerid)
  2621. {
  2622.     new string[128],playername[MAX_PLAYER_NAME];
  2623.     GetPlayerName(playerid,playername,sizeof(playername));
  2624.     format(string,sizeof(string),PATH,playername);
  2625.     return string;
  2626. }
  2627.  
  2628. floatval(Float:val){
  2629.         new str[256];
  2630.         format(str, 256, "%.0f", val);
  2631.         return todec(str);
  2632. }
  2633.  
  2634. todec(str[]){
  2635.         return strval(str);
  2636. }
  2637.  
  2638. LoadTextDraws(){
  2639.         TDLabels[0]=TextDrawCreate(Label_X,TD_Y,"Drift Points");
  2640.         TextDrawColor(TDLabels[0],COLOR_Label);
  2641.         TextDrawSetShadow(TDLabels[0],0);
  2642.         TextDrawSetOutline(TDLabels[0],1);
  2643.         TextDrawLetterSize(TDLabels[0],0.5,2);
  2644.         TextDrawBackgroundColor(TDLabels[0],COLOR_LabelOut);
  2645.         TextDrawFont(TDLabels[0],1);
  2646.  
  2647.         TDLabels[1]=TextDrawCreate(Label_X,TD_Y+50,"Drift Bonus");
  2648.         TextDrawColor(TDLabels[1],COLOR_Label);
  2649.         TextDrawSetShadow(TDLabels[1],0);
  2650.         TextDrawSetOutline(TDLabels[1],1);
  2651.         TextDrawLetterSize(TDLabels[1],0.5,2);
  2652.         TextDrawBackgroundColor(TDLabels[1],COLOR_LabelOut);
  2653.         TextDrawFont(TDLabels[1],1);
  2654.  
  2655.         TDLabels[2]=TextDrawCreate(Label_X,TD_Y+100,"Drift Cash");
  2656.         TextDrawColor(TDLabels[2],COLOR_Label);
  2657.         TextDrawSetShadow(TDLabels[2],0);
  2658.         TextDrawSetOutline(TDLabels[2],1);
  2659.         TextDrawLetterSize(TDLabels[2],0.5,2);
  2660.         TextDrawBackgroundColor(TDLabels[2],COLOR_LabelOut);
  2661.         TextDrawFont(TDLabels[2],1);
  2662.  
  2663.         new i;
  2664.         for(i=0;i<=MAX_PLAYERS;i++){
  2665.                 TDValueDrift[i]=TextDrawCreate(Value_X,TD_Y+20,"0");
  2666.                 TextDrawColor(TDValueDrift[i],COLOR_Value);
  2667.                 TextDrawSetShadow(TDValueDrift[i],0);
  2668.                 TextDrawSetOutline(TDValueDrift[i],1);
  2669.                 TextDrawLetterSize(TDValueDrift[i],0.5,2);
  2670.                 TextDrawBackgroundColor(TDValueDrift[i],COLOR_ValueOut);
  2671.                 TextDrawFont(TDValueDrift[i],3);
  2672.  
  2673.                 TDValueBonus[i]=TextDrawCreate(Value_X,TD_Y+70,"X1");
  2674.                 TextDrawColor(TDValueBonus[i],COLOR_Value);
  2675.                 TextDrawSetShadow(TDValueBonus[i],0);
  2676.                 TextDrawSetOutline(TDValueBonus[i],1);
  2677.                 TextDrawLetterSize(TDValueBonus[i],0.5,2);
  2678.                 TextDrawBackgroundColor(TDValueBonus[i],COLOR_ValueOut);
  2679.                 TextDrawFont(TDValueBonus[i],3);
  2680.  
  2681.                 TDValueCash[i]=TextDrawCreate(Value_X,TD_Y+120,"$0");
  2682.                 TextDrawColor(TDValueCash[i],COLOR_Value);
  2683.                 TextDrawSetShadow(TDValueCash[i],0);
  2684.                 TextDrawSetOutline(TDValueCash[i],1);
  2685.                 TextDrawLetterSize(TDValueCash[i],0.5,2);
  2686.                 TextDrawBackgroundColor(TDValueCash[i],COLOR_ValueOut);
  2687.                 TextDrawFont(TDValueCash[i],3);
  2688.         }
  2689.  
  2690.         return 1;
  2691. }
  2692.  
  2693. GetVType(vid){
  2694.  
  2695.         new Convertibles[4]={480, 533, 439, 555};
  2696.         new Industrial[26]={499, 422, 482, 498, 609, 524, 578, 455, 403, 414, 582, 443, 514, 413, 515, 440, 543, 605, 459, 531, 408, 552, 478, 456, 554};
  2697.         new LowRider[8]={536, 575, 534, 567, 535, 566, 576, 412};
  2698.         new OffRoad[13]={568, 424, 573, 579, 400, 500, 444, 556, 557, 470, 489, 505, 595};
  2699.         new Service[19]={416, 433, 431, 438, 437, 523, 427, 490, 528, 407, 544, 596, 596, 597, 598, 599, 432, 601, 420};
  2700.         new Saloon[35]={445, 504, 401, 518, 527, 542, 507, 562, 585, 419, 526, 604, 466, 492, 474, 546, 517, 410, 551, 516, 467, 600, 426, 436, 547, 405, 580, 560, 550, 549, 540, 491, 529, 421};
  2701.         new Sports[20]={602, 429, 496, 402, 541, 415, 589, 587, 565, 494, 502, 503, 411, 559, 603, 475, 506, 451, 558, 477};
  2702.         new Wagons[5]={418, 404, 479, 458, 561};
  2703.  
  2704.         new modelid=GetVehicleModel(vid);
  2705.         new i;
  2706.         for(i=0;i<3;i++){
  2707.                     if(Convertibles[i]==modelid) return 1;
  2708.         }
  2709.         for(i=0;i<25;i++){
  2710.                     if(Industrial[i]==modelid) return 1;
  2711.         }
  2712.         for(i=0;i<7;i++){
  2713.                     if(LowRider[i]==modelid) return 1;
  2714.         }
  2715.         for(i=0;i<12;i++){
  2716.                     if(OffRoad[i]==modelid) return 1;
  2717.         }
  2718.         for(i=0;i<19;i++){
  2719.                     if(Service[i]==modelid) return 1;
  2720.         }
  2721.         for(i=0;i<35;i++){
  2722.                     if(Saloon[i]==modelid) return 1;
  2723.         }
  2724.         for(i=0;i<20;i++){
  2725.                     if(Sports[i]==modelid) return 1;
  2726.         }
  2727.         for(i=0;i<5;i++){
  2728.                     if(Wagons[i]==modelid) return 1;
  2729.         }
  2730.         return 0;
  2731. }
  2732.  
  2733. stock IsValidCar(carid)
  2734. {
  2735.     new badcars[22] =
  2736.     {520, 432, 430, 425, 406, 464, 476, 501, 537, 538, 556, 557, 564, 569, 570, 590};
  2737.     if(carid > 611 || carid < 400) return 0;
  2738.     for(new i = 0; i < 22; i++)
  2739.     {
  2740.         if(carid == badcars[i]) return 0;
  2741.     }
  2742.     return 1;
  2743. }
  2744.  
  2745. stock IsValidSkin(skinid)
  2746. {
  2747.     new badSkins[22] =
  2748.     { 3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 268, 273, 289};
  2749.     if(skinid > 299 || skinid < 0) return 0;
  2750.     for(new i = 0; i < 22; i++)
  2751.     {
  2752.         if(skinid == badSkins[i]) return 0;
  2753.     }
  2754.     return 1;
  2755. }
Advertisement
Add Comment
Please, Sign In to add comment