Advertisement
Kartik_Sharma

Save COLOR + WEAPONS SAMP

Jul 6th, 2012
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 75.51 KB | None | 0 0
  1. //----------------------------------Includes----------------------------------//
  2. #include <a_samp>
  3. #include <YSI\y_ini>
  4. #include <colors>
  5. #include <zcmd>
  6. #include <sscanf2>
  7. #include <a_players>
  8. #include <dini>
  9. native WP_Hash(buffer[],len,const str[]);
  10. //-----------------------------------Defines----------------------------------//
  11. #define dregister 1
  12. #define dlogin 2
  13. #define modcar 3
  14. #define carcolor 4
  15. #define carwheels 5
  16. #define places 6
  17. #define DIALOG_bank 7
  18. #define DIALOG_BANKWITHDRAW 8
  19. #define DIALOG_BANKDEPOSIT 9
  20. #define getguns 10
  21. #define myicon 11
  22. #define AmmuGuns 12
  23. #define serverrules 13
  24. #define SPECIAL_ACTION_PISSING 14
  25. #define PATH "Users/%s.ini"
  26. #define UserPath "Users/%s.ini"
  27. #define COLOR_JOIN  0x99FF9900
  28. //-----------------------------------Enumss-----------------------------------//
  29.  
  30. main(){}
  31.  
  32. enum PlayerInfo
  33. {
  34.     Pass[129],
  35.     Adminlevel,
  36.     VIPlevel,
  37.     Money,
  38.     Scores,
  39.     Kills,
  40.     Deaths,
  41.     Skin,
  42.     Balance,
  43.     color[11],
  44.     AFKstatus,
  45.     pWep0,
  46.     pWep1,
  47.     pWep2,
  48.     pWep3,
  49.     pWep4,
  50.     pWep5,
  51.     pWep6,
  52.     pWep7,
  53.     pWep8,
  54.     pWep9,
  55.     pWep10,
  56.     pWep11,
  57.     pWep12,
  58.    
  59.     pAmmo0,
  60.     pAmmo1,
  61.     pAmmo2,
  62.     pAmmo3,
  63.     pAmmo4,
  64.     pAmmo5,
  65.     pAmmo6,
  66.     pAmmo7,
  67.     pAmmo8,
  68.     pAmmo9,
  69.     pAmmo10,
  70.     pAmmo11,
  71.     pAmmo12,
  72. }
  73. //------------------------------------New-------------------------------------//
  74. new pInfo[MAX_PLAYERS][PlayerInfo];
  75. new MoneyPickup;
  76. new HealthPickup;
  77. new ArmorPickup;
  78. new BankPickup;
  79. new BankExitPickup;
  80. new ParachuteEnterExitPickup;
  81. new ParachutePickup;
  82. new AmmuEnterPickup;
  83. new AmmuExitPickup;
  84. new AmmuDialogPickup;
  85. new grider[MAX_PLAYERS][3];
  86. new Anim[MAX_PLAYERS];
  87. new Params[4][8];
  88. new FileData[7][128];
  89. new randomMessages[][] =
  90.     {
  91.         "Wanna earn 1,000,000 cash and 10 score? Find bug (error, problem) in our server and report it to admin!"
  92.     };
  93. //-----------------------------------Stocks-----------------------------------//
  94. stock Path(playerid)
  95. {
  96.     new str[128],name[MAX_PLAYER_NAME];
  97.     GetPlayerName(playerid,name,sizeof(name));
  98.     format(str,sizeof(str),UserPath,name);
  99.     return str;
  100. }
  101.  
  102. stock BankPath(playerid)
  103. {
  104.     new string[50];
  105.     format (string, sizeof string, PATH, GetName(playerid) );
  106.     return string;
  107. }
  108.  
  109. stock GetName(playerid)
  110. {
  111.     new name[24];
  112.     GetPlayerName(playerid, name, sizeof name);
  113.     return name;
  114. }
  115. //----------------------------------Forwards----------------------------------//
  116. forward payday(playerid);
  117. public payday(playerid)
  118. {
  119.     new hh, mm, ss;
  120.     gettime( hh, mm, ss );
  121.  
  122.     if( mm == 0 )
  123.     {
  124.         for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
  125.         {
  126.             new string[128];
  127.             new RandomPay = random(20000 - 10000) + 1000;
  128.             GivePlayerMoney(i, RandomPay);
  129.             SetPlayerScore(playerid, GetPlayerScore(playerid) +1);
  130.             SendClientMessage(playerid, COLOR_WHITE,"- Bank Statement -");
  131.             format(string, sizeof(string), "You earn $%i and 1 score!", RandomPay);
  132.             SendClientMessage(i, COLOR_WHITE, string);
  133.         }
  134.     }
  135.     return 1;
  136. }
  137. //----------------------------------------------------------------------------//
  138. forward OnPlayerCommandPerformed(playerid, cmdtext[], success);
  139. forward RandomMessages();
  140. public RandomMessages()
  141. {
  142.     new randomMsg = random(sizeof(randomMessages));
  143.     SendClientMessageToAll(COLOR_YELLOW, randomMessages[randomMsg]);
  144. }
  145. //----------------------------------------------------------------------------//
  146. forward loadaccount_user(playerid, name[], value[]);
  147. public loadaccount_user(playerid, name[], value[])
  148. {
  149.     INI_String("Password", pInfo[playerid][Pass],129);
  150.     INI_Int("AdminLevel",pInfo[playerid][Adminlevel]);
  151.     INI_Int("VIPLevel",pInfo[playerid][VIPlevel]);
  152.     INI_Int("Money",pInfo[playerid][Money]);
  153.     INI_Int("Scores",pInfo[playerid][Scores]);
  154.     INI_Int("Kills",pInfo[playerid][Kills]);
  155.     INI_Int("Deaths",pInfo[playerid][Deaths]);
  156.     INI_Int("Skin",pInfo[playerid][Skin]);
  157.     INI_Int("Balance", pInfo[playerid][Balance]);
  158.  
  159.     INI_String("Color",pInfo[playerid][color],11);
  160.  
  161.     INI_Int("Wep0",pInfo[playerid][pWep0]);
  162.     INI_Int("Wep1",pInfo[playerid][pWep1]);
  163.     INI_Int("Wep2",pInfo[playerid][pWep2]);
  164.     INI_Int("Wep3",pInfo[playerid][pWep3]);
  165.     INI_Int("Wep4",pInfo[playerid][pWep4]);
  166.     INI_Int("Wep5",pInfo[playerid][pWep5]);
  167.     INI_Int("Wep6",pInfo[playerid][pWep6]);
  168.     INI_Int("Wep7",pInfo[playerid][pWep7]);
  169.     INI_Int("Wep8",pInfo[playerid][pWep8]);
  170.     INI_Int("Wep9",pInfo[playerid][pWep9]);
  171.     INI_Int("Wep10",pInfo[playerid][pWep10]);
  172.     INI_Int("Wep11",pInfo[playerid][pWep11]);
  173.     INI_Int("Wep12",pInfo[playerid][pWep12]);
  174.  
  175.     INI_Int("Ammo0",pInfo[playerid][pAmmo0]);
  176.     INI_Int("Ammo1",pInfo[playerid][pAmmo1]);
  177.     INI_Int("Ammo2",pInfo[playerid][pAmmo2]);
  178.     INI_Int("Ammo3",pInfo[playerid][pAmmo3]);
  179.     INI_Int("Ammo4",pInfo[playerid][pAmmo4]);
  180.     INI_Int("Ammo5",pInfo[playerid][pAmmo5]);
  181.     INI_Int("Ammo6",pInfo[playerid][pAmmo6]);
  182.     INI_Int("Ammo7",pInfo[playerid][pAmmo7]);
  183.     INI_Int("Ammo8",pInfo[playerid][pAmmo8]);
  184.     INI_Int("Ammo9",pInfo[playerid][pAmmo9]);
  185.     INI_Int("Ammo10",pInfo[playerid][pAmmo10]);
  186.     INI_Int("Ammo11",pInfo[playerid][pAmmo11]);
  187.     INI_Int("Ammo12",pInfo[playerid][pAmmo12]);
  188.     return 1;
  189. }
  190. //----------------------------------------------------------------------------//
  191. public OnGameModeInit()
  192. {
  193.     Create3DTextLabel("Ammunation",COLOR_GREEN,1368,-1279.87,13.5,17.0,0);
  194.     Create3DTextLabel("Bank",COLOR_GREEN,1480.9916,-1767.313,18.7958,17.0,0);
  195.     Create3DTextLabel("Exit",COLOR_GREEN,285.7743,-86.0662,1001.5229,17.0,0);
  196.     Create3DTextLabel("Exit",COLOR_GREEN,2315.952880,-1.618174,26.742187,17.0,0);
  197.     Create3DTextLabel("Jumping Tower",COLOR_GREEN,1571.3,-1336.59,16.5,17.0,0);
  198.     SetTimer("payday", 60000, 1);
  199.     DisableInteriorEnterExits();
  200.     SetTimer("RandomMessages", 300000, true);
  201.     SetGameModeText("Roleplay | Freeroam");
  202.     for(new i = 0;i<=299;++i)
  203.     AddPlayerClass(i, 1544.7887,-1675.4630,13.5591, 269.1425, 0, 0, 0, 0, 0, 0);
  204.     Create3DTextLabel("MrQwertza",COLOR_GOLD,1020.6615,-1133.6798,22.8281,17.0,0);
  205.     Create3DTextLabel("Strider",COLOR_GOLD,1015.9205,-1133.7853,22.8281,17.0,0);
  206.     Create3DTextLabel("",COLOR_GOLD,1025.3370,-1133.6941,22.8281,17.0,0);
  207.     Create3DTextLabel("",COLOR_GOLD,1029.9656,-1133.8346,22.8281,17.0,0);
  208.     Create3DTextLabel("",COLOR_GOLD,1011.4861,-1133.5690,22.8281,17.0,0);
  209.     Create3DTextLabel("",COLOR_GOLD,1007.1940,-1133.7258,22.8281,17.0,0);
  210.     Create3DTextLabel("",COLOR_GOLD,1034.3885,-1133.7452,22.8203,17.0,0);
  211.     MoneyPickup = CreatePickup(1212, 2, 2447.2202, -1703.4221, 21.7415,-1);
  212.     HealthPickup = CreatePickup(1240, 2, 1172.6287,-1328.0294,15.4028, -1);
  213.     ArmorPickup = CreatePickup(1242, 2, 1172.6287,-1319.4508,15.3944, -1);
  214.     BankPickup = CreatePickup(1274, 23, 1480.9916,-1767.313,18.7958, -1);
  215.     ParachuteEnterExitPickup = CreatePickup(1318, 23, 1571.3,-1336.59,16.5, -1);
  216.     ParachutePickup = CreatePickup(1310, 23, 1544.3,-1353.1,329.5, -1);
  217.     BankExitPickup = CreatePickup(1318, 23, 2315.952880,-1.618174,26.742187, -1);
  218.     AmmuEnterPickup = CreatePickup(1318, 23, 1368,-1279.87,13.5, -1);
  219.     AmmuExitPickup = CreatePickup(1318, 23, 285.7743,-86.0662,1001.5229, -1);
  220.     AmmuDialogPickup = CreatePickup(1318, 23, 295.8464,-80.2575,1001.5156, -1);
  221.     AddStaticVehicle(405, 1586.6458, -1770.1246, 13.1440, 90, 5, 0);
  222.     AddStaticVehicle(410, 1355.9316,-1665.8553,13.2789, 270, 4, 0);
  223.     AddStaticVehicle(412, 1225.4404,-1535.2810,13.2149, 0, 6, 0);
  224.     AddStaticVehicle(419, 1183.6580,-1258.0902,14.8483,360, 8, 0);
  225.     AddStaticVehicle(426, 972.7076,-1263.6611,15.5865,180, 10, 0);
  226.     AddStaticVehicle(436, 1219.4059,-1109.2306,24.4679,90, 12, 0);
  227.     AddStaticVehicle(439, 1123.0521,-1023.2177,30.7767,180, 14, 0);
  228.     AddStaticVehicle(442, 929.3441, -1064.0240, 23.9579, 180, 16, 0);
  229.     AddStaticVehicle(445, 1122.7858,-1064.8257,29.1096,180, 18, 0);
  230.     AddStaticVehicle(458, 1010.5251,-1300.8312,13.0520,180, 20, 0);
  231.     AddStaticVehicle(459, 981.9323,-1609.6893,13.1970,180, 22, 0);
  232.     AddStaticVehicle(461, 892.5747,-1669.0612,13.2194,180, 24, 0);
  233.     AddStaticVehicle(475, 892.5103,-1658.4998,13.2161,180, 26, 0);
  234.     AddStaticVehicle(474, 888.0833,-1669.0879,13.2159,180, 28, 0);
  235.     AddStaticVehicle(480, 870.0215,-1668.8418,13.2160,180, 30, 0);
  236.     AddStaticVehicle(404, 997.9507,-1823.6637,13.2791,360, 32, 0);
  237.     AddStaticVehicle(405, 1063.6067,-1760.8799,12.9775,270, 34, 0);
  238.     AddStaticVehicle(412, 1099.0461,-1757.9100,12.9359,90, 36, 0);
  239.     AddStaticVehicle(419, 1107.1188,-1665.4589,13.3243,90, 38, 0);
  240.     AddStaticVehicle(426, 1168.1591,-1637.1924,13.5810,270, 40, 0);
  241.     AddStaticVehicle(439, 1283.3706,-1610.8307,13.1254,270, 42, 0);
  242.     AddStaticVehicle(442, 1982.5493,-1674.9703,15.5476,270, 44, 0);
  243.     AddStaticVehicle(445, 2128.4753,-1737.3594,13.1383,180, 46, 0);
  244.     AddStaticVehicle(458, 2268.3286,-1694.7526,13.2507,0, 48, 0);
  245.     AddStaticVehicle(459, 2384.2805,-1644.7355,13.1064,180, 50, 0);
  246.     AddStaticVehicle(461, 2473.2629,-1699.9210,13.0966,180, 52, 0);
  247.     AddStaticVehicle(475, 2089.2529,-1557.0612,12.7095,180, 54, 0);
  248.     AddStaticVehicle(474, 2094.9209,-1556.8596,12.6865,0, 56, 0);
  249.     AddStaticVehicle(415, 1389.9169,-1897.5911,13.0812,370, 58, 0);
  250.     AddStaticVehicle(407, 1751.6458,-1456.1102,13.1315,270, 3, 0);
  251.     AddStaticVehicle(428, 1454.6941,-1751.1241,13.1317,360, 116, 52);
  252.     AddStaticVehicle(428, 1507.4868,-1751.1241,13.1317,360, 116, 52);
  253.     AddStaticVehicle(409,1249.00000000,-2010.00000000,59.70000076,270.00000000, 0, 0);
  254.     AddStaticVehicle(409,1249.00000000,-2015.00000000,59.70000076,270.00000000, 0, 0);
  255.     AddStaticVehicle(409,1249.00000000,-2020.00000000,59.70000076,270.00000000, 0, 0);
  256.     AddStaticVehicle(409,1249.00000000,-2025.00000000,59.70000076,270.00000000, 0, 0);
  257.     AddStaticVehicle(409,1249.00000000,-2030.00000000,59.70000076,270.00000000, 0, 0);
  258.     AddStaticVehicle(579,1276.00000000,-2010.00000000,59.00000000,90.00000000, 0, 0);
  259.     AddStaticVehicle(579,1276.00000000,-2015.00000000,59.00000000,90.00000000, 0, 0);
  260.     AddStaticVehicle(579,1276.00000000,-2020.00000000,59.00000000,90.00000000, 0, 0);
  261.     AddStaticVehicle(579,1276.00000000,-2025.00000000,59.00000000,90.00000000, 0, 0);
  262.     AddStaticVehicle(579,1276.00000000,-2030.00000000,59.00000000,90.00000000, 0, 0);
  263.     AddStaticVehicle(487,1116.50000000,-2053.00000000,74.69999695,0.00000000, 0, 0);
  264.     AddStaticVehicle(487,1116.50000000,-2021.00000000,74.69999695,180.00000000, 0, 0);
  265.     AddStaticVehicle(416,1181.00000000,-1339.00000000,14.10000038,270.00000000, 1,3);
  266.     AddStaticVehicle(416,1181.00000000,-1308.50000000,14.10000038,270.00000000, 1,3);
  267.     AddStaticVehicle(563,1163.00000000,-1355.00000000,27.50000000,270.00000000, 3,1);
  268.     AddStaticVehicle(563,1163.00000000,-1367.50000000,27.50000000,270.00000000, 3,1);
  269.     AddStaticVehicle(596,1601.00000000,-1684.00000000,5.69999981,90.00000000, 0, 1);
  270.     AddStaticVehicle(596,1601.00000000,-1688.00000000,5.69999981,90.00000000, 0, 1);
  271.     AddStaticVehicle(596,1601.00000000,-1692.00000000,5.69999981,90.00000000, 0, 1);
  272.     AddStaticVehicle(596,1601.00000000,-1696.09997559,5.69999981,90.00000000, 0, 1);
  273.     AddStaticVehicle(596,1601.00000000,-1700.09997559,5.69999981,90.00000000, 0, 1);
  274.     AddStaticVehicle(596,1601.00000000,-1704.19995117,5.69999981,90.00000000, 0, 1);
  275.     AddStaticVehicle(427,1526.64001465,-1645.30004883,6.09999990,180.00000000, 0, 1);
  276.     AddStaticVehicle(427,1530.65002441,-1645.30004883,6.09999990,180.00000000, 0, 1);
  277.     AddStaticVehicle(601,1534.65002441,-1645.30004883,5.80000019,180.00000000, 0, 1);
  278.     AddStaticVehicle(601,1538.66003418,-1645.30004883,5.80000019,180.00000000, 0, 1);
  279.     AddStaticVehicleEx(520,1950.00000000,-2642.00000000,14.50000000,0.00000000,-1,-1,15);
  280.     AddStaticVehicleEx(593,1996.00000000,-2642.00000000,14.10000038,0.00000000,-1,-1,15);
  281.     AddStaticVehicleEx(512,2042.00000000,-2642.00000000,14.19999981,0.00000000,-1,-1,15);
  282.     AddStaticVehicleEx(592,2000.80004883,-2493.89990234,14.69999981,90.00000000,1,1,15);
  283.     AddStaticVehicleEx(577,1955.00000000,-2275.00000000,13.50000000,140.00000000,16,1,15);
  284.     AddStaticVehicleEx(577,1955.00000000,-2363.00000000,13.50000000,139.99877930,16,1,15);
  285.     AddStaticVehicleEx(476,2061.50000000,-2601.00000000,14.69999981,90.00000000,1,103,15);
  286.     AddStaticVehicleEx(476,2061.50000000,-2586.00000000,14.69999981,90.00000000,1,103,15);
  287.     AddStaticVehicleEx(476,2042.50000000,-2601.00000000,14.69999981,90.00000000,1,103,15);
  288.     AddStaticVehicleEx(476,2042.50000000,-2586.00000000,14.69999981,90.00000000,1,103,15);
  289.     AddStaticVehicleEx(519,1889.40002441,-2624.00000000,14.50000000,0.00000000,-1,-1,15);
  290.     AddStaticVehicleEx(487,1822.40002441,-2623.39990234,13.80000019,0.00000000,-1,-1,15);
  291.     CreateObject(968,1544.69995117,-1630.80004883,13.10000038,0.00000000,0.00000000,90.00000000);
  292.     CreateObject(8674,1544.69995117,-1622.19995117,9.00000000,0.00000000,90.00000000,269.99993896);
  293.     CreateObject(8674,1544.69995117,-1619.30004883,9.00000000,0.00000000,90.00000000,270.00000000);
  294.     CreateObject(8674,1544.50000000,-1634.19995117,9.00000000,0.00000000,90.00000000,90.00000000);
  295.     CreateObject(8674,1544.50000000,-1637.14001465,9.00000000,0.00000000,90.00000000,90.00000000);
  296.     CreateObject(968,2238.19995117,2450.39990234,10.60000038,0.00000000,0.00000000,90.00000000);
  297.     CreateObject(980,1590.19995117,-1638.09997559,14.80000019,0.00000000,0.00000000,0.00000000);
  298.     CreateObject(8572,1173.90002441,-1377.19995117,24.20999908,0.00000000,0.00000000,90.00000000);
  299.     CreateObject(13011,1186.30004883,-1379.00000000,19.62999916,0.00000000,0.00000000,180.00000000);
  300.     CreateObject(12950,1186.30004883,-1372.46997070,14.69999981,0.00000000,0.00000000,180.00000000);
  301.     CreateObject(12950,1186.30004883,-1365.88000488,9.77000046,0.00000000,0.00000000,179.99450684);
  302.     CreateObject(3934,1163.09997559,-1355.09997559,25.70000076,0.00000000,0.00000000,0.00000000);
  303.     CreateObject(3928,1162.76660156,-1374.74218750,25.45155716,0.00000000,0.00000000,0.00000000);
  304.     CreateObject(3934,1162.63769531,-1374.07714844,25.43991089,0.00000000,0.00000000,0.00000000);
  305.     CreateObject(3934,1163.19995117,-1367.40002441,25.70000076,0.00000000,0.00000000,0.00000000);
  306.     CreateObject(2942,1367.30004883,-1290.30004883,13.19999981,0.00000000,0.00000000,270.00000000);
  307.     CreateObject(3268,1950.00000000,-2642.00000000,12.50000000,0.00000000,0.00000000,270.00000000);
  308.     CreateObject(3268,1996.00000000,-2642.00000000,12.50000000,0.00000000,0.00000000,270.00000000);
  309.     CreateObject(3268,2042.00000000,-2642.00000000,12.50000000,0.00000000,0.00000000,270.00000000);
  310.     CreateObject(3934,1822.40002441,-2623.30004883,12.60000038,0.00000000,0.00000000,269.99996948);
  311.     return 1;
  312. }
  313. //--------------------------------Server Start--------------------------------//
  314. public OnGameModeExit()
  315. {
  316.     return 1;
  317. }
  318. //----------------------------------------------------------------------------//
  319. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  320. {
  321.     if(!success) return 1;
  322.     return 1;
  323. }
  324. //----------------------------------------------------------------------------//
  325. public OnPlayerRequestClass(playerid, classid)
  326. {
  327.     if( pInfo[playerid][Skin] == -1)
  328.     {
  329.     SetPlayerInterior(playerid,0);
  330.     SetPlayerPos(playerid,249.8809,1852.4695,8.7625);
  331.     SetPlayerCameraPos(playerid,250.0132,1849.3933,8.7734);
  332.     SetPlayerCameraLookAt(playerid,249.8809,1852.4695,8.7625);
  333.     SetPlayerFacingAngle(playerid,177.0050);
  334.     }
  335.     else
  336.     {
  337.     SetSpawnInfo(playerid, 1,0, 963.7003,-1616.3728,14.7561,180, 0,0,0,0,0,0);
  338.     SetPlayerSkin(playerid,pInfo[playerid][Skin]);
  339.  
  340.     if(strcmp("white",pInfo[playerid][color],false)==0)
  341.         SetPlayerColor(playerid,COLOR_WHITE);
  342.     else if(strcmp("green",pInfo[playerid][color],false)==0)
  343.         SetPlayerColor(playerid,COLOR_GREEN);
  344.     else if(strcmp("red",pInfo[playerid][color],false)==0)
  345.         SetPlayerColor(playerid,COLOR_RED);
  346.     else if(strcmp("yellow",pInfo[playerid][color],false)==0)
  347.         SetPlayerColor(playerid,COLOR_YELLOW);
  348.     else if(strcmp("blue",pInfo[playerid][color],false)==0)
  349.         SetPlayerColor(playerid,COLOR_BLUE);
  350.     else if(strcmp("purple",pInfo[playerid][color],false)==0)
  351.         SetPlayerColor(playerid,COLOR_PURPLE);
  352.     else if(strcmp("gold",pInfo[playerid][color],false)==0)
  353.         SetPlayerColor(playerid,COLOR_GOLD);
  354.     else if(strcmp("pink",pInfo[playerid][color],false)==0)
  355.         SetPlayerColor(playerid,COLOR_PINK);
  356.     else SetPlayerColor(playerid,COLOR_WHITE);
  357.  
  358.     SpawnPlayer(playerid);
  359.     }
  360.     return 1;
  361. }
  362. //----------------------------------------------------------------------------//
  363. public OnPlayerConnect(playerid)
  364. {
  365.     TogglePlayerSpectating(playerid,1);
  366.     new Country[256];
  367.     GetPlayerCountry(playerid,Country);
  368.     new mess[256],IP[256];
  369.     GetPlayerIp(playerid,IP,sizeof(IP));
  370.     format(mess,sizeof(mess),"%s joined from %s!",GetPName(playerid),Country);
  371.     printf(mess);
  372.     SendClientMessageToAll(COLOR_JOIN,mess);
  373.    
  374.     Anim[playerid] =0;
  375.     grider[playerid][0] = 0;
  376.     grider[playerid][1] = 0;
  377.     grider[playerid][2] = 0;
  378.     pInfo[playerid][Skin] = -1;
  379.     new name[MAX_PLAYER_NAME];
  380.     GetPlayerName(playerid,name,sizeof(name));
  381.     if(fexist(Path(playerid)))
  382.     {
  383.         INI_ParseFile(Path(playerid),"loadaccount_%s", .bExtra = true, .extra = playerid);
  384.         ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"Login","Welcome back. Enter your passsword to login!","Login","Quit");
  385.     }
  386.     else
  387.     {
  388.         ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Register","Welcome! Enter your passsword to register!","Register","Quit");
  389.         return 1;
  390.     }
  391.     RemoveBuildingForPlayer(playerid, 4003, 1481.0781, -1747.0313, 33.5234, 0.25);
  392.     RemoveBuildingForPlayer(playerid, 3769, 1961.4453, -2216.1719, 14.9844, 0.25);
  393.     RemoveBuildingForPlayer(playerid, 3664, 1960.6953, -2236.4297, 19.2813, 0.25);
  394.     RemoveBuildingForPlayer(playerid, 5031, 2037.0469, -2313.5469, 18.7109, 0.25);
  395.     RemoveBuildingForPlayer(playerid, 1412, 1949.3438, -2227.5156, 13.6563, 0.25);
  396.     RemoveBuildingForPlayer(playerid, 1412, 1944.0625, -2227.5156, 13.6563, 0.25);
  397.     RemoveBuildingForPlayer(playerid, 1412, 1954.6172, -2227.4844, 13.6875, 0.25);
  398.     RemoveBuildingForPlayer(playerid, 1412, 1965.1719, -2227.4141, 13.7578, 0.25);
  399.     RemoveBuildingForPlayer(playerid, 1412, 1959.8984, -2227.4453, 13.7266, 0.25);
  400.     RemoveBuildingForPlayer(playerid, 3625, 1961.4453, -2216.1719, 14.9844, 0.25);
  401.     RemoveBuildingForPlayer(playerid, 1412, 1975.7266, -2227.4141, 13.7578, 0.25);
  402.     RemoveBuildingForPlayer(playerid, 1412, 1970.4453, -2227.4141, 13.7578, 0.25);
  403.     RemoveBuildingForPlayer(playerid, 1412, 1981.0000, -2227.4141, 13.7578, 0.25);
  404.     RemoveBuildingForPlayer(playerid, 1412, 1996.8281, -2227.3828, 13.7891, 0.25);
  405.     RemoveBuildingForPlayer(playerid, 1412, 1991.5547, -2227.4141, 13.7578, 0.25);
  406.     RemoveBuildingForPlayer(playerid, 1412, 1986.2813, -2227.4141, 13.7578, 0.25);
  407.     RemoveBuildingForPlayer(playerid, 1308, 1983.8047, -2224.1641, 12.7500, 0.25);
  408.     RemoveBuildingForPlayer(playerid, 1412, 2002.1094, -2227.3438, 13.8281, 0.25);
  409.     RemoveBuildingForPlayer(playerid, 1308, 2018.0313, -2224.1641, 12.7500, 0.25);
  410.     RemoveBuildingForPlayer(playerid, 5998, 913.9531, -1015.6328, 72.5313, 0.25);
  411.     RemoveBuildingForPlayer(playerid, 6489, 715.4063, -1236.2188, 19.1641, 0.25);
  412.  
  413.     return 1;
  414. }
  415. //----------------------------------------------------------------------------//
  416. public OnPlayerDisconnect(playerid, reason)
  417. {
  418.         new weapons[13][2];
  419.         for (new i = 0; i < 13; i++)
  420.         {
  421.             GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
  422.         }
  423.        
  424.         new INI:file = INI_Open(Path(playerid));
  425.         INI_SetTag(file,"Player's Data");
  426.         INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]);
  427.         INI_WriteInt(file,"VIPLevel",pInfo[playerid][VIPlevel]);
  428.         INI_WriteInt(file,"Money",GetPlayerMoney(playerid));
  429.         INI_WriteInt(file,"Scores",GetPlayerScore(playerid));
  430.         INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);
  431.         INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);
  432.         INI_WriteInt(file,"Skin",GetPlayerSkin(playerid));
  433.         INI_WriteInt(file,"Balance",pInfo[playerid][Balance]);
  434.  
  435.         INI_WriteString(file,"Color",pInfo[playerid][color]);
  436.  
  437.         INI_WriteInt(file,"Wep0",weapons[0][0]);
  438.         INI_WriteInt(file,"Wep1",weapons[1][0]);
  439.         INI_WriteInt(file,"Wep2",weapons[2][0]);
  440.         INI_WriteInt(file,"Wep3",weapons[3][0]);
  441.         INI_WriteInt(file,"Wep4",weapons[4][0]);
  442.         INI_WriteInt(file,"Wep5",weapons[5][0]);
  443.         INI_WriteInt(file,"Wep6",weapons[6][0]);
  444.         INI_WriteInt(file,"Wep7",weapons[7][0]);
  445.         INI_WriteInt(file,"Wep8",weapons[8][0]);
  446.         INI_WriteInt(file,"Wep9",weapons[9][0]);
  447.         INI_WriteInt(file,"Wep10",weapons[10][0]);
  448.         INI_WriteInt(file,"Wep11",weapons[11][0]);
  449.         INI_WriteInt(file,"Wep12",weapons[12][0]);
  450.    
  451.  
  452.         INI_WriteInt(file,"Ammo0",weapons[0][1]);
  453.         INI_WriteInt(file,"Ammo1",weapons[1][1]);
  454.         INI_WriteInt(file,"Ammo2",weapons[2][1]);
  455.         INI_WriteInt(file,"Ammo3",weapons[3][1]);
  456.         INI_WriteInt(file,"Ammo4",weapons[4][1]);
  457.         INI_WriteInt(file,"Ammo5",weapons[5][1]);
  458.         INI_WriteInt(file,"Ammo6",weapons[6][1]);
  459.         INI_WriteInt(file,"Ammo7",weapons[7][1]);
  460.         INI_WriteInt(file,"Ammo8",weapons[8][1]);
  461.         INI_WriteInt(file,"Ammo9",weapons[9][1]);
  462.         INI_WriteInt(file,"Ammo10",weapons[10][1]);
  463.         INI_WriteInt(file,"Ammo11",weapons[11][1]);
  464.         INI_WriteInt(file,"Ammo12",weapons[12][1]);
  465.        
  466.         INI_Close(file);
  467.         if(grider[playerid][0])
  468.         {
  469.             DestroyObject(grider[playerid][0]);
  470.             DestroyObject(grider[playerid][1]);
  471.             DestroyObject(grider[playerid][2]);
  472.             grider[playerid][0] = 0;
  473.         }
  474.         new Country[256];
  475.         GetPlayerCountry(playerid,Country);
  476.         new mess[256],IP[256];
  477.         GetPlayerIp(playerid,IP,sizeof(IP));
  478.         format(mess,sizeof(mess),"%s left the server",GetPName(playerid));
  479.         printf(mess);
  480.         SendClientMessageToAll(COLOR_JOIN,mess);
  481.         return 1;
  482. }
  483. //----------------------------------------------------------------------------//
  484. forward SetPlayerIcon(playerid);
  485. public SetPlayerIcon(playerid)
  486. {
  487.     for(new i=0;i<MAX_PLAYERS;++i)
  488.     {
  489.         if(IsPlayerConnected(i) && i!=playerid)
  490.             SetPlayerMarkerForPlayer(i,playerid,pInfo[playerid][color]);
  491.     }
  492.     return 1;
  493. }
  494. //----------------------------------------------------------------------------//
  495. public OnPlayerSpawn(playerid)
  496. {
  497.         ClearAnimations(playerid);
  498.         Anim[playerid] =0;
  499.  
  500.         if(GetPlayerColor(playerid) == COLOR_WHITE)
  501.             format(pInfo[playerid][color],11,"white");
  502.         else if(GetPlayerColor(playerid) == COLOR_GREEN)
  503.             format(pInfo[playerid][color],11,"green");
  504.         else if(GetPlayerColor(playerid) == COLOR_RED)
  505.             format(pInfo[playerid][color],11,"red");
  506.         else if(GetPlayerColor(playerid) == COLOR_YELLOW)
  507.             format(pInfo[playerid][color],11,"yellow");
  508.         else if(GetPlayerColor(playerid) == COLOR_BLUE)
  509.             format(pInfo[playerid][color],11,"blue");
  510.         else if(GetPlayerColor(playerid) == COLOR_PURPLE)
  511.             format(pInfo[playerid][color],11,"purple");
  512.         else if(GetPlayerColor(playerid) == COLOR_GOLD)
  513.             format(pInfo[playerid][color],11,"gold");
  514.         else if(GetPlayerColor(playerid) == COLOR_PINK)
  515.             format(pInfo[playerid][color],11,"pink");
  516.  
  517.         SetPlayerIcon(playerid);//To set Map Icon
  518.        
  519.         if(pInfo[playerid][pWep0]!=0 && pInfo[playerid][pAmmo0]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep0],pInfo[playerid][pAmmo0]);
  520.         if(pInfo[playerid][pWep1]!=0 && pInfo[playerid][pAmmo1]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep1],pInfo[playerid][pAmmo1]);
  521.         if(pInfo[playerid][pWep2]!=0 && pInfo[playerid][pAmmo2]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep2],pInfo[playerid][pAmmo2]);
  522.         if(pInfo[playerid][pWep3]!=0 && pInfo[playerid][pAmmo3]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep3],pInfo[playerid][pAmmo3]);
  523.         if(pInfo[playerid][pWep4]!=0 && pInfo[playerid][pAmmo4]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep4],pInfo[playerid][pAmmo4]);
  524.         if(pInfo[playerid][pWep5]!=0 && pInfo[playerid][pAmmo5]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep5],pInfo[playerid][pAmmo5]);
  525.         if(pInfo[playerid][pWep6]!=0 && pInfo[playerid][pAmmo6]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep6],pInfo[playerid][pAmmo6]);
  526.         if(pInfo[playerid][pWep7]!=0 && pInfo[playerid][pAmmo7]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep7],pInfo[playerid][pAmmo7]);
  527.         if(pInfo[playerid][pWep8]!=0 && pInfo[playerid][pAmmo8]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep8],pInfo[playerid][pAmmo8]);
  528.         if(pInfo[playerid][pWep9]!=0 && pInfo[playerid][pAmmo9]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep9],pInfo[playerid][pAmmo9]);
  529.         if(pInfo[playerid][pWep10]!=0 && pInfo[playerid][pAmmo10]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep10],pInfo[playerid][pAmmo10]);
  530.         if(pInfo[playerid][pWep11]!=0 && pInfo[playerid][pAmmo11]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep11],pInfo[playerid][pAmmo11]);
  531.         if(pInfo[playerid][pWep12]!=0 && pInfo[playerid][pAmmo12]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep12],pInfo[playerid][pAmmo12]);
  532.        
  533.         SetPlayerMapIcon(playerid, 0, 1368.1658,-1279.8181,13.1277, 6, 0, MAPICON_GLOBAL );
  534.         SetPlayerMapIcon(playerid, 1, 1173.9036,-1323.3005,14.6888, 22, 0, MAPICON_GLOBAL );
  535.         SetPlayerMapIcon(playerid, 2, 1554.4109,-1675.0834,15.7685, 30, 0, MAPICON_LOCAL );
  536.         SetPlayerMapIcon(playerid, 3, 2104.8101,-1806.4109,13.2323, 29, 0, MAPICON_LOCAL );
  537.         SetPlayerMapIcon(playerid, 4, 2068.8477,-1831.4530,13.2163, 63, 0, MAPICON_LOCAL );
  538.         SetPlayerMapIcon(playerid, 5, 1832.5752,-1842.6942,13.2467, 17, 0, MAPICON_LOCAL );
  539.         SetPlayerMapIcon(playerid, 6, 1041.4282,-1027.3302,31.7698, 27, 0, MAPICON_LOCAL );
  540.         SetPlayerMapIcon(playerid, 7, 1004.0070,-939.3102,42.1797, 55, 0, MAPICON_LOCAL );
  541.         SetPlayerMapIcon(playerid, 8, -90.5515,-1169.4578,2.4079, 55, 0, MAPICON_LOCAL );
  542.         SetPlayerMapIcon(playerid, 9, -2029.4968,156.4366,28.9498, 55, 0, MAPICON_LOCAL );
  543.         SetPlayerMapIcon(playerid, 10, -2243.9629,-2560.6477,31.8841, 55, 0, MAPICON_LOCAL );
  544.         SetPlayerMapIcon(playerid, 11, 2202.2349,2474.3494,10.5258, 55, 0, MAPICON_LOCAL );
  545.         SetPlayerMapIcon(playerid, 12, -1328.8250,2677.2173,49.7665, 55, 0, MAPICON_LOCAL );
  546.         SetPlayerMapIcon(playerid, 13, 2113.7390,920.1079,10.5255, 55, 0, MAPICON_LOCAL );
  547.         SetPlayerMapIcon(playerid, 14, 656.4265,-559.8610,16.5015, 55, 0, MAPICON_LOCAL );
  548.         SetPlayerMapIcon(playerid, 15, 1944.3260,-1772.9254,13.3906, 55, 0, MAPICON_LOCAL );
  549.         SetPlayerMapIcon(playerid, 16, -1609.7958,-2718.2048,48.5391, 55, 0, MAPICON_LOCAL );
  550.         SetPlayerMapIcon(playerid, 17, -2408.7590,976.0934,45.4175, 55, 0, MAPICON_LOCAL );
  551.         SetPlayerMapIcon(playerid, 18, -1676.6323,414.0262,6.9484, 55, 0, MAPICON_LOCAL );
  552.         SetPlayerMapIcon(playerid, 19, 614.9333,1689.7418,6.6968, 55, 0, MAPICON_LOCAL );
  553.         SetPlayerMapIcon(playerid, 20, 656.4265,-559.8610,16.5015, 55, 0, MAPICON_LOCAL );
  554.         SetPlayerMapIcon(playerid, 21, 70.3882,1218.6783,18.5165, 55, 0, MAPICON_LOCAL );
  555.         SetPlayerMapIcon(playerid, 22, -1327.7218,2678.8723,50.0625, 55, 0, MAPICON_LOCAL );
  556.         SetPlayerMapIcon(playerid, 23, 656.3797,-570.4138,16.5015, 55, 0, MAPICON_LOCAL );
  557.         SetPlayerMapIcon(playerid, 24, 1480.9916,-1767.313,18.7958, 52, 0, MAPICON_GLOBAL );
  558.         return 1;
  559. }
  560. //----------------------------------------------------------------------------//
  561. public OnPlayerDeath(playerid, killerid, reason)
  562. {
  563.     ClearAnimations(playerid);
  564.     Anim[playerid] =0;
  565.     SendDeathMessage(killerid, playerid, reason);
  566.     pInfo[killerid][Kills]++;
  567.     pInfo[playerid][Deaths]++;
  568.     return 1;
  569. }
  570. //----------------------------------------------------------------------------//
  571. public OnVehicleSpawn(vehicleid)
  572. {
  573.     return 1;
  574. }
  575. //----------------------------------------------------------------------------//
  576. public OnVehicleDeath(vehicleid, killerid)
  577. {
  578.     return 1;
  579. }
  580. //----------------------------------------------------------------------------//
  581. public OnPlayerText(playerid, text[])
  582. {
  583.     return 1;
  584. }
  585. //----------------------------------------------------------------------------//
  586. public OnPlayerCommandText(playerid, cmdtext[])
  587. {
  588.     return 1;
  589. }
  590. //----------------------------------------------------------------------------//
  591. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  592. {
  593.     return 1;
  594. }
  595. //----------------------------------------------------------------------------//
  596. public OnPlayerExitVehicle(playerid, vehicleid)
  597. {
  598.     return 1;
  599. }
  600. //----------------------------------------------------------------------------//
  601. public OnPlayerStateChange(playerid, newstate, oldstate)
  602. {
  603.         if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
  604.         {
  605.             if(grider[playerid][0])
  606.             {
  607.                 DestroyObject(grider[playerid][0]);
  608.                 DestroyObject(grider[playerid][1]);
  609.                 DestroyObject(grider[playerid][2]);
  610.                 grider[playerid][0] = 0;
  611.             }
  612.         }
  613.         if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_WASTED)
  614.         {
  615.             if(grider[playerid][0])
  616.             {
  617.                 DestroyObject(grider[playerid][0]);
  618.                 DestroyObject(grider[playerid][1]);
  619.                 DestroyObject(grider[playerid][2]);
  620.                 grider[playerid][0] = 0;
  621.             }
  622.         }
  623.         return 1;
  624. }
  625. //----------------------------------------------------------------------------//
  626. public OnPlayerEnterCheckpoint(playerid)
  627. {
  628.     DisablePlayerCheckpoint(playerid);
  629.     return 1;
  630. }
  631. //----------------------------------------------------------------------------//
  632. public OnPlayerLeaveCheckpoint(playerid)
  633. {
  634.     return 1;
  635. }
  636. //----------------------------------------------------------------------------//
  637. public OnPlayerEnterRaceCheckpoint(playerid)
  638. {
  639.     return 1;
  640. }
  641. //----------------------------------------------------------------------------//
  642. public OnPlayerLeaveRaceCheckpoint(playerid)
  643. {
  644.     return 1;
  645. }
  646. //----------------------------------------------------------------------------//
  647. public OnRconCommand(cmd[])
  648. {
  649.     return 1;
  650. }
  651. //----------------------------------------------------------------------------//
  652. public OnPlayerRequestSpawn(playerid)
  653. {
  654.     return 1;
  655. }
  656. //----------------------------------------------------------------------------//
  657. public OnObjectMoved(objectid)
  658. {
  659.     return 1;
  660. }
  661. //----------------------------------------------------------------------------//
  662. public OnPlayerObjectMoved(playerid, objectid)
  663. {
  664.     return 1;
  665. }
  666. //----------------------------------------------------------------------------//
  667. public OnPlayerPickUpPickup(playerid, pickupid)
  668. {
  669.     if(pickupid == MoneyPickup)
  670.     {
  671.        
  672.         new string[128], pName[MAX_PLAYER_NAME];
  673.         GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  674.         format(string,sizeof string,"Congratulations to %s for finding hidden money. He won $1,000,000 and 2 score!",pName);
  675.         GivePlayerMoney(playerid, 1000000);
  676.         SetPlayerScore(playerid, GetPlayerScore(playerid) + 2);
  677.         SendClientMessageToAll(COLOR_YELLOW,string);
  678.     }
  679.     if(pickupid == HealthPickup)
  680.     {
  681.         SetPlayerHealth(playerid, 100);
  682.     }
  683.     if(pickupid == ParachutePickup)
  684.     {
  685.         GivePlayerWeapon(playerid, 46, 100);
  686.     }
  687.     if(pickupid == ArmorPickup)
  688.     {
  689.         SetPlayerHealth(playerid, 100);
  690.     }
  691.     if(pickupid == BankPickup)
  692.     {
  693.         SetPlayerPos(playerid,2304.9517,-16.1671,26.7422);
  694.     }
  695.     if(pickupid == BankExitPickup)
  696.     {
  697.         SetPlayerInterior(playerid,0);
  698.         SetPlayerPos(playerid,1481.0139,-1763.1412,18.7958);
  699.     }
  700.     if(pickupid == ParachuteEnterExitPickup)
  701.     {
  702.         SetPlayerPos(playerid,1548.7,-1364,326.20001220703);
  703.     }
  704.     if(pickupid == AmmuEnterPickup)
  705.     {
  706.         SetPlayerInterior(playerid,4);
  707.         SetPlayerPos(playerid,286.5032,-84.4113,1001.5156);
  708.     }
  709.     if(pickupid == AmmuExitPickup)
  710.     {
  711.         SetPlayerInterior(playerid,0);
  712.         SetPlayerPos(playerid,1365,-1279.87,13.5);
  713.     }
  714.     if(pickupid == AmmuDialogPickup)
  715.     {
  716.         ShowPlayerDialog(playerid,AmmuGuns,DIALOG_STYLE_LIST,"Ammunation market","Baseball Bat      $1500\nChainsaw         $6500\n9mm          $2500\nDesert Eagle         $3000\nSawn-Off Shotgun     $4500\nCombat Shotgun   $6000\nMac10            $5000\nTec9             $5000\nMP5          $5500\nM4           $10000\nAK47            $10000\nSniper Rifle        $12500\nParachute       $3500","Buy","Cancel");
  717.     }
  718.     return 1;
  719. }
  720. //----------------------------------------------------------------------------//
  721. public OnVehicleMod(playerid, vehicleid, componentid)
  722. {
  723.     return 1;
  724. }
  725. //----------------------------------------------------------------------------//
  726. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  727. {
  728.     return 1;
  729. }
  730. //----------------------------------------------------------------------------//
  731. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  732. {
  733.     return 1;
  734. }
  735. //----------------------------------------------------------------------------//
  736. public OnPlayerSelectedMenuRow(playerid, row)
  737. {
  738.     return 1;
  739. }
  740. //----------------------------------------------------------------------------//
  741. public OnPlayerExitedMenu(playerid)
  742. {
  743.     return 1;
  744. }
  745. //----------------------------------------------------------------------------//
  746. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  747. {
  748.     return 1;
  749. }
  750. //----------------------------------------------------------------------------//
  751. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  752. {
  753.     return 1;
  754. }
  755. //----------------------------------------------------------------------------//
  756. public OnRconLoginAttempt(ip[], password[], success)
  757. {
  758.     return 1;
  759. }
  760. //----------------------------------------------------------------------------//
  761. public OnPlayerUpdate(playerid)
  762. {
  763.     return 1;
  764. }
  765. //----------------------------------------------------------------------------//
  766. public OnPlayerStreamIn(playerid, forplayerid)
  767. {
  768.     return 1;
  769. }
  770. //----------------------------------------------------------------------------//
  771. public OnPlayerStreamOut(playerid, forplayerid)
  772. {
  773.     return 1;
  774. }
  775. //----------------------------------------------------------------------------//
  776. public OnVehicleStreamIn(vehicleid, forplayerid)
  777. {
  778.     return 1;
  779. }
  780. //----------------------------------------------------------------------------//
  781. public OnVehicleStreamOut(vehicleid, forplayerid)
  782. {
  783.     return 1;
  784. }
  785. //----------------------------------------------------------------------------//
  786. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  787. {
  788.         //--------------------------------------------------------------------//
  789.         if(dialogid == serverrules)
  790.         {
  791.             if(response)
  792.             {
  793.                 SendClientMessage(playerid,0xFB0000FF,"You accepted our rules! You can play now!");
  794.             }
  795.             else if(!response)
  796.             {
  797.                 SendClientMessage(playerid,0xFB0000FF,"You disagree our rules! Have a nice day!");
  798.                 Kick(playerid);
  799.             }
  800.         }
  801.         //--------------------------------------------------------------------//
  802.         if(dialogid == getguns)
  803.         {
  804.             if(listitem == 0) GivePlayerWeapon(playerid, 10, 9999);
  805.             if(listitem == 1) GivePlayerWeapon(playerid, 14, 9999);
  806.             if(listitem == 2) GivePlayerWeapon(playerid, 24, 9999);
  807.             if(listitem == 3) GivePlayerWeapon(playerid, 26, 9999);
  808.             if(listitem == 4) GivePlayerWeapon(playerid, 29, 9999);
  809.             if(listitem == 5) GivePlayerWeapon(playerid, 31, 9999);
  810.             if(listitem == 6) GivePlayerWeapon(playerid, 30, 9999);
  811.             if(listitem == 7) GivePlayerWeapon(playerid, 34, 9999);
  812.             if(listitem == 8) GivePlayerWeapon(playerid, 35, 9999);
  813.             if(listitem == 9) GivePlayerWeapon(playerid, 38, 9999);
  814.             return 1;
  815.         }
  816.         //--------------------------------------------------------------------//
  817.         if(dialogid == AmmuGuns)
  818.         {
  819.             if(response)
  820.                 {
  821.                 if(listitem == 0)
  822.                 {
  823.                     if(GetPlayerMoney(playerid) > 1500)
  824.                     {
  825.                         GivePlayerWeapon(playerid, 5, 100);
  826.                         GivePlayerMoney(playerid,-1500);
  827.                     }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
  828.                 }
  829.                 if(listitem == 1)
  830.                 {
  831.                     if(GetPlayerMoney(playerid) > 6500)
  832.                     {
  833.                         GivePlayerWeapon(playerid, 9, 100);
  834.                         GivePlayerMoney(playerid,-6500);
  835.                     }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
  836.                 }
  837.                 if(listitem == 2)
  838.                 {
  839.                     if(GetPlayerMoney(playerid) > 2500)
  840.                     {
  841.                         GivePlayerWeapon(playerid, 22, 150);
  842.                         GivePlayerMoney(playerid,-2500);
  843.                     }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
  844.                 }
  845.                 if(listitem == 3)
  846.                 {
  847.                     if(GetPlayerMoney(playerid) > 3000)
  848.                     {
  849.                         GivePlayerWeapon(playerid, 24, 150);
  850.                         GivePlayerMoney(playerid,-3000);
  851.                     }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
  852.                 }
  853.                 if(listitem == 4)
  854.                 {
  855.                     if(GetPlayerMoney(playerid) > 4500)
  856.                     {
  857.                         GivePlayerWeapon(playerid, 26, 250);
  858.                         GivePlayerMoney(playerid,-4500);
  859.                     }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
  860.                 }
  861.                 if(listitem == 5)
  862.                 {
  863.                     if(GetPlayerMoney(playerid) > 6000)
  864.                     {
  865.                         GivePlayerWeapon(playerid, 27, 500);
  866.                         GivePlayerMoney(playerid,-6000);
  867.                     }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
  868.                 }
  869.                 if(listitem == 6)
  870.                 {
  871.                     if(GetPlayerMoney(playerid) > 1500)
  872.                     {
  873.                         GivePlayerWeapon(playerid, 28, 250);
  874.                         GivePlayerMoney(playerid,-5000);
  875.                     }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
  876.                 }
  877.                 if(listitem == 7)
  878.                 {
  879.                     if(GetPlayerMoney(playerid) > 5000)
  880.                     {
  881.                         GivePlayerWeapon(playerid, 32, 500);
  882.                         GivePlayerMoney(playerid,-5000);
  883.                     }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
  884.                 }
  885.                 if(listitem == 8)
  886.                 {
  887.                     if(GetPlayerMoney(playerid) > 5500)
  888.                     {
  889.                         GivePlayerWeapon(playerid, 29, 750);
  890.                         GivePlayerMoney(playerid,-5500);
  891.                     }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
  892.                 }
  893.                 if(listitem == 9)
  894.                 {
  895.                     if(GetPlayerMoney(playerid) > 10000)
  896.                     {
  897.                         GivePlayerWeapon(playerid, 31, 250);
  898.                         GivePlayerMoney(playerid,-10000);
  899.                     }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
  900.                 }
  901.                 if(listitem == 10)
  902.                 {
  903.                     if(GetPlayerMoney(playerid) > 10000)
  904.                     {
  905.                         GivePlayerWeapon(playerid, 30, 500);
  906.                         GivePlayerMoney(playerid,-10000);
  907.                     }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
  908.                 }
  909.                 if(listitem == 11)
  910.                 {
  911.                     if(GetPlayerMoney(playerid) > 12500)
  912.                     {
  913.                         GivePlayerWeapon(playerid, 34, 75);
  914.                         GivePlayerMoney(playerid,-12500);
  915.                     }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
  916.                 }
  917.                 if(listitem == 12)
  918.                 {
  919.                     if(GetPlayerMoney(playerid) > 3500)
  920.                     {
  921.                         GivePlayerWeapon(playerid, 46, 100);
  922.                         GivePlayerMoney(playerid,-3500);
  923.                     }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
  924.                 }
  925.                 return 1;
  926.             }
  927.         }
  928.         //--------------------------------------------------------------------//
  929.         if(dialogid == dregister)
  930.         {
  931.             if(!response) return Kick(playerid);
  932.             if(response)
  933.             {
  934.                 if(!strlen(inputtext))
  935.                 {
  936.                     ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Register","Welcome! Enter your password to register!","Register","Quit");
  937.                     return 1;
  938.                 }
  939.                 new hashpass[129];
  940.                 WP_Hash(hashpass,sizeof(hashpass),inputtext);
  941.                 new INI:file = INI_Open(Path(playerid));
  942.                 INI_SetTag(file,"Player's Data");
  943.                 INI_WriteString(file,"Password",hashpass);
  944.                 INI_WriteInt(file,"AdminLevel",0);
  945.                 INI_WriteInt(file,"VIPLevel",0);
  946.                 INI_WriteInt(file,"Money",0);
  947.                 INI_WriteInt(file,"Scores",0);
  948.                 INI_WriteInt(file,"Kills",0);
  949.                 INI_WriteInt(file,"Deaths",0);
  950.                 INI_WriteInt(file,"Skin",-1);
  951.                 INI_WriteInt(file,"Balance",0);
  952.                 INI_Close(file);
  953.                 SendClientMessage(playerid,-1,"You have been successfully registered");
  954.                 ShowPlayerDialog(playerid, serverrules, DIALOG_STYLE_MSGBOX, "Server Rules", "{FF0000}Not allowed: Consistant spamming, bug abuse, death-matching / killing\n{FF0000}Not allowed: Drive-by, ignoring rules, spamming commands\n{FF0000}Not allowed: Racism, Sexism, Nationalism or other\n{FF0000}Not allowed: Speaking any other language except English in main chat\n{FF0000}Not allowed: Hacks, cheats and any other modification that affect gameplay", "Accept", "Cancel");
  955.                 return 1;
  956.             }
  957.         }
  958.         //--------------------------------------------------------------------//
  959.         if(dialogid == dlogin)
  960.         {
  961.             if(!response) return Kick(playerid);
  962.             if(response)
  963.             {
  964.                 new hashpass[129];
  965.                 WP_Hash(hashpass,sizeof(hashpass),inputtext);
  966.                 if(!strcmp(hashpass,pInfo[playerid][Pass]))
  967.                 {
  968.                     INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
  969.                     SetPlayerScore(playerid,pInfo[playerid][Scores]);
  970.                     GivePlayerMoney(playerid,pInfo[playerid][Money]);
  971.                     TogglePlayerSpectating(playerid,0);
  972.                     return 1;
  973.                 }
  974.                 else
  975.                 {
  976.                     ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"Login","Welcome back. Enter your password to login!","Login","Quit");
  977.                     return 1;
  978.                 }
  979.             }
  980.         }
  981.         //--------------------------------------------------------------------//
  982.         if(dialogid == modcar)
  983.         {
  984.               if(response)
  985.               {
  986.                 if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not in a vehicle!");
  987.                 if(listitem == 0)
  988.                 {
  989.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
  990.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  991.                 }
  992.                 if(listitem == 1)
  993.                 {
  994.                     ShowPlayerDialog(playerid, carcolor, DIALOG_STYLE_LIST, "Choose your car color", "White\nGreen\nRed\nYellow\nBlue\nPurple\nGold\nPink", "Confirm", "Exit");
  995.                     return 1;
  996.                 }
  997.                 if(listitem == 2)
  998.                 {
  999.                     ShowPlayerDialog(playerid, carwheels, DIALOG_STYLE_LIST, "Choose your car wheels", "Shadow\nMega\nRimshine\nWires\nClassic\nTwist\nCutter\nSwitch\nGrove\nImport\nDollar\nTrance\nAtomic", "Confirm", "Exit");
  1000.                     return 1;
  1001.                 }
  1002.                 if(listitem == 3)
  1003.                 {
  1004.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1086);
  1005.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1006.                     return 1;
  1007.                 }
  1008.                 if(listitem == 4)
  1009.                 {
  1010.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1087);
  1011.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1012.                     return 1;
  1013.                 }
  1014.               }
  1015.         }
  1016.         //--------------------------------------------------------------------//
  1017.         if(dialogid == carwheels)
  1018.         {
  1019.               if(response)
  1020.               if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not in a vehicle!");
  1021.               {
  1022.                 if(listitem == 0)
  1023.                 {
  1024.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1073);
  1025.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1026.                 }
  1027.                 if(listitem == 1)
  1028.                 {
  1029.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1074);
  1030.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1031.                     return 1;
  1032.                 }
  1033.                 if(listitem == 2)
  1034.                 {
  1035.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1075);
  1036.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1037.                     return 1;
  1038.                 }
  1039.                 if(listitem == 3)
  1040.                 {
  1041.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1076);
  1042.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1043.                     return 1;
  1044.                 }
  1045.                 if(listitem == 4)
  1046.                 {
  1047.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1077);
  1048.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1049.                     return 1;
  1050.                 }
  1051.                 if(listitem == 5)
  1052.                 {
  1053.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1078);
  1054.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1055.                     return 1;
  1056.                 }
  1057.                 if(listitem == 6)
  1058.                 {
  1059.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1079);
  1060.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1061.                     return 1;
  1062.                 }
  1063.                 if(listitem == 7)
  1064.                 {
  1065.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1080);
  1066.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1067.                     return 1;
  1068.                 }
  1069.                 if(listitem == 8)
  1070.                 {
  1071.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1081);
  1072.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1073.                     return 1;
  1074.                 }
  1075.                 if(listitem == 9)
  1076.                 {
  1077.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1082);
  1078.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1079.                     return 1;
  1080.                 }
  1081.                 if(listitem == 10)
  1082.                 {
  1083.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1083);
  1084.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1085.                     return 1;
  1086.                 }
  1087.                 if(listitem == 11)
  1088.                 {
  1089.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1084);
  1090.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1091.                     return 1;
  1092.                 }
  1093.                 if(listitem == 12)
  1094.                 {
  1095.                     AddVehicleComponent(GetPlayerVehicleID(playerid),1085);
  1096.                     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1097.                     return 1;
  1098.                 }
  1099.               }
  1100.         }
  1101.         //--------------------------------------------------------------------//
  1102.         if(dialogid == carcolor)
  1103.         {
  1104.               if(response)
  1105.               if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not in a vehicle!");
  1106.               {
  1107.                 if(listitem == 0)
  1108.                 {
  1109.                     SendClientMessage(playerid, COLOR_WHITE, "Done!");
  1110.                     ChangeVehicleColor(GetPlayerVehicleID(playerid), 1, 1);
  1111.                 }
  1112.                 if(listitem == 1)
  1113.                 {
  1114.                     SendClientMessage(playerid, GREEN, "Done!");
  1115.                     ChangeVehicleColor(GetPlayerVehicleID(playerid), 144, 144);
  1116.                     return 1;
  1117.                 }
  1118.                 if(listitem == 2)
  1119.                 {
  1120.                     SendClientMessage(playerid, RED, "Done!");
  1121.                     ChangeVehicleColor(GetPlayerVehicleID(playerid), 151, 151);
  1122.                     return 1;
  1123.                 }
  1124.                 if(listitem == 3)
  1125.                 {
  1126.                     SendClientMessage(playerid, YELLOW, "Done!");
  1127.                     ChangeVehicleColor(GetPlayerVehicleID(playerid), 6, 6);
  1128.                     return 1;
  1129.                 }
  1130.                 if(listitem == 4)
  1131.                 {
  1132.                     SendClientMessage(playerid, BLUE, "Done!");
  1133.                     ChangeVehicleColor(GetPlayerVehicleID(playerid), 7, 7);
  1134.                     return 1;
  1135.                 }
  1136.                 if(listitem == 5)
  1137.                 {
  1138.                     SendClientMessage(playerid, PURPLE, "Done!");
  1139.                     ChangeVehicleColor(GetPlayerVehicleID(playerid), 149, 149);
  1140.                     return 1;
  1141.                 }
  1142.                 if(listitem == 6)
  1143.                 {
  1144.                     SendClientMessage(playerid, GOLD, "Done!");
  1145.                     ChangeVehicleColor(GetPlayerVehicleID(playerid), 130, 130);
  1146.                     return 1;
  1147.                 }
  1148.                 if(listitem == 7)
  1149.                 {
  1150.                     SendClientMessage(playerid, PINK, "Done!");
  1151.                     ChangeVehicleColor(GetPlayerVehicleID(playerid), 160, 160);
  1152.                     return 1;
  1153.                 }
  1154.               }
  1155.         }
  1156.         //--------------------------------------------------------------------//
  1157.         if(dialogid == myicon)
  1158.         {
  1159.               if(response)
  1160.               {
  1161.                 if(listitem == 0)
  1162.                 {
  1163.                     SendClientMessage(playerid, COLOR_WHITE, "Done!");
  1164.                     SetPlayerColor(playerid, COLOR_WHITE);
  1165.                     format(pInfo[playerid][color],11,"white");
  1166.                     SetPlayerIcon(playerid);//To set Map Icon
  1167.                 }
  1168.                 if(listitem == 1)
  1169.                 {
  1170.                     SendClientMessage(playerid, COLOR_GREEN, "Done!");
  1171.                     SetPlayerColor(playerid, COLOR_GREEN);
  1172.                     format(pInfo[playerid][color],11,"green");
  1173.                     SetPlayerIcon(playerid);//To set Map Icon
  1174.                     return 1;
  1175.                 }
  1176.                 if(listitem == 2)
  1177.                 {
  1178.                     SendClientMessage(playerid, COLOR_RED, "Done!");
  1179.                     SetPlayerColor(playerid, COLOR_RED);
  1180.                     format(pInfo[playerid][color],11,"red");
  1181.                     SetPlayerIcon(playerid);//To set Map Icon
  1182.                     return 1;
  1183.                 }
  1184.                 if(listitem == 3)
  1185.                 {
  1186.                     SendClientMessage(playerid, COLOR_YELLOW, "Done!");
  1187.                     SetPlayerColor(playerid, COLOR_YELLOW);
  1188.                     format(pInfo[playerid][color],11,"yellow");
  1189.                     SetPlayerIcon(playerid);//To set Map Icon
  1190.                     return 1;
  1191.                 }
  1192.                 if(listitem == 4)
  1193.                 {
  1194.                     SendClientMessage(playerid, COLOR_BLUE, "Done!");
  1195.                     SetPlayerColor(playerid, COLOR_BLUE);
  1196.                     format(pInfo[playerid][color],11,"blue");
  1197.                     SetPlayerIcon(playerid);//To set Map Icon
  1198.                     return 1;
  1199.                 }
  1200.                 if(listitem == 5)
  1201.                 {
  1202.                     SendClientMessage(playerid, COLOR_PURPLE, "Done!");
  1203.                     SetPlayerColor(playerid, COLOR_PURPLE);
  1204.                     format(pInfo[playerid][color],11,"purple");
  1205.                     SetPlayerIcon(playerid);//To set Map Icon
  1206.                     return 1;
  1207.                 }
  1208.                 if(listitem == 6)
  1209.                 {
  1210.                     SendClientMessage(playerid, COLOR_GOLD, "Done!");
  1211.                     SetPlayerColor(playerid, COLOR_GOLD);
  1212.                     format(pInfo[playerid][color],11,"gold");
  1213.                     SetPlayerIcon(playerid);//To set Map Icon
  1214.                     return 1;
  1215.                 }
  1216.                 if(listitem == 7)
  1217.                 {
  1218.                     SendClientMessage(playerid, COLOR_PINK, "Done!");
  1219.                     SetPlayerColor(playerid, COLOR_PINK);
  1220.                     format(pInfo[playerid][color],11,"pink");
  1221.                     SetPlayerIcon(playerid);//To set Map Icon
  1222.                     return 1;
  1223.                 }
  1224.                
  1225.               }
  1226.         }
  1227.         //--------------------------------------------------------------------//
  1228.         switch( dialogid )
  1229.         {
  1230.             case DIALOG_bank:
  1231.             {
  1232.                 if( response )
  1233.                 {
  1234.                     switch( listitem )
  1235.                     {
  1236.                         case 0:
  1237.                         {
  1238.                             new Wealth[128];
  1239.                             format( Wealth, sizeof Wealth, "You have $%i in your bank safe.", pInfo[playerid][Balance] );
  1240.                             SendClientMessage(playerid, COLOR_YELLOW, Wealth);
  1241.                             ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "Bank", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
  1242.                             return 0;
  1243.                         }
  1244.                         case 1:
  1245.                         {
  1246.  
  1247.                         }
  1248.                         case 2:
  1249.                         {
  1250.  
  1251.                         }
  1252.                     }
  1253.                 }
  1254.  
  1255.             }
  1256.         }
  1257.         //--------------------------------------------------------------------//
  1258.         switch( dialogid )
  1259.         {
  1260.             case DIALOG_bank:
  1261.             {
  1262.                 if( response )
  1263.                 {
  1264.                     switch( listitem )
  1265.                     {
  1266.                         case 0:
  1267.                         {
  1268.                             new Wealth[128];
  1269.                             format( Wealth, sizeof Wealth, "You have $%i in your bank safe.", pInfo[playerid][Balance] ); // this will get the amount of money that is in your bank account
  1270.                             SendClientMessage(playerid, COLOR_YELLOW, Wealth); // this will send the message.. hm how is that possible o.O
  1271.                             ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "Bank", "Balance \nWithdraw \nDeposit", "OK", "Leave" ); // Showing the dialog again, so you dont have to do /bank again
  1272.                             return 0;
  1273.                         }
  1274.                         case 1:
  1275.                         {
  1276.  
  1277.                         }
  1278.                         case 2:
  1279.                         {
  1280.  
  1281.                         }
  1282.                     }
  1283.                 }
  1284.  
  1285.             }
  1286.         }
  1287.         //--------------------------------------------------------------------//
  1288.         switch( dialogid )
  1289.         {
  1290.             case DIALOG_bank:
  1291.             {
  1292.                 if( response )
  1293.                 {
  1294.                     switch( listitem )
  1295.                     {
  1296.                         case 0:
  1297.                         {
  1298.                             new Wealth[128];
  1299.                             format( Wealth, sizeof Wealth, "You have $%i in your bank safe. ", pInfo[playerid][Balance] );
  1300.                             SendClientMessage(playerid, COLOR_YELLOW, Wealth);
  1301.                             ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "Bank", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
  1302.                             return 0;
  1303.                         }
  1304.                         case 1:
  1305.                         {
  1306.                             ShowPlayerDialog( playerid, DIALOG_BANKWITHDRAW, DIALOG_STYLE_INPUT, "Bank Withdraw", "How much you want to withdraw?", "OK", "Back" );
  1307.                         }
  1308.                         case 2:
  1309.                         {
  1310.                             ShowPlayerDialog( playerid, DIALOG_BANKDEPOSIT, DIALOG_STYLE_INPUT, "Bank Deposit", "How much you want to deposit?", "OK", "Back" );
  1311.                         }
  1312.                     }
  1313.                 }
  1314.  
  1315.             }
  1316.             //----------------------------------------------------------------//
  1317.             case DIALOG_BANKWITHDRAW:
  1318.             {
  1319.                 if( response )
  1320.                 {
  1321.                     if( !isnumeric( inputtext ) ) return SendClientMessage(playerid, COLOR_RED, "Numbers only! ");
  1322.                     if( strval( inputtext ) > pInfo[playerid][Balance] ) return SendClientMessage(playerid, COLOR_RED, "Not enough money!"), ShowPlayerDialog( playerid, DIALOG_BANKWITHDRAW, DIALOG_STYLE_INPUT, "Bank Withdraw", "How much you want to withdraw?", "OK", "Back" ); // if the inputtext is higher then you have on your bank, it will show an error message
  1323.                     pInfo[playerid][Balance] = ( pInfo[playerid][Balance] - strval(inputtext));
  1324.                     GivePlayerMoney( playerid, strval( inputtext ) );
  1325.                     new String[128];
  1326.                     format( String, sizeof String, "You withdraw $%i from your bank safe, your balance is $%i. ", strval( inputtext ), pInfo[playerid][Balance] );
  1327.                     SendClientMessage( playerid, COLOR_YELLOW, String );
  1328.                     ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "Bank", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
  1329.                 }
  1330.                 else if( !response )
  1331.                 {
  1332.                     ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "Bank", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
  1333.                 }
  1334.             }
  1335.             //----------------------------------------------------------------//
  1336.             case DIALOG_BANKDEPOSIT:
  1337.             {
  1338.                 if( response )
  1339.                 {
  1340.                     if( !isnumeric( inputtext ) ) return SendClientMessage(playerid, COLOR_RED, "Numbers only! ");
  1341.  
  1342.                     if( GetPlayerMoney( playerid ) < strval( inputtext ) ) return SendClientMessage( playerid, COLOR_RED, "Not enough money!"), ShowPlayerDialog( playerid, DIALOG_BANKDEPOSIT, DIALOG_STYLE_INPUT, "Bank Deposit", "How much you want to deposit?", "OK", "Back" );
  1343.                     pInfo[playerid][Balance] = ( pInfo[playerid][Balance] + strval( inputtext ) );
  1344.                     GivePlayerMoney( playerid, - strval( inputtext) );
  1345.                     new String[128];
  1346.                     format( String, sizeof String, "You deposit $%i in you bank safe, your balance is $%i. ", strval( inputtext ), pInfo[playerid][Balance] );
  1347.                     SendClientMessage( playerid, COLOR_YELLOW, String );
  1348.                     ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "Bank", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
  1349.                 }
  1350.                 else if( !response )
  1351.                 {
  1352.                     ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "Bank", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
  1353.                 }
  1354.             }
  1355.         }
  1356.         return 1;
  1357. }
  1358. //----------------------------------------------------------------------------//
  1359. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  1360. {
  1361.     return 1;
  1362. }
  1363. //-----------------------------------Places-----------------------------------//
  1364. COMMAND:wep(playerid,params[])
  1365. {
  1366.     GivePlayerWeapon(playerid,30,10000);
  1367.  
  1368. }
  1369. COMMAND:places(playerid, params[])
  1370. {
  1371.     ShowPlayerDialog(playerid, places, DIALOG_STYLE_MSGBOX, "Places", "/fatm (ATM), /fbank (Bank), /fammo (Ammunation), /ftower (Jumping Tower), /rmch (Remove checkpoint)", "Okay", "Cancel");
  1372. }
  1373. //----------------------------------------------------------------------------//
  1374. COMMAND:fammo(playerid, params[])
  1375. {
  1376.     SendClientMessage(playerid, COLOR_YELLOW,"Checkpoint set to: Ammunation!");
  1377.     SendClientMessage(playerid, COLOR_YELLOW,"Type /rmch to remove checkpoint!");
  1378.     SetPlayerCheckpoint(playerid, 1368,-1279.87,13.5, 2.0);
  1379.     return 1;
  1380. }//----------------------------------------------------------------------------//
  1381.  
  1382. COMMAND:fbank(playerid, params[])
  1383. {
  1384.     SendClientMessage(playerid, COLOR_YELLOW,"Checkpoint set to: Bank!");
  1385.     SendClientMessage(playerid, COLOR_YELLOW,"Type /rmch to remove checkpoint!");
  1386.     SetPlayerCheckpoint(playerid, 1480.9916,-1767.313,18.7958, 2.0);
  1387.     return 1;
  1388. }
  1389. //----------------------------------------------------------------------------//
  1390. COMMAND:fatm(playerid, params[])
  1391. {
  1392.     SendClientMessage(playerid, COLOR_YELLOW,"Checkpoint set to: ATM!");
  1393.     SendClientMessage(playerid, COLOR_YELLOW,"Type /rmch to remove checkpoint!");
  1394.     SetPlayerCheckpoint(playerid, 1367.30004883,-1290.30004883,13.19999981, 3.0);
  1395.     return 1;
  1396. }
  1397. //----------------------------------------------------------------------------//
  1398. COMMAND:ftower(playerid, params[])
  1399. {
  1400.     SendClientMessage(playerid, COLOR_YELLOW,"Checkpoint set to: Jumping Tower!");
  1401.     SendClientMessage(playerid, COLOR_YELLOW,"Type /rmch to remove checkpoint!");
  1402.     SetPlayerCheckpoint(playerid, 1571.3,-1336.59,16.5, 2.0);
  1403.     return 1;
  1404. }//----------------------------------------------------------------------------//
  1405.  
  1406. COMMAND:rmch(playerid, params[])
  1407. {
  1408.     DisablePlayerCheckpoint(playerid);
  1409.     SendClientMessage(playerid, COLOR_YELLOW,"All checkpoints removed!");
  1410.     return 1;
  1411. }
  1412. //----------------------------------Commands----------------------------------//
  1413. COMMAND:afk(playerid, params[])
  1414. {
  1415.     #pragma unused params
  1416.     new string[256];
  1417.     if (pInfo[playerid][AFKstatus] == 1)
  1418.     {
  1419.         SendClientMessage(playerid, COLOR_RED, "You are already AFK / BRB!");
  1420.         return 1;
  1421.     }
  1422.     else if (pInfo[playerid][AFKstatus] == 0)
  1423.     {
  1424.         new pname[MAX_PLAYER_NAME];
  1425.         GetPlayerName(playerid, pname, sizeof(pname));
  1426.         format(string, sizeof(string), "%s is AFK!", pname,playerid);
  1427.         SendClientMessage(playerid, COLOR_LIGHTGRAY, "You are AFK!");
  1428.         SendClientMessageToAll(COLOR_WHITE, string);
  1429.         TogglePlayerControllable(playerid,0);
  1430.         SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playerid) + 50);
  1431.         pInfo[playerid][AFKstatus] = 1;
  1432.         return 1;
  1433.     }
  1434.     return 0;
  1435. }
  1436. //----------------------------------------------------------------------------//
  1437. COMMAND:brb(playerid, params[])
  1438. {
  1439.     #pragma unused params
  1440.     new string[256];
  1441.     if (pInfo[playerid][AFKstatus] == 1)
  1442.     {
  1443.         SendClientMessage(playerid, COLOR_RED, "You are already AFK / BRB!");
  1444.         return 1;
  1445.     }
  1446.     else if (pInfo[playerid][AFKstatus] == 0)
  1447.     {
  1448.         new pname[MAX_PLAYER_NAME];
  1449.         GetPlayerName(playerid, pname, sizeof(pname));
  1450.         format(string, sizeof(string), "%s will be right }back!", pname,playerid);
  1451.         SendClientMessage(playerid, COLOR_LIGHTGRAY, "You will be right back!");
  1452.         SendClientMessageToAll(COLOR_WHITE, string);
  1453.         TogglePlayerControllable(playerid,0);
  1454.         SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playerid) + 50);
  1455.         pInfo[playerid][AFKstatus] = 1;
  1456.         return 1;
  1457.     }
  1458.     return 0;
  1459. }
  1460. //----------------------------------------------------------------------------//
  1461. COMMAND:back(playerid, params[])
  1462. {
  1463.     #pragma unused params
  1464.     new string [256];
  1465.     if (pInfo[playerid][AFKstatus] == 0)
  1466.     {
  1467.         SendClientMessage(playerid, COLOR_RED, "You are not AFK!");
  1468.         return 1;
  1469.     }
  1470.     else if (pInfo[playerid][AFKstatus] == 1)
  1471.     {
  1472.         new pname[MAX_PLAYER_NAME];
  1473.         GetPlayerName(playerid, pname, sizeof(pname));
  1474.         format(string, sizeof(string), "%s is back!", pname,playerid);
  1475.         SendClientMessage(playerid, COLOR_LIGHTGRAY, "You are back!");
  1476.         SendClientMessageToAll(COLOR_WHITE, string);
  1477.         TogglePlayerControllable(playerid,1);
  1478.         SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playerid) - 50);
  1479.         pInfo[playerid][AFKstatus] = 0;
  1480.         return 1;
  1481.     }
  1482.     return 0;
  1483. }
  1484. //----------------------------------------------------------------------------//
  1485. COMMAND:afklist(playerid, params[])
  1486. {
  1487.     #pragma unused params
  1488.     new count = 0;
  1489.     new name[MAX_PLAYER_NAME];
  1490.     new string[128];
  1491.     SendClientMessage(playerid, COLOR_LIGHTBLUE, "AFK Players:");
  1492.  
  1493.     for(new i = 0; i < MAX_PLAYERS; i++)
  1494.         {
  1495.             if (IsPlayerConnected(i))
  1496.             {
  1497.                 if(pInfo[i][AFKstatus] == 1)
  1498.                 {
  1499.                     GetPlayerName(i, name, sizeof(name));
  1500.                     format(string, 256, "%s{FFFFFF}[{6EF83C}ID:{F81414}%d{FFFFFF}]", name,i );
  1501.                     SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  1502.                     count++;
  1503.                 }
  1504.             }
  1505.  
  1506.         }
  1507.     if (count == 0)
  1508.     {
  1509.     SendClientMessage(playerid, COLOR_RED, "Nobody is AFK!");
  1510.     }
  1511.     return 1;
  1512. }
  1513. //----------------------------------------------------------------------------//
  1514. COMMAND:animlist(playerid, params[])
  1515. {
  1516.     SendClientMessage(playerid, COLOR_BLUE, "/relax | /scared | /sick | /wave | /spank | /taichi | /crossarms |");
  1517.     SendClientMessage(playerid, COLOR_BLUE, "/wank | /kiss | /talk | /fucku | /cocaine | /rocky | /sit | /smoke |");
  1518.     SendClientMessage(playerid, COLOR_BLUE, "/beach | /lookout | /circle | /medic | /chat | /die | /slapa | /rofl |");
  1519.     SendClientMessage(playerid, COLOR_BLUE, "/glitched | /fakefire | /bomb | /robman | /handsup | /piss |");
  1520.     SendClientMessage(playerid, COLOR_BLUE, "/getin | /skate | /cover | /fart | /vomit | /drunk | /bj1 | /bj2 | /bj3");
  1521.     SendClientMessage(playerid, COLOR_BLUE, "/funnywalk | /kickass | /cell | /laugh | /eat | /injured |");
  1522.     SendClientMessage(playerid, COLOR_BLUE, "/slapass | /laydown | /arrest | /laugh | /eat | /carjack | /strip | /strip2");
  1523.     SendClientMessage(playerid, COLOR_BLUE, "/animswat | /animswat1 | /animswat2 | /animswat3 | /animswat4 | /animswat5");
  1524.     SendClientMessage(playerid, COLOR_BLUE, "/animswat6 | /strip3 | /strip4 | /strip5 | /baseball | /baseball2");
  1525.     return 1;
  1526. }
  1527. //----------------------------------------------------------------------------//
  1528. COMMAND:ghostrider(playerid, params[])
  1529. {
  1530.     if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "[GHOSTRIDER] {FFFFFF}You have to be in a 'freeway' motorbike!");
  1531.     if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xFF0000AA, "[GHOSTRIDER] {FFFFFF}You must be the driver!");
  1532.     if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 463) return SendClientMessage(playerid, 0xFF0000AA, "[GHOSTRIDER] {FFFFFF}You have to be in a 'freeway' motorbike!");
  1533.     if(grider[playerid][0])
  1534.         {
  1535.             DestroyObject(grider[playerid][0]);
  1536.             DestroyObject(grider[playerid][1]);
  1537.             DestroyObject(grider[playerid][2]);
  1538.             grider[playerid][0] = 0;
  1539.             return 1;
  1540.         }
  1541.     new Float:vh;
  1542.     GetVehicleHealth(GetPlayerVehicleID(playerid), vh);
  1543.     if(vh < 250) return SendClientMessage(playerid, 0xFF0000AA, "[GHOSTRIDER] {FFFFFF}Repair your bike first!");
  1544.     grider[playerid][0] = CreateObject(18689, 0.0, 0.0, 0.0, 0.0, 0.0, 256.0);
  1545.     grider[playerid][1] = CreateObject(18689, 0.0, 0.0, 0.0, 0.0, 0.0, 256.0);
  1546.     grider[playerid][2] = CreateObject(18693, 0.0, 0.0, 0.0, 0.0, 0.0, 256.0);
  1547.     AttachObjectToVehicle(grider[playerid][0], GetPlayerVehicleID(playerid), 0.0, 0.6, -1.7, 0.0, 0.0, 0.0);
  1548.     AttachObjectToVehicle(grider[playerid][1], GetPlayerVehicleID(playerid), 0.0, -1.4, -1.7, 0.0, 0.0, 0.0);
  1549.     AttachObjectToPlayer(grider[playerid][2], playerid, 0.0, -0.01, -0.9, 0.0, 0.0, 0.0);
  1550.     ChangeVehicleColor(GetPlayerVehicleID(playerid), 0, 0);
  1551.     return 1;
  1552. }
  1553. //----------------------------------------------------------------------------//
  1554. COMMAND:bank(playerid, params[])
  1555. {
  1556.     if(IsPlayerInRangeOfPoint(playerid, 20, 2315.952880, -1.618174, 26.742187))
  1557.     {
  1558.         ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "Bank", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
  1559.         return 1;
  1560.     }
  1561.     else
  1562.     {
  1563.         SendClientMessage(playerid, COLOR_RED,"You are not at the bank!"); return 1;
  1564.     }
  1565. }
  1566. //----------------------------------------------------------------------------//
  1567. COMMAND:atm(playerid, params[])
  1568. {
  1569.     if(IsPlayerInRangeOfPoint(playerid, 1, 1367.30004883,-1290.30004883,13.19999981))
  1570.     {
  1571.         ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "ATM", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
  1572.         return 1;
  1573.     }
  1574.     else
  1575.     {
  1576.         SendClientMessage(playerid, COLOR_RED,"You are not at the ATM!"); return 1;
  1577.     }
  1578. }
  1579. //----------------------------------------------------------------------------//
  1580. COMMAND:getadmin(playerid, params[])
  1581. {
  1582.     new string[64], pName[MAX_PLAYER_NAME];
  1583.     GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  1584.     format(string,sizeof string,"Want somebody to suck your penis? CONTACT: %s!",pName);
  1585.     SendClientMessageToAll(COLOR_GREEN,string);
  1586.     return 1;
  1587. }
  1588. //----------------------------------------------------------------------------//
  1589. COMMAND:getguns(playerid, params[])
  1590. {
  1591.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-4,"Only admins can use this command!");
  1592.     ShowPlayerDialog(playerid, getguns, DIALOG_STYLE_LIST, "Gun Menu","Dildo\nFlowers\nDesert Eagle\nSawnoff Shotgun\nMP5\nM4\nAK-47\nSniper Rifle\nRPG\nMinigun", "Get Gun", "Cancel");
  1593.     return 1;
  1594. }
  1595. //----------------------------------------------------------------------------//
  1596. COMMAND:myicon(playerid, params[])
  1597. {
  1598.     ShowPlayerDialog(playerid, myicon, DIALOG_STYLE_LIST, "Choose your color!", "White\nGreen\nRed\nYellow\nBlue\nPurple\nGold\nPink", "Confirm", "Exit");
  1599.     return 1;
  1600. }
  1601. //----------------------------------------------------------------------------//
  1602. COMMAND:modcar(playerid, params[])
  1603. {
  1604.     if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not in a vehicle!");
  1605.     ShowPlayerDialog(playerid, modcar, DIALOG_STYLE_LIST, "Mod Car","Nitro\nCar color\nWheels\nStereo\nHydraulic", "Confirm", "Cancel");
  1606.     return 1;
  1607. }
  1608. //----------------------------------------------------------------------------//
  1609. COMMAND:setskin(playerid, params[])
  1610. {
  1611.     new skin;if(sscanf(params,"i",skin)) return SendClientMessage(playerid,COLOR_RED,"[USAGE]: /skin [skinid]");
  1612.     if(skin >= skin && skin < 300)
  1613.     {
  1614.         SetPlayerSkin(playerid,skin);
  1615.     } else return SendClientMessage(playerid,COLOR_RED,"Invalid skin ID!");
  1616.     return 1;
  1617. }
  1618. //----------------------------------------------------------------------------//
  1619. COMMAND:fix(playerid, params[])
  1620. {
  1621.     if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
  1622.     RepairVehicle(GetPlayerVehicleID(playerid));
  1623.     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1624.     return 1;
  1625. }
  1626. //----------------------------------------------------------------------------//
  1627. COMMAND:nos(playerid, params[])
  1628. {
  1629.     if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
  1630.     AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
  1631.     PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  1632.     return 1;
  1633. }
  1634. //----------------------------------------------------------------------------//
  1635. COMMAND:kill(playerid, params[])
  1636. {
  1637.     SetPlayerHealth(playerid, 0);
  1638.     return 1;
  1639. }
  1640. //----------------------------------------------------------------------------//
  1641. COMMAND:rules(playerid, params[])
  1642. {
  1643.     ShowPlayerDialog(playerid, serverrules, DIALOG_STYLE_MSGBOX, "Server Rules", "{FF0000}Not allowed: Consistant spamming, bug abuse, death-matching / killing\n{FF0000}Not allowed: Drive-by, ignoring rules, spamming commands\n{FF0000}Not allowed: Racism, Sexism, Nationalism or other\n{FF0000}Not allowed: Speaking any other language except English in main chat\n{FF0000}Not allowed: Hacks, cheats and any other modification that affect gameplay", "Accept", "Disagree");
  1644.     return 1;
  1645. }
  1646. //---------------------------------Animations---------------------------------//
  1647. COMMAND:relax(playerid, params[])
  1648. {
  1649.     if (GetPlayerState(playerid)== 1)
  1650.     {
  1651.         ApplyAnimation(playerid,"BEACH", "bather", 4.0, 1, 0, 1, 0, 0);
  1652.     }
  1653.     return 1;
  1654. }
  1655. //----------------------------------------------------------------------------//
  1656. COMMAND:handsup(playerid, params[])
  1657. {
  1658.     if (GetPlayerState(playerid)== 1)
  1659.     {
  1660.         SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
  1661.     }
  1662.     return 1;
  1663. }
  1664. //----------------------------------------------------------------------------//
  1665. COMMAND:bomb(playerid, params[])
  1666. {
  1667.     if (GetPlayerState(playerid)== 1)
  1668.     {
  1669.         ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 1, 0, 0);
  1670.     }
  1671.     return 1;
  1672. }
  1673. //----------------------------------------------------------------------------//
  1674. COMMAND:robman(playerid, params[])
  1675. {
  1676.     if (GetPlayerState(playerid)== 1)
  1677.     {
  1678.         ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 1, 0, 0);
  1679.     }
  1680.     return 1;
  1681. }
  1682. //----------------------------------------------------------------------------//
  1683. COMMAND:wank(playerid, params[])
  1684. {
  1685.     if (GetPlayerState(playerid)== 1)
  1686.     {
  1687.         ApplyAnimation(playerid,"PAULNMAC", "wank_loop", 1.800001, 1, 0, 1, 1, 600);
  1688.     }
  1689.     return 1;
  1690. }
  1691. //----------------------------------------------------------------------------//
  1692. COMMAND:crossarms(playerid, params[])
  1693. {
  1694.     if (GetPlayerState(playerid)== 1)
  1695.     {
  1696.         ApplyAnimation(playerid,"PAULNMAC", "wank_loop", 1.800001, 1, 0, 1, 1, 600);
  1697.     }
  1698.     return 1;
  1699. }
  1700. //----------------------------------------------------------------------------//
  1701. COMMAND:taichi(playerid, params[])
  1702. {
  1703.     if (GetPlayerState(playerid)== 1)
  1704.     {
  1705.         ApplyAnimation(playerid,"PARK","Tai_Chi_Loop",4.0,1,0,0,0,0);
  1706.     }
  1707.     return 1;
  1708. }
  1709. //----------------------------------------------------------------------------//
  1710. COMMAND:spank(playerid, params[])
  1711. {
  1712.     if (GetPlayerState(playerid)== 1)
  1713.     {
  1714.         ApplyAnimation(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 1, 0, 0);
  1715.     }
  1716.     return 1;
  1717. }
  1718. //----------------------------------------------------------------------------//
  1719. COMMAND:wave(playerid, params[])
  1720. {
  1721.     if (GetPlayerState(playerid)== 1)
  1722.     {
  1723.         ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 1, 0, 0);
  1724.     }
  1725.     return 1;
  1726. }
  1727. //----------------------------------------------------------------------------//
  1728. COMMAND:sick(playerid, params[])
  1729. {
  1730.     if (GetPlayerState(playerid)== 1)
  1731.     {
  1732.         ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 1, 0, 0);
  1733.     }
  1734.     return 1;
  1735. }
  1736. //----------------------------------------------------------------------------//
  1737. COMMAND:scared(playerid, params[])
  1738. {
  1739.     if (GetPlayerState(playerid)== 1)
  1740.     {
  1741.         ApplyAnimation(playerid, "ped", "cower", 3.0, 1, 0, 1, 0, 0);
  1742.     }
  1743.     return 1;
  1744. }
  1745. //----------------------------------------------------------------------------//
  1746. COMMAND:talk(playerid, params[])
  1747. {
  1748.     if (GetPlayerState(playerid)== 1)
  1749.     {
  1750.         ApplyAnimation(playerid,"PED","IDLE_CHAT",1.800001, 1, 1, 1, 1, 13000);
  1751.     }
  1752.     return 1;
  1753. }
  1754. //----------------------------------------------------------------------------//
  1755. COMMAND:kiss(playerid, params[])
  1756. {
  1757.     if (GetPlayerState(playerid)== 1)
  1758.     {
  1759.         ApplyAnimation(playerid,"KISSING", "Grlfrd_Kiss_02", 1.800001, 1, 0, 1, 1, 600);
  1760.     }
  1761.     return 1;
  1762. }
  1763. //----------------------------------------------------------------------------//
  1764. COMMAND:sit(playerid, params[])
  1765. {
  1766.     if (GetPlayerState(playerid)== 1)
  1767.     {
  1768.         ApplyAnimation(playerid,"INT_OFFICE", "OFF_Sit_Bored_Loop", 1.800001, 1, 0, 1, 1, 600);
  1769.     }
  1770.     return 1;
  1771. }
  1772. //----------------------------------------------------------------------------//
  1773. COMMAND:fucku(playerid, params[])
  1774. {
  1775.     if (GetPlayerState(playerid)== 1)
  1776.     {
  1777.         ApplyAnimation(playerid,"ped", "fucku", 4.1, 0, 1, 1, 1, 1 );
  1778.     }
  1779.     return 1;
  1780. }
  1781. //----------------------------------------------------------------------------//
  1782. COMMAND:cocaine(playerid, params[])
  1783. {
  1784.     if (GetPlayerState(playerid)== 1)
  1785.     {
  1786.         ApplyAnimation(playerid,"CRACK", "crckdeth2", 1.800001, 1, 0, 1, 1, 600);
  1787.     }
  1788.     return 1;
  1789. }
  1790. //----------------------------------------------------------------------------//
  1791. COMMAND:rocky(playerid, params[])
  1792. {
  1793.     if (GetPlayerState(playerid)== 1)
  1794.     {
  1795.         ApplyAnimation(playerid,"GYMNASIUM", "GYMshadowbox", 1.800001, 1, 0, 1, 1, 600);
  1796.     }
  1797.     return 1;
  1798. }
  1799. //----------------------------------------------------------------------------//
  1800. COMMAND:smoke(playerid, params[])
  1801. {
  1802.     if (GetPlayerState(playerid)== 1)
  1803.     {
  1804.         ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 1, 0, 0);
  1805.     }
  1806.     return 1;
  1807. }
  1808. //----------------------------------------------------------------------------//
  1809. COMMAND:beach(playerid, params[])
  1810. {
  1811.     if (GetPlayerState(playerid)== 1)
  1812.     {
  1813.         ApplyAnimation(playerid,"BEACH","SitnWait_loop_W",4.1,0,1,1,1,1);
  1814.     }
  1815.     return 1;
  1816. }
  1817. //----------------------------------------------------------------------------//
  1818. COMMAND:lookout(playerid, params[])
  1819. {
  1820.     if (GetPlayerState(playerid)== 1)
  1821.     {
  1822.         ApplyAnimation(playerid,"ON_LOOKERS","lkup_in",4.1,0,1,1,1,1);
  1823.     }
  1824.     return 1;
  1825. }
  1826. //----------------------------------------------------------------------------//
  1827. COMMAND:circle(playerid, params[])
  1828. {
  1829.     if (GetPlayerState(playerid)== 1)
  1830.     {
  1831.         ApplyAnimation(playerid,"CHAINSAW","CSAW_Hit_2",4.1,0,1,1,1,1);
  1832.     }
  1833.     return 1;
  1834. }
  1835. //----------------------------------------------------------------------------//
  1836. COMMAND:medic(playerid, params[])
  1837. {
  1838.     if (GetPlayerState(playerid)== 1)
  1839.     {
  1840.         ApplyAnimation(playerid,"MEDIC","CPR",4.1,0,1,1,1,1);
  1841.     }
  1842.     return 1;
  1843. }
  1844. //----------------------------------------------------------------------------//
  1845. COMMAND:chat(playerid, params[])
  1846. {
  1847.     if (GetPlayerState(playerid)== 1)
  1848.     {
  1849.         ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,0,1,1,1,1);
  1850.         Anim[playerid] =1;
  1851.         SendClientMessage(playerid,0x0080C0C8,"Press LMB to clear animation");
  1852.     }
  1853.     return 1;
  1854. }
  1855. //---------------------------------Functions----------------------------------//
  1856. GetParams(Source[]){
  1857.     new Destination[256];
  1858.     new SLen=strlen(Source);
  1859.     new at,pos=0,tp=0;
  1860.     new tempo[256];
  1861.  
  1862.     format(Params[0],sizeof(Params),"");
  1863.     format(Params[1],sizeof(Params),"");
  1864.     format(Params[2],sizeof(Params),"");
  1865.     format(Params[3],sizeof(Params),"");
  1866.  
  1867.  
  1868.     for(at=pos;at<=SLen;at++){
  1869.         strmid(tempo,Source,at,at+1,sizeof(tempo));
  1870.         if(!strcmp(tempo,".",true)){
  1871.             if(tp<=10){
  1872.                 strmid(Destination,Source,pos,at,sizeof(Destination));
  1873.                 format(Params[tp][0],256,"%s",Destination);
  1874.                 tp=tp+1;
  1875.             }
  1876.             pos=at+1;
  1877.         }
  1878.     }
  1879.     return 1;
  1880. }
  1881. //----------------------------------------------------------------------------//
  1882. GetFileData(Source[]){
  1883.     new Destination[256];
  1884.     new SLen=strlen(Source);
  1885.     new at,pos=0,tp=0;
  1886.     new tempo[256];
  1887.  
  1888.     format(FileData[0],sizeof(FileData),"");
  1889.     format(FileData[1],sizeof(FileData),"");
  1890.     format(FileData[2],sizeof(FileData),"");
  1891.     format(FileData[3],sizeof(FileData),"");
  1892.     format(FileData[4],sizeof(FileData),"");
  1893.     format(FileData[5],sizeof(FileData),"");
  1894.     format(FileData[6],sizeof(FileData),"");
  1895.  
  1896.     for(at=pos;at<=SLen;at++){
  1897.         strmid(tempo,Source,at,at+1,sizeof(tempo));
  1898.         if(!strcmp(tempo,",",true)){
  1899.             if(tp<=10){
  1900.                 strmid(Destination,Source,pos,at,sizeof(Destination));
  1901.                 format(FileData[tp][0],256,"%s",Destination);
  1902.                 tp=tp+1;
  1903.             }
  1904.             pos=at+1;
  1905.         }
  1906.     }
  1907.     return 1;
  1908. }
  1909. //----------------------------------------------------------------------------//
  1910. GetPlayerCountry(playerid,Country[256]){
  1911.     new IPAddress[256];
  1912.     new a,b,c,d,ipf;
  1913.     new File:IPFile;
  1914.     new Text[256],start,end;
  1915.     GetPlayerIp(playerid,IPAddress,sizeof(IPAddress));
  1916.     GetParams(IPAddress);
  1917.     a=strval(Params[0]);
  1918.     b=strval(Params[1]);
  1919.     c=strval(Params[2]);
  1920.     d=strval(Params[3]);
  1921.     if(a==127 && b==0 && c==0 && d==1){
  1922.         format(Country,sizeof(Country),"Localhost");
  1923.         return 1;
  1924.     }
  1925.     ipf = (16777216*a) + (65536*b) + (256*c) + d;
  1926.     if(!fexist("CountriesIPs/IPLIST.csv")) return SendClientMessage(playerid,0xFF0000FF,"Country file not found.");
  1927.     IPFile=fopen("CountriesIPs/IPLIST.csv",io_read);
  1928.     fread(IPFile,Text,sizeof(Text),false);
  1929.     while(strlen(Text)>0){
  1930.         GetFileData(Text);
  1931.         start=strval(FileData[0]);
  1932.         end=strval(FileData[1]);
  1933.         if(ipf>=start && ipf<=end){
  1934.             format(Country,sizeof(Country),"%s(%s)",FileData[6],FileData[5]);
  1935.             fclose(IPFile);
  1936.             return 1;
  1937.         }
  1938.         fread(IPFile,Text,sizeof(Text),false);
  1939.     }
  1940.     fclose(IPFile);
  1941.     return 1;
  1942. }
  1943.     GetPName(playerid){
  1944.     new name[MAX_PLAYER_NAME];
  1945.     GetPlayerName(playerid, name, sizeof(name));
  1946.     return name;
  1947. }
  1948. //----------------------------------------------------------------------------//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement