Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------------------------------Includes----------------------------------//
- #include <a_samp>
- #include <YSI\y_ini>
- #include <colors>
- #include <zcmd>
- #include <sscanf2>
- #include <a_players>
- #include <dini>
- native WP_Hash(buffer[],len,const str[]);
- //-----------------------------------Defines----------------------------------//
- #define dregister 1
- #define dlogin 2
- #define modcar 3
- #define carcolor 4
- #define carwheels 5
- #define places 6
- #define DIALOG_bank 7
- #define DIALOG_BANKWITHDRAW 8
- #define DIALOG_BANKDEPOSIT 9
- #define getguns 10
- #define myicon 11
- #define AmmuGuns 12
- #define serverrules 13
- #define SPECIAL_ACTION_PISSING 14
- #define PATH "Users/%s.ini"
- #define UserPath "Users/%s.ini"
- #define COLOR_JOIN 0x99FF9900
- //-----------------------------------Enumss-----------------------------------//
- main(){}
- enum PlayerInfo
- {
- Pass[129],
- Adminlevel,
- VIPlevel,
- Money,
- Scores,
- Kills,
- Deaths,
- Skin,
- Balance,
- color[11],
- AFKstatus,
- pWep0,
- pWep1,
- pWep2,
- pWep3,
- pWep4,
- pWep5,
- pWep6,
- pWep7,
- pWep8,
- pWep9,
- pWep10,
- pWep11,
- pWep12,
- pAmmo0,
- pAmmo1,
- pAmmo2,
- pAmmo3,
- pAmmo4,
- pAmmo5,
- pAmmo6,
- pAmmo7,
- pAmmo8,
- pAmmo9,
- pAmmo10,
- pAmmo11,
- pAmmo12,
- }
- //------------------------------------New-------------------------------------//
- new pInfo[MAX_PLAYERS][PlayerInfo];
- new MoneyPickup;
- new HealthPickup;
- new ArmorPickup;
- new BankPickup;
- new BankExitPickup;
- new ParachuteEnterExitPickup;
- new ParachutePickup;
- new AmmuEnterPickup;
- new AmmuExitPickup;
- new AmmuDialogPickup;
- new grider[MAX_PLAYERS][3];
- new Anim[MAX_PLAYERS];
- new Params[4][8];
- new FileData[7][128];
- new randomMessages[][] =
- {
- "Wanna earn 1,000,000 cash and 10 score? Find bug (error, problem) in our server and report it to admin!"
- };
- //-----------------------------------Stocks-----------------------------------//
- stock Path(playerid)
- {
- new str[128],name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- format(str,sizeof(str),UserPath,name);
- return str;
- }
- stock BankPath(playerid)
- {
- new string[50];
- format (string, sizeof string, PATH, GetName(playerid) );
- return string;
- }
- stock GetName(playerid)
- {
- new name[24];
- GetPlayerName(playerid, name, sizeof name);
- return name;
- }
- //----------------------------------Forwards----------------------------------//
- forward payday(playerid);
- public payday(playerid)
- {
- new hh, mm, ss;
- gettime( hh, mm, ss );
- if( mm == 0 )
- {
- for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
- {
- new string[128];
- new RandomPay = random(20000 - 10000) + 1000;
- GivePlayerMoney(i, RandomPay);
- SetPlayerScore(playerid, GetPlayerScore(playerid) +1);
- SendClientMessage(playerid, COLOR_WHITE,"- Bank Statement -");
- format(string, sizeof(string), "You earn $%i and 1 score!", RandomPay);
- SendClientMessage(i, COLOR_WHITE, string);
- }
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- forward OnPlayerCommandPerformed(playerid, cmdtext[], success);
- forward RandomMessages();
- public RandomMessages()
- {
- new randomMsg = random(sizeof(randomMessages));
- SendClientMessageToAll(COLOR_YELLOW, randomMessages[randomMsg]);
- }
- //----------------------------------------------------------------------------//
- forward loadaccount_user(playerid, name[], value[]);
- public loadaccount_user(playerid, name[], value[])
- {
- INI_String("Password", pInfo[playerid][Pass],129);
- INI_Int("AdminLevel",pInfo[playerid][Adminlevel]);
- INI_Int("VIPLevel",pInfo[playerid][VIPlevel]);
- INI_Int("Money",pInfo[playerid][Money]);
- INI_Int("Scores",pInfo[playerid][Scores]);
- INI_Int("Kills",pInfo[playerid][Kills]);
- INI_Int("Deaths",pInfo[playerid][Deaths]);
- INI_Int("Skin",pInfo[playerid][Skin]);
- INI_Int("Balance", pInfo[playerid][Balance]);
- INI_String("Color",pInfo[playerid][color],11);
- INI_Int("Wep0",pInfo[playerid][pWep0]);
- INI_Int("Wep1",pInfo[playerid][pWep1]);
- INI_Int("Wep2",pInfo[playerid][pWep2]);
- INI_Int("Wep3",pInfo[playerid][pWep3]);
- INI_Int("Wep4",pInfo[playerid][pWep4]);
- INI_Int("Wep5",pInfo[playerid][pWep5]);
- INI_Int("Wep6",pInfo[playerid][pWep6]);
- INI_Int("Wep7",pInfo[playerid][pWep7]);
- INI_Int("Wep8",pInfo[playerid][pWep8]);
- INI_Int("Wep9",pInfo[playerid][pWep9]);
- INI_Int("Wep10",pInfo[playerid][pWep10]);
- INI_Int("Wep11",pInfo[playerid][pWep11]);
- INI_Int("Wep12",pInfo[playerid][pWep12]);
- INI_Int("Ammo0",pInfo[playerid][pAmmo0]);
- INI_Int("Ammo1",pInfo[playerid][pAmmo1]);
- INI_Int("Ammo2",pInfo[playerid][pAmmo2]);
- INI_Int("Ammo3",pInfo[playerid][pAmmo3]);
- INI_Int("Ammo4",pInfo[playerid][pAmmo4]);
- INI_Int("Ammo5",pInfo[playerid][pAmmo5]);
- INI_Int("Ammo6",pInfo[playerid][pAmmo6]);
- INI_Int("Ammo7",pInfo[playerid][pAmmo7]);
- INI_Int("Ammo8",pInfo[playerid][pAmmo8]);
- INI_Int("Ammo9",pInfo[playerid][pAmmo9]);
- INI_Int("Ammo10",pInfo[playerid][pAmmo10]);
- INI_Int("Ammo11",pInfo[playerid][pAmmo11]);
- INI_Int("Ammo12",pInfo[playerid][pAmmo12]);
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnGameModeInit()
- {
- Create3DTextLabel("Ammunation",COLOR_GREEN,1368,-1279.87,13.5,17.0,0);
- Create3DTextLabel("Bank",COLOR_GREEN,1480.9916,-1767.313,18.7958,17.0,0);
- Create3DTextLabel("Exit",COLOR_GREEN,285.7743,-86.0662,1001.5229,17.0,0);
- Create3DTextLabel("Exit",COLOR_GREEN,2315.952880,-1.618174,26.742187,17.0,0);
- Create3DTextLabel("Jumping Tower",COLOR_GREEN,1571.3,-1336.59,16.5,17.0,0);
- SetTimer("payday", 60000, 1);
- DisableInteriorEnterExits();
- SetTimer("RandomMessages", 300000, true);
- SetGameModeText("Roleplay | Freeroam");
- for(new i = 0;i<=299;++i)
- AddPlayerClass(i, 1544.7887,-1675.4630,13.5591, 269.1425, 0, 0, 0, 0, 0, 0);
- Create3DTextLabel("MrQwertza",COLOR_GOLD,1020.6615,-1133.6798,22.8281,17.0,0);
- Create3DTextLabel("Strider",COLOR_GOLD,1015.9205,-1133.7853,22.8281,17.0,0);
- Create3DTextLabel("",COLOR_GOLD,1025.3370,-1133.6941,22.8281,17.0,0);
- Create3DTextLabel("",COLOR_GOLD,1029.9656,-1133.8346,22.8281,17.0,0);
- Create3DTextLabel("",COLOR_GOLD,1011.4861,-1133.5690,22.8281,17.0,0);
- Create3DTextLabel("",COLOR_GOLD,1007.1940,-1133.7258,22.8281,17.0,0);
- Create3DTextLabel("",COLOR_GOLD,1034.3885,-1133.7452,22.8203,17.0,0);
- MoneyPickup = CreatePickup(1212, 2, 2447.2202, -1703.4221, 21.7415,-1);
- HealthPickup = CreatePickup(1240, 2, 1172.6287,-1328.0294,15.4028, -1);
- ArmorPickup = CreatePickup(1242, 2, 1172.6287,-1319.4508,15.3944, -1);
- BankPickup = CreatePickup(1274, 23, 1480.9916,-1767.313,18.7958, -1);
- ParachuteEnterExitPickup = CreatePickup(1318, 23, 1571.3,-1336.59,16.5, -1);
- ParachutePickup = CreatePickup(1310, 23, 1544.3,-1353.1,329.5, -1);
- BankExitPickup = CreatePickup(1318, 23, 2315.952880,-1.618174,26.742187, -1);
- AmmuEnterPickup = CreatePickup(1318, 23, 1368,-1279.87,13.5, -1);
- AmmuExitPickup = CreatePickup(1318, 23, 285.7743,-86.0662,1001.5229, -1);
- AmmuDialogPickup = CreatePickup(1318, 23, 295.8464,-80.2575,1001.5156, -1);
- AddStaticVehicle(405, 1586.6458, -1770.1246, 13.1440, 90, 5, 0);
- AddStaticVehicle(410, 1355.9316,-1665.8553,13.2789, 270, 4, 0);
- AddStaticVehicle(412, 1225.4404,-1535.2810,13.2149, 0, 6, 0);
- AddStaticVehicle(419, 1183.6580,-1258.0902,14.8483,360, 8, 0);
- AddStaticVehicle(426, 972.7076,-1263.6611,15.5865,180, 10, 0);
- AddStaticVehicle(436, 1219.4059,-1109.2306,24.4679,90, 12, 0);
- AddStaticVehicle(439, 1123.0521,-1023.2177,30.7767,180, 14, 0);
- AddStaticVehicle(442, 929.3441, -1064.0240, 23.9579, 180, 16, 0);
- AddStaticVehicle(445, 1122.7858,-1064.8257,29.1096,180, 18, 0);
- AddStaticVehicle(458, 1010.5251,-1300.8312,13.0520,180, 20, 0);
- AddStaticVehicle(459, 981.9323,-1609.6893,13.1970,180, 22, 0);
- AddStaticVehicle(461, 892.5747,-1669.0612,13.2194,180, 24, 0);
- AddStaticVehicle(475, 892.5103,-1658.4998,13.2161,180, 26, 0);
- AddStaticVehicle(474, 888.0833,-1669.0879,13.2159,180, 28, 0);
- AddStaticVehicle(480, 870.0215,-1668.8418,13.2160,180, 30, 0);
- AddStaticVehicle(404, 997.9507,-1823.6637,13.2791,360, 32, 0);
- AddStaticVehicle(405, 1063.6067,-1760.8799,12.9775,270, 34, 0);
- AddStaticVehicle(412, 1099.0461,-1757.9100,12.9359,90, 36, 0);
- AddStaticVehicle(419, 1107.1188,-1665.4589,13.3243,90, 38, 0);
- AddStaticVehicle(426, 1168.1591,-1637.1924,13.5810,270, 40, 0);
- AddStaticVehicle(439, 1283.3706,-1610.8307,13.1254,270, 42, 0);
- AddStaticVehicle(442, 1982.5493,-1674.9703,15.5476,270, 44, 0);
- AddStaticVehicle(445, 2128.4753,-1737.3594,13.1383,180, 46, 0);
- AddStaticVehicle(458, 2268.3286,-1694.7526,13.2507,0, 48, 0);
- AddStaticVehicle(459, 2384.2805,-1644.7355,13.1064,180, 50, 0);
- AddStaticVehicle(461, 2473.2629,-1699.9210,13.0966,180, 52, 0);
- AddStaticVehicle(475, 2089.2529,-1557.0612,12.7095,180, 54, 0);
- AddStaticVehicle(474, 2094.9209,-1556.8596,12.6865,0, 56, 0);
- AddStaticVehicle(415, 1389.9169,-1897.5911,13.0812,370, 58, 0);
- AddStaticVehicle(407, 1751.6458,-1456.1102,13.1315,270, 3, 0);
- AddStaticVehicle(428, 1454.6941,-1751.1241,13.1317,360, 116, 52);
- AddStaticVehicle(428, 1507.4868,-1751.1241,13.1317,360, 116, 52);
- AddStaticVehicle(409,1249.00000000,-2010.00000000,59.70000076,270.00000000, 0, 0);
- AddStaticVehicle(409,1249.00000000,-2015.00000000,59.70000076,270.00000000, 0, 0);
- AddStaticVehicle(409,1249.00000000,-2020.00000000,59.70000076,270.00000000, 0, 0);
- AddStaticVehicle(409,1249.00000000,-2025.00000000,59.70000076,270.00000000, 0, 0);
- AddStaticVehicle(409,1249.00000000,-2030.00000000,59.70000076,270.00000000, 0, 0);
- AddStaticVehicle(579,1276.00000000,-2010.00000000,59.00000000,90.00000000, 0, 0);
- AddStaticVehicle(579,1276.00000000,-2015.00000000,59.00000000,90.00000000, 0, 0);
- AddStaticVehicle(579,1276.00000000,-2020.00000000,59.00000000,90.00000000, 0, 0);
- AddStaticVehicle(579,1276.00000000,-2025.00000000,59.00000000,90.00000000, 0, 0);
- AddStaticVehicle(579,1276.00000000,-2030.00000000,59.00000000,90.00000000, 0, 0);
- AddStaticVehicle(487,1116.50000000,-2053.00000000,74.69999695,0.00000000, 0, 0);
- AddStaticVehicle(487,1116.50000000,-2021.00000000,74.69999695,180.00000000, 0, 0);
- AddStaticVehicle(416,1181.00000000,-1339.00000000,14.10000038,270.00000000, 1,3);
- AddStaticVehicle(416,1181.00000000,-1308.50000000,14.10000038,270.00000000, 1,3);
- AddStaticVehicle(563,1163.00000000,-1355.00000000,27.50000000,270.00000000, 3,1);
- AddStaticVehicle(563,1163.00000000,-1367.50000000,27.50000000,270.00000000, 3,1);
- AddStaticVehicle(596,1601.00000000,-1684.00000000,5.69999981,90.00000000, 0, 1);
- AddStaticVehicle(596,1601.00000000,-1688.00000000,5.69999981,90.00000000, 0, 1);
- AddStaticVehicle(596,1601.00000000,-1692.00000000,5.69999981,90.00000000, 0, 1);
- AddStaticVehicle(596,1601.00000000,-1696.09997559,5.69999981,90.00000000, 0, 1);
- AddStaticVehicle(596,1601.00000000,-1700.09997559,5.69999981,90.00000000, 0, 1);
- AddStaticVehicle(596,1601.00000000,-1704.19995117,5.69999981,90.00000000, 0, 1);
- AddStaticVehicle(427,1526.64001465,-1645.30004883,6.09999990,180.00000000, 0, 1);
- AddStaticVehicle(427,1530.65002441,-1645.30004883,6.09999990,180.00000000, 0, 1);
- AddStaticVehicle(601,1534.65002441,-1645.30004883,5.80000019,180.00000000, 0, 1);
- AddStaticVehicle(601,1538.66003418,-1645.30004883,5.80000019,180.00000000, 0, 1);
- AddStaticVehicleEx(520,1950.00000000,-2642.00000000,14.50000000,0.00000000,-1,-1,15);
- AddStaticVehicleEx(593,1996.00000000,-2642.00000000,14.10000038,0.00000000,-1,-1,15);
- AddStaticVehicleEx(512,2042.00000000,-2642.00000000,14.19999981,0.00000000,-1,-1,15);
- AddStaticVehicleEx(592,2000.80004883,-2493.89990234,14.69999981,90.00000000,1,1,15);
- AddStaticVehicleEx(577,1955.00000000,-2275.00000000,13.50000000,140.00000000,16,1,15);
- AddStaticVehicleEx(577,1955.00000000,-2363.00000000,13.50000000,139.99877930,16,1,15);
- AddStaticVehicleEx(476,2061.50000000,-2601.00000000,14.69999981,90.00000000,1,103,15);
- AddStaticVehicleEx(476,2061.50000000,-2586.00000000,14.69999981,90.00000000,1,103,15);
- AddStaticVehicleEx(476,2042.50000000,-2601.00000000,14.69999981,90.00000000,1,103,15);
- AddStaticVehicleEx(476,2042.50000000,-2586.00000000,14.69999981,90.00000000,1,103,15);
- AddStaticVehicleEx(519,1889.40002441,-2624.00000000,14.50000000,0.00000000,-1,-1,15);
- AddStaticVehicleEx(487,1822.40002441,-2623.39990234,13.80000019,0.00000000,-1,-1,15);
- CreateObject(968,1544.69995117,-1630.80004883,13.10000038,0.00000000,0.00000000,90.00000000);
- CreateObject(8674,1544.69995117,-1622.19995117,9.00000000,0.00000000,90.00000000,269.99993896);
- CreateObject(8674,1544.69995117,-1619.30004883,9.00000000,0.00000000,90.00000000,270.00000000);
- CreateObject(8674,1544.50000000,-1634.19995117,9.00000000,0.00000000,90.00000000,90.00000000);
- CreateObject(8674,1544.50000000,-1637.14001465,9.00000000,0.00000000,90.00000000,90.00000000);
- CreateObject(968,2238.19995117,2450.39990234,10.60000038,0.00000000,0.00000000,90.00000000);
- CreateObject(980,1590.19995117,-1638.09997559,14.80000019,0.00000000,0.00000000,0.00000000);
- CreateObject(8572,1173.90002441,-1377.19995117,24.20999908,0.00000000,0.00000000,90.00000000);
- CreateObject(13011,1186.30004883,-1379.00000000,19.62999916,0.00000000,0.00000000,180.00000000);
- CreateObject(12950,1186.30004883,-1372.46997070,14.69999981,0.00000000,0.00000000,180.00000000);
- CreateObject(12950,1186.30004883,-1365.88000488,9.77000046,0.00000000,0.00000000,179.99450684);
- CreateObject(3934,1163.09997559,-1355.09997559,25.70000076,0.00000000,0.00000000,0.00000000);
- CreateObject(3928,1162.76660156,-1374.74218750,25.45155716,0.00000000,0.00000000,0.00000000);
- CreateObject(3934,1162.63769531,-1374.07714844,25.43991089,0.00000000,0.00000000,0.00000000);
- CreateObject(3934,1163.19995117,-1367.40002441,25.70000076,0.00000000,0.00000000,0.00000000);
- CreateObject(2942,1367.30004883,-1290.30004883,13.19999981,0.00000000,0.00000000,270.00000000);
- CreateObject(3268,1950.00000000,-2642.00000000,12.50000000,0.00000000,0.00000000,270.00000000);
- CreateObject(3268,1996.00000000,-2642.00000000,12.50000000,0.00000000,0.00000000,270.00000000);
- CreateObject(3268,2042.00000000,-2642.00000000,12.50000000,0.00000000,0.00000000,270.00000000);
- CreateObject(3934,1822.40002441,-2623.30004883,12.60000038,0.00000000,0.00000000,269.99996948);
- return 1;
- }
- //--------------------------------Server Start--------------------------------//
- public OnGameModeExit()
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- if(!success) return 1;
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerRequestClass(playerid, classid)
- {
- if( pInfo[playerid][Skin] == -1)
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,249.8809,1852.4695,8.7625);
- SetPlayerCameraPos(playerid,250.0132,1849.3933,8.7734);
- SetPlayerCameraLookAt(playerid,249.8809,1852.4695,8.7625);
- SetPlayerFacingAngle(playerid,177.0050);
- }
- else
- {
- SetSpawnInfo(playerid, 1,0, 963.7003,-1616.3728,14.7561,180, 0,0,0,0,0,0);
- SetPlayerSkin(playerid,pInfo[playerid][Skin]);
- if(strcmp("white",pInfo[playerid][color],false)==0)
- SetPlayerColor(playerid,COLOR_WHITE);
- else if(strcmp("green",pInfo[playerid][color],false)==0)
- SetPlayerColor(playerid,COLOR_GREEN);
- else if(strcmp("red",pInfo[playerid][color],false)==0)
- SetPlayerColor(playerid,COLOR_RED);
- else if(strcmp("yellow",pInfo[playerid][color],false)==0)
- SetPlayerColor(playerid,COLOR_YELLOW);
- else if(strcmp("blue",pInfo[playerid][color],false)==0)
- SetPlayerColor(playerid,COLOR_BLUE);
- else if(strcmp("purple",pInfo[playerid][color],false)==0)
- SetPlayerColor(playerid,COLOR_PURPLE);
- else if(strcmp("gold",pInfo[playerid][color],false)==0)
- SetPlayerColor(playerid,COLOR_GOLD);
- else if(strcmp("pink",pInfo[playerid][color],false)==0)
- SetPlayerColor(playerid,COLOR_PINK);
- else SetPlayerColor(playerid,COLOR_WHITE);
- SpawnPlayer(playerid);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerConnect(playerid)
- {
- TogglePlayerSpectating(playerid,1);
- new Country[256];
- GetPlayerCountry(playerid,Country);
- new mess[256],IP[256];
- GetPlayerIp(playerid,IP,sizeof(IP));
- format(mess,sizeof(mess),"%s joined from %s!",GetPName(playerid),Country);
- printf(mess);
- SendClientMessageToAll(COLOR_JOIN,mess);
- Anim[playerid] =0;
- grider[playerid][0] = 0;
- grider[playerid][1] = 0;
- grider[playerid][2] = 0;
- pInfo[playerid][Skin] = -1;
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- if(fexist(Path(playerid)))
- {
- INI_ParseFile(Path(playerid),"loadaccount_%s", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"Login","Welcome back. Enter your passsword to login!","Login","Quit");
- }
- else
- {
- ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Register","Welcome! Enter your passsword to register!","Register","Quit");
- return 1;
- }
- RemoveBuildingForPlayer(playerid, 4003, 1481.0781, -1747.0313, 33.5234, 0.25);
- RemoveBuildingForPlayer(playerid, 3769, 1961.4453, -2216.1719, 14.9844, 0.25);
- RemoveBuildingForPlayer(playerid, 3664, 1960.6953, -2236.4297, 19.2813, 0.25);
- RemoveBuildingForPlayer(playerid, 5031, 2037.0469, -2313.5469, 18.7109, 0.25);
- RemoveBuildingForPlayer(playerid, 1412, 1949.3438, -2227.5156, 13.6563, 0.25);
- RemoveBuildingForPlayer(playerid, 1412, 1944.0625, -2227.5156, 13.6563, 0.25);
- RemoveBuildingForPlayer(playerid, 1412, 1954.6172, -2227.4844, 13.6875, 0.25);
- RemoveBuildingForPlayer(playerid, 1412, 1965.1719, -2227.4141, 13.7578, 0.25);
- RemoveBuildingForPlayer(playerid, 1412, 1959.8984, -2227.4453, 13.7266, 0.25);
- RemoveBuildingForPlayer(playerid, 3625, 1961.4453, -2216.1719, 14.9844, 0.25);
- RemoveBuildingForPlayer(playerid, 1412, 1975.7266, -2227.4141, 13.7578, 0.25);
- RemoveBuildingForPlayer(playerid, 1412, 1970.4453, -2227.4141, 13.7578, 0.25);
- RemoveBuildingForPlayer(playerid, 1412, 1981.0000, -2227.4141, 13.7578, 0.25);
- RemoveBuildingForPlayer(playerid, 1412, 1996.8281, -2227.3828, 13.7891, 0.25);
- RemoveBuildingForPlayer(playerid, 1412, 1991.5547, -2227.4141, 13.7578, 0.25);
- RemoveBuildingForPlayer(playerid, 1412, 1986.2813, -2227.4141, 13.7578, 0.25);
- RemoveBuildingForPlayer(playerid, 1308, 1983.8047, -2224.1641, 12.7500, 0.25);
- RemoveBuildingForPlayer(playerid, 1412, 2002.1094, -2227.3438, 13.8281, 0.25);
- RemoveBuildingForPlayer(playerid, 1308, 2018.0313, -2224.1641, 12.7500, 0.25);
- RemoveBuildingForPlayer(playerid, 5998, 913.9531, -1015.6328, 72.5313, 0.25);
- RemoveBuildingForPlayer(playerid, 6489, 715.4063, -1236.2188, 19.1641, 0.25);
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerDisconnect(playerid, reason)
- {
- new weapons[13][2];
- for (new i = 0; i < 13; i++)
- {
- GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
- }
- new INI:file = INI_Open(Path(playerid));
- INI_SetTag(file,"Player's Data");
- INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]);
- INI_WriteInt(file,"VIPLevel",pInfo[playerid][VIPlevel]);
- INI_WriteInt(file,"Money",GetPlayerMoney(playerid));
- INI_WriteInt(file,"Scores",GetPlayerScore(playerid));
- INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);
- INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);
- INI_WriteInt(file,"Skin",GetPlayerSkin(playerid));
- INI_WriteInt(file,"Balance",pInfo[playerid][Balance]);
- INI_WriteString(file,"Color",pInfo[playerid][color]);
- INI_WriteInt(file,"Wep0",weapons[0][0]);
- INI_WriteInt(file,"Wep1",weapons[1][0]);
- INI_WriteInt(file,"Wep2",weapons[2][0]);
- INI_WriteInt(file,"Wep3",weapons[3][0]);
- INI_WriteInt(file,"Wep4",weapons[4][0]);
- INI_WriteInt(file,"Wep5",weapons[5][0]);
- INI_WriteInt(file,"Wep6",weapons[6][0]);
- INI_WriteInt(file,"Wep7",weapons[7][0]);
- INI_WriteInt(file,"Wep8",weapons[8][0]);
- INI_WriteInt(file,"Wep9",weapons[9][0]);
- INI_WriteInt(file,"Wep10",weapons[10][0]);
- INI_WriteInt(file,"Wep11",weapons[11][0]);
- INI_WriteInt(file,"Wep12",weapons[12][0]);
- INI_WriteInt(file,"Ammo0",weapons[0][1]);
- INI_WriteInt(file,"Ammo1",weapons[1][1]);
- INI_WriteInt(file,"Ammo2",weapons[2][1]);
- INI_WriteInt(file,"Ammo3",weapons[3][1]);
- INI_WriteInt(file,"Ammo4",weapons[4][1]);
- INI_WriteInt(file,"Ammo5",weapons[5][1]);
- INI_WriteInt(file,"Ammo6",weapons[6][1]);
- INI_WriteInt(file,"Ammo7",weapons[7][1]);
- INI_WriteInt(file,"Ammo8",weapons[8][1]);
- INI_WriteInt(file,"Ammo9",weapons[9][1]);
- INI_WriteInt(file,"Ammo10",weapons[10][1]);
- INI_WriteInt(file,"Ammo11",weapons[11][1]);
- INI_WriteInt(file,"Ammo12",weapons[12][1]);
- INI_Close(file);
- if(grider[playerid][0])
- {
- DestroyObject(grider[playerid][0]);
- DestroyObject(grider[playerid][1]);
- DestroyObject(grider[playerid][2]);
- grider[playerid][0] = 0;
- }
- new Country[256];
- GetPlayerCountry(playerid,Country);
- new mess[256],IP[256];
- GetPlayerIp(playerid,IP,sizeof(IP));
- format(mess,sizeof(mess),"%s left the server",GetPName(playerid));
- printf(mess);
- SendClientMessageToAll(COLOR_JOIN,mess);
- return 1;
- }
- //----------------------------------------------------------------------------//
- forward SetPlayerIcon(playerid);
- public SetPlayerIcon(playerid)
- {
- for(new i=0;i<MAX_PLAYERS;++i)
- {
- if(IsPlayerConnected(i) && i!=playerid)
- SetPlayerMarkerForPlayer(i,playerid,pInfo[playerid][color]);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerSpawn(playerid)
- {
- ClearAnimations(playerid);
- Anim[playerid] =0;
- if(GetPlayerColor(playerid) == COLOR_WHITE)
- format(pInfo[playerid][color],11,"white");
- else if(GetPlayerColor(playerid) == COLOR_GREEN)
- format(pInfo[playerid][color],11,"green");
- else if(GetPlayerColor(playerid) == COLOR_RED)
- format(pInfo[playerid][color],11,"red");
- else if(GetPlayerColor(playerid) == COLOR_YELLOW)
- format(pInfo[playerid][color],11,"yellow");
- else if(GetPlayerColor(playerid) == COLOR_BLUE)
- format(pInfo[playerid][color],11,"blue");
- else if(GetPlayerColor(playerid) == COLOR_PURPLE)
- format(pInfo[playerid][color],11,"purple");
- else if(GetPlayerColor(playerid) == COLOR_GOLD)
- format(pInfo[playerid][color],11,"gold");
- else if(GetPlayerColor(playerid) == COLOR_PINK)
- format(pInfo[playerid][color],11,"pink");
- SetPlayerIcon(playerid);//To set Map Icon
- if(pInfo[playerid][pWep0]!=0 && pInfo[playerid][pAmmo0]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep0],pInfo[playerid][pAmmo0]);
- if(pInfo[playerid][pWep1]!=0 && pInfo[playerid][pAmmo1]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep1],pInfo[playerid][pAmmo1]);
- if(pInfo[playerid][pWep2]!=0 && pInfo[playerid][pAmmo2]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep2],pInfo[playerid][pAmmo2]);
- if(pInfo[playerid][pWep3]!=0 && pInfo[playerid][pAmmo3]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep3],pInfo[playerid][pAmmo3]);
- if(pInfo[playerid][pWep4]!=0 && pInfo[playerid][pAmmo4]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep4],pInfo[playerid][pAmmo4]);
- if(pInfo[playerid][pWep5]!=0 && pInfo[playerid][pAmmo5]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep5],pInfo[playerid][pAmmo5]);
- if(pInfo[playerid][pWep6]!=0 && pInfo[playerid][pAmmo6]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep6],pInfo[playerid][pAmmo6]);
- if(pInfo[playerid][pWep7]!=0 && pInfo[playerid][pAmmo7]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep7],pInfo[playerid][pAmmo7]);
- if(pInfo[playerid][pWep8]!=0 && pInfo[playerid][pAmmo8]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep8],pInfo[playerid][pAmmo8]);
- if(pInfo[playerid][pWep9]!=0 && pInfo[playerid][pAmmo9]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep9],pInfo[playerid][pAmmo9]);
- if(pInfo[playerid][pWep10]!=0 && pInfo[playerid][pAmmo10]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep10],pInfo[playerid][pAmmo10]);
- if(pInfo[playerid][pWep11]!=0 && pInfo[playerid][pAmmo11]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep11],pInfo[playerid][pAmmo11]);
- if(pInfo[playerid][pWep12]!=0 && pInfo[playerid][pAmmo12]!=0) GivePlayerWeapon(playerid,pInfo[playerid][pWep12],pInfo[playerid][pAmmo12]);
- SetPlayerMapIcon(playerid, 0, 1368.1658,-1279.8181,13.1277, 6, 0, MAPICON_GLOBAL );
- SetPlayerMapIcon(playerid, 1, 1173.9036,-1323.3005,14.6888, 22, 0, MAPICON_GLOBAL );
- SetPlayerMapIcon(playerid, 2, 1554.4109,-1675.0834,15.7685, 30, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 3, 2104.8101,-1806.4109,13.2323, 29, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 4, 2068.8477,-1831.4530,13.2163, 63, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 5, 1832.5752,-1842.6942,13.2467, 17, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 6, 1041.4282,-1027.3302,31.7698, 27, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 7, 1004.0070,-939.3102,42.1797, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 8, -90.5515,-1169.4578,2.4079, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 9, -2029.4968,156.4366,28.9498, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 10, -2243.9629,-2560.6477,31.8841, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 11, 2202.2349,2474.3494,10.5258, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 12, -1328.8250,2677.2173,49.7665, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 13, 2113.7390,920.1079,10.5255, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 14, 656.4265,-559.8610,16.5015, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 15, 1944.3260,-1772.9254,13.3906, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 16, -1609.7958,-2718.2048,48.5391, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 17, -2408.7590,976.0934,45.4175, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 18, -1676.6323,414.0262,6.9484, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 19, 614.9333,1689.7418,6.6968, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 20, 656.4265,-559.8610,16.5015, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 21, 70.3882,1218.6783,18.5165, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 22, -1327.7218,2678.8723,50.0625, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 23, 656.3797,-570.4138,16.5015, 55, 0, MAPICON_LOCAL );
- SetPlayerMapIcon(playerid, 24, 1480.9916,-1767.313,18.7958, 52, 0, MAPICON_GLOBAL );
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerDeath(playerid, killerid, reason)
- {
- ClearAnimations(playerid);
- Anim[playerid] =0;
- SendDeathMessage(killerid, playerid, reason);
- pInfo[killerid][Kills]++;
- pInfo[playerid][Deaths]++;
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
- {
- if(grider[playerid][0])
- {
- DestroyObject(grider[playerid][0]);
- DestroyObject(grider[playerid][1]);
- DestroyObject(grider[playerid][2]);
- grider[playerid][0] = 0;
- }
- }
- if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_WASTED)
- {
- if(grider[playerid][0])
- {
- DestroyObject(grider[playerid][0]);
- DestroyObject(grider[playerid][1]);
- DestroyObject(grider[playerid][2]);
- grider[playerid][0] = 0;
- }
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerEnterCheckpoint(playerid)
- {
- DisablePlayerCheckpoint(playerid);
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == MoneyPickup)
- {
- new string[128], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format(string,sizeof string,"Congratulations to %s for finding hidden money. He won $1,000,000 and 2 score!",pName);
- GivePlayerMoney(playerid, 1000000);
- SetPlayerScore(playerid, GetPlayerScore(playerid) + 2);
- SendClientMessageToAll(COLOR_YELLOW,string);
- }
- if(pickupid == HealthPickup)
- {
- SetPlayerHealth(playerid, 100);
- }
- if(pickupid == ParachutePickup)
- {
- GivePlayerWeapon(playerid, 46, 100);
- }
- if(pickupid == ArmorPickup)
- {
- SetPlayerHealth(playerid, 100);
- }
- if(pickupid == BankPickup)
- {
- SetPlayerPos(playerid,2304.9517,-16.1671,26.7422);
- }
- if(pickupid == BankExitPickup)
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,1481.0139,-1763.1412,18.7958);
- }
- if(pickupid == ParachuteEnterExitPickup)
- {
- SetPlayerPos(playerid,1548.7,-1364,326.20001220703);
- }
- if(pickupid == AmmuEnterPickup)
- {
- SetPlayerInterior(playerid,4);
- SetPlayerPos(playerid,286.5032,-84.4113,1001.5156);
- }
- if(pickupid == AmmuExitPickup)
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,1365,-1279.87,13.5);
- }
- if(pickupid == AmmuDialogPickup)
- {
- 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");
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- //--------------------------------------------------------------------//
- if(dialogid == serverrules)
- {
- if(response)
- {
- SendClientMessage(playerid,0xFB0000FF,"You accepted our rules! You can play now!");
- }
- else if(!response)
- {
- SendClientMessage(playerid,0xFB0000FF,"You disagree our rules! Have a nice day!");
- Kick(playerid);
- }
- }
- //--------------------------------------------------------------------//
- if(dialogid == getguns)
- {
- if(listitem == 0) GivePlayerWeapon(playerid, 10, 9999);
- if(listitem == 1) GivePlayerWeapon(playerid, 14, 9999);
- if(listitem == 2) GivePlayerWeapon(playerid, 24, 9999);
- if(listitem == 3) GivePlayerWeapon(playerid, 26, 9999);
- if(listitem == 4) GivePlayerWeapon(playerid, 29, 9999);
- if(listitem == 5) GivePlayerWeapon(playerid, 31, 9999);
- if(listitem == 6) GivePlayerWeapon(playerid, 30, 9999);
- if(listitem == 7) GivePlayerWeapon(playerid, 34, 9999);
- if(listitem == 8) GivePlayerWeapon(playerid, 35, 9999);
- if(listitem == 9) GivePlayerWeapon(playerid, 38, 9999);
- return 1;
- }
- //--------------------------------------------------------------------//
- if(dialogid == AmmuGuns)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) > 1500)
- {
- GivePlayerWeapon(playerid, 5, 100);
- GivePlayerMoney(playerid,-1500);
- }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) > 6500)
- {
- GivePlayerWeapon(playerid, 9, 100);
- GivePlayerMoney(playerid,-6500);
- }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) > 2500)
- {
- GivePlayerWeapon(playerid, 22, 150);
- GivePlayerMoney(playerid,-2500);
- }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
- }
- if(listitem == 3)
- {
- if(GetPlayerMoney(playerid) > 3000)
- {
- GivePlayerWeapon(playerid, 24, 150);
- GivePlayerMoney(playerid,-3000);
- }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
- }
- if(listitem == 4)
- {
- if(GetPlayerMoney(playerid) > 4500)
- {
- GivePlayerWeapon(playerid, 26, 250);
- GivePlayerMoney(playerid,-4500);
- }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
- }
- if(listitem == 5)
- {
- if(GetPlayerMoney(playerid) > 6000)
- {
- GivePlayerWeapon(playerid, 27, 500);
- GivePlayerMoney(playerid,-6000);
- }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
- }
- if(listitem == 6)
- {
- if(GetPlayerMoney(playerid) > 1500)
- {
- GivePlayerWeapon(playerid, 28, 250);
- GivePlayerMoney(playerid,-5000);
- }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
- }
- if(listitem == 7)
- {
- if(GetPlayerMoney(playerid) > 5000)
- {
- GivePlayerWeapon(playerid, 32, 500);
- GivePlayerMoney(playerid,-5000);
- }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
- }
- if(listitem == 8)
- {
- if(GetPlayerMoney(playerid) > 5500)
- {
- GivePlayerWeapon(playerid, 29, 750);
- GivePlayerMoney(playerid,-5500);
- }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
- }
- if(listitem == 9)
- {
- if(GetPlayerMoney(playerid) > 10000)
- {
- GivePlayerWeapon(playerid, 31, 250);
- GivePlayerMoney(playerid,-10000);
- }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
- }
- if(listitem == 10)
- {
- if(GetPlayerMoney(playerid) > 10000)
- {
- GivePlayerWeapon(playerid, 30, 500);
- GivePlayerMoney(playerid,-10000);
- }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
- }
- if(listitem == 11)
- {
- if(GetPlayerMoney(playerid) > 12500)
- {
- GivePlayerWeapon(playerid, 34, 75);
- GivePlayerMoney(playerid,-12500);
- }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
- }
- if(listitem == 12)
- {
- if(GetPlayerMoney(playerid) > 3500)
- {
- GivePlayerWeapon(playerid, 46, 100);
- GivePlayerMoney(playerid,-3500);
- }else{SendClientMessage(playerid, COLOR_RED, "Not enough money!");}
- }
- return 1;
- }
- }
- //--------------------------------------------------------------------//
- if(dialogid == dregister)
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Register","Welcome! Enter your password to register!","Register","Quit");
- return 1;
- }
- new hashpass[129];
- WP_Hash(hashpass,sizeof(hashpass),inputtext);
- new INI:file = INI_Open(Path(playerid));
- INI_SetTag(file,"Player's Data");
- INI_WriteString(file,"Password",hashpass);
- INI_WriteInt(file,"AdminLevel",0);
- INI_WriteInt(file,"VIPLevel",0);
- INI_WriteInt(file,"Money",0);
- INI_WriteInt(file,"Scores",0);
- INI_WriteInt(file,"Kills",0);
- INI_WriteInt(file,"Deaths",0);
- INI_WriteInt(file,"Skin",-1);
- INI_WriteInt(file,"Balance",0);
- INI_Close(file);
- SendClientMessage(playerid,-1,"You have been successfully registered");
- 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");
- return 1;
- }
- }
- //--------------------------------------------------------------------//
- if(dialogid == dlogin)
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- new hashpass[129];
- WP_Hash(hashpass,sizeof(hashpass),inputtext);
- if(!strcmp(hashpass,pInfo[playerid][Pass]))
- {
- INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
- SetPlayerScore(playerid,pInfo[playerid][Scores]);
- GivePlayerMoney(playerid,pInfo[playerid][Money]);
- TogglePlayerSpectating(playerid,0);
- return 1;
- }
- else
- {
- ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"Login","Welcome back. Enter your password to login!","Login","Quit");
- return 1;
- }
- }
- }
- //--------------------------------------------------------------------//
- if(dialogid == modcar)
- {
- if(response)
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not in a vehicle!");
- if(listitem == 0)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(playerid, carcolor, DIALOG_STYLE_LIST, "Choose your car color", "White\nGreen\nRed\nYellow\nBlue\nPurple\nGold\nPink", "Confirm", "Exit");
- return 1;
- }
- if(listitem == 2)
- {
- 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");
- return 1;
- }
- if(listitem == 3)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1086);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- if(listitem == 4)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1087);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- }
- }
- //--------------------------------------------------------------------//
- if(dialogid == carwheels)
- {
- if(response)
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not in a vehicle!");
- {
- if(listitem == 0)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1073);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- }
- if(listitem == 1)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1074);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- if(listitem == 2)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1075);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- if(listitem == 3)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1076);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- if(listitem == 4)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1077);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- if(listitem == 5)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1078);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- if(listitem == 6)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1079);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- if(listitem == 7)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1080);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- if(listitem == 8)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1081);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- if(listitem == 9)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1082);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- if(listitem == 10)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1083);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- if(listitem == 11)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1084);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- if(listitem == 12)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1085);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- }
- }
- //--------------------------------------------------------------------//
- if(dialogid == carcolor)
- {
- if(response)
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not in a vehicle!");
- {
- if(listitem == 0)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Done!");
- ChangeVehicleColor(GetPlayerVehicleID(playerid), 1, 1);
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid, GREEN, "Done!");
- ChangeVehicleColor(GetPlayerVehicleID(playerid), 144, 144);
- return 1;
- }
- if(listitem == 2)
- {
- SendClientMessage(playerid, RED, "Done!");
- ChangeVehicleColor(GetPlayerVehicleID(playerid), 151, 151);
- return 1;
- }
- if(listitem == 3)
- {
- SendClientMessage(playerid, YELLOW, "Done!");
- ChangeVehicleColor(GetPlayerVehicleID(playerid), 6, 6);
- return 1;
- }
- if(listitem == 4)
- {
- SendClientMessage(playerid, BLUE, "Done!");
- ChangeVehicleColor(GetPlayerVehicleID(playerid), 7, 7);
- return 1;
- }
- if(listitem == 5)
- {
- SendClientMessage(playerid, PURPLE, "Done!");
- ChangeVehicleColor(GetPlayerVehicleID(playerid), 149, 149);
- return 1;
- }
- if(listitem == 6)
- {
- SendClientMessage(playerid, GOLD, "Done!");
- ChangeVehicleColor(GetPlayerVehicleID(playerid), 130, 130);
- return 1;
- }
- if(listitem == 7)
- {
- SendClientMessage(playerid, PINK, "Done!");
- ChangeVehicleColor(GetPlayerVehicleID(playerid), 160, 160);
- return 1;
- }
- }
- }
- //--------------------------------------------------------------------//
- if(dialogid == myicon)
- {
- if(response)
- {
- if(listitem == 0)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Done!");
- SetPlayerColor(playerid, COLOR_WHITE);
- format(pInfo[playerid][color],11,"white");
- SetPlayerIcon(playerid);//To set Map Icon
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid, COLOR_GREEN, "Done!");
- SetPlayerColor(playerid, COLOR_GREEN);
- format(pInfo[playerid][color],11,"green");
- SetPlayerIcon(playerid);//To set Map Icon
- return 1;
- }
- if(listitem == 2)
- {
- SendClientMessage(playerid, COLOR_RED, "Done!");
- SetPlayerColor(playerid, COLOR_RED);
- format(pInfo[playerid][color],11,"red");
- SetPlayerIcon(playerid);//To set Map Icon
- return 1;
- }
- if(listitem == 3)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Done!");
- SetPlayerColor(playerid, COLOR_YELLOW);
- format(pInfo[playerid][color],11,"yellow");
- SetPlayerIcon(playerid);//To set Map Icon
- return 1;
- }
- if(listitem == 4)
- {
- SendClientMessage(playerid, COLOR_BLUE, "Done!");
- SetPlayerColor(playerid, COLOR_BLUE);
- format(pInfo[playerid][color],11,"blue");
- SetPlayerIcon(playerid);//To set Map Icon
- return 1;
- }
- if(listitem == 5)
- {
- SendClientMessage(playerid, COLOR_PURPLE, "Done!");
- SetPlayerColor(playerid, COLOR_PURPLE);
- format(pInfo[playerid][color],11,"purple");
- SetPlayerIcon(playerid);//To set Map Icon
- return 1;
- }
- if(listitem == 6)
- {
- SendClientMessage(playerid, COLOR_GOLD, "Done!");
- SetPlayerColor(playerid, COLOR_GOLD);
- format(pInfo[playerid][color],11,"gold");
- SetPlayerIcon(playerid);//To set Map Icon
- return 1;
- }
- if(listitem == 7)
- {
- SendClientMessage(playerid, COLOR_PINK, "Done!");
- SetPlayerColor(playerid, COLOR_PINK);
- format(pInfo[playerid][color],11,"pink");
- SetPlayerIcon(playerid);//To set Map Icon
- return 1;
- }
- }
- }
- //--------------------------------------------------------------------//
- switch( dialogid )
- {
- case DIALOG_bank:
- {
- if( response )
- {
- switch( listitem )
- {
- case 0:
- {
- new Wealth[128];
- format( Wealth, sizeof Wealth, "You have $%i in your bank safe.", pInfo[playerid][Balance] );
- SendClientMessage(playerid, COLOR_YELLOW, Wealth);
- ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "Bank", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
- return 0;
- }
- case 1:
- {
- }
- case 2:
- {
- }
- }
- }
- }
- }
- //--------------------------------------------------------------------//
- switch( dialogid )
- {
- case DIALOG_bank:
- {
- if( response )
- {
- switch( listitem )
- {
- case 0:
- {
- new Wealth[128];
- 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
- SendClientMessage(playerid, COLOR_YELLOW, Wealth); // this will send the message.. hm how is that possible o.O
- 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
- return 0;
- }
- case 1:
- {
- }
- case 2:
- {
- }
- }
- }
- }
- }
- //--------------------------------------------------------------------//
- switch( dialogid )
- {
- case DIALOG_bank:
- {
- if( response )
- {
- switch( listitem )
- {
- case 0:
- {
- new Wealth[128];
- format( Wealth, sizeof Wealth, "You have $%i in your bank safe. ", pInfo[playerid][Balance] );
- SendClientMessage(playerid, COLOR_YELLOW, Wealth);
- ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "Bank", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
- return 0;
- }
- case 1:
- {
- ShowPlayerDialog( playerid, DIALOG_BANKWITHDRAW, DIALOG_STYLE_INPUT, "Bank Withdraw", "How much you want to withdraw?", "OK", "Back" );
- }
- case 2:
- {
- ShowPlayerDialog( playerid, DIALOG_BANKDEPOSIT, DIALOG_STYLE_INPUT, "Bank Deposit", "How much you want to deposit?", "OK", "Back" );
- }
- }
- }
- }
- //----------------------------------------------------------------//
- case DIALOG_BANKWITHDRAW:
- {
- if( response )
- {
- if( !isnumeric( inputtext ) ) return SendClientMessage(playerid, COLOR_RED, "Numbers only! ");
- 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
- pInfo[playerid][Balance] = ( pInfo[playerid][Balance] - strval(inputtext));
- GivePlayerMoney( playerid, strval( inputtext ) );
- new String[128];
- format( String, sizeof String, "You withdraw $%i from your bank safe, your balance is $%i. ", strval( inputtext ), pInfo[playerid][Balance] );
- SendClientMessage( playerid, COLOR_YELLOW, String );
- ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "Bank", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
- }
- else if( !response )
- {
- ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "Bank", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
- }
- }
- //----------------------------------------------------------------//
- case DIALOG_BANKDEPOSIT:
- {
- if( response )
- {
- if( !isnumeric( inputtext ) ) return SendClientMessage(playerid, COLOR_RED, "Numbers only! ");
- 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" );
- pInfo[playerid][Balance] = ( pInfo[playerid][Balance] + strval( inputtext ) );
- GivePlayerMoney( playerid, - strval( inputtext) );
- new String[128];
- format( String, sizeof String, "You deposit $%i in you bank safe, your balance is $%i. ", strval( inputtext ), pInfo[playerid][Balance] );
- SendClientMessage( playerid, COLOR_YELLOW, String );
- ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "Bank", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
- }
- else if( !response )
- {
- ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "Bank", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
- }
- }
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- //-----------------------------------Places-----------------------------------//
- COMMAND:wep(playerid,params[])
- {
- GivePlayerWeapon(playerid,30,10000);
- }
- COMMAND:places(playerid, params[])
- {
- ShowPlayerDialog(playerid, places, DIALOG_STYLE_MSGBOX, "Places", "/fatm (ATM), /fbank (Bank), /fammo (Ammunation), /ftower (Jumping Tower), /rmch (Remove checkpoint)", "Okay", "Cancel");
- }
- //----------------------------------------------------------------------------//
- COMMAND:fammo(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_YELLOW,"Checkpoint set to: Ammunation!");
- SendClientMessage(playerid, COLOR_YELLOW,"Type /rmch to remove checkpoint!");
- SetPlayerCheckpoint(playerid, 1368,-1279.87,13.5, 2.0);
- return 1;
- }//----------------------------------------------------------------------------//
- COMMAND:fbank(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_YELLOW,"Checkpoint set to: Bank!");
- SendClientMessage(playerid, COLOR_YELLOW,"Type /rmch to remove checkpoint!");
- SetPlayerCheckpoint(playerid, 1480.9916,-1767.313,18.7958, 2.0);
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:fatm(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_YELLOW,"Checkpoint set to: ATM!");
- SendClientMessage(playerid, COLOR_YELLOW,"Type /rmch to remove checkpoint!");
- SetPlayerCheckpoint(playerid, 1367.30004883,-1290.30004883,13.19999981, 3.0);
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:ftower(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_YELLOW,"Checkpoint set to: Jumping Tower!");
- SendClientMessage(playerid, COLOR_YELLOW,"Type /rmch to remove checkpoint!");
- SetPlayerCheckpoint(playerid, 1571.3,-1336.59,16.5, 2.0);
- return 1;
- }//----------------------------------------------------------------------------//
- COMMAND:rmch(playerid, params[])
- {
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid, COLOR_YELLOW,"All checkpoints removed!");
- return 1;
- }
- //----------------------------------Commands----------------------------------//
- COMMAND:afk(playerid, params[])
- {
- #pragma unused params
- new string[256];
- if (pInfo[playerid][AFKstatus] == 1)
- {
- SendClientMessage(playerid, COLOR_RED, "You are already AFK / BRB!");
- return 1;
- }
- else if (pInfo[playerid][AFKstatus] == 0)
- {
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string, sizeof(string), "%s is AFK!", pname,playerid);
- SendClientMessage(playerid, COLOR_LIGHTGRAY, "You are AFK!");
- SendClientMessageToAll(COLOR_WHITE, string);
- TogglePlayerControllable(playerid,0);
- SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playerid) + 50);
- pInfo[playerid][AFKstatus] = 1;
- return 1;
- }
- return 0;
- }
- //----------------------------------------------------------------------------//
- COMMAND:brb(playerid, params[])
- {
- #pragma unused params
- new string[256];
- if (pInfo[playerid][AFKstatus] == 1)
- {
- SendClientMessage(playerid, COLOR_RED, "You are already AFK / BRB!");
- return 1;
- }
- else if (pInfo[playerid][AFKstatus] == 0)
- {
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string, sizeof(string), "%s will be right }back!", pname,playerid);
- SendClientMessage(playerid, COLOR_LIGHTGRAY, "You will be right back!");
- SendClientMessageToAll(COLOR_WHITE, string);
- TogglePlayerControllable(playerid,0);
- SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playerid) + 50);
- pInfo[playerid][AFKstatus] = 1;
- return 1;
- }
- return 0;
- }
- //----------------------------------------------------------------------------//
- COMMAND:back(playerid, params[])
- {
- #pragma unused params
- new string [256];
- if (pInfo[playerid][AFKstatus] == 0)
- {
- SendClientMessage(playerid, COLOR_RED, "You are not AFK!");
- return 1;
- }
- else if (pInfo[playerid][AFKstatus] == 1)
- {
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string, sizeof(string), "%s is back!", pname,playerid);
- SendClientMessage(playerid, COLOR_LIGHTGRAY, "You are back!");
- SendClientMessageToAll(COLOR_WHITE, string);
- TogglePlayerControllable(playerid,1);
- SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playerid) - 50);
- pInfo[playerid][AFKstatus] = 0;
- return 1;
- }
- return 0;
- }
- //----------------------------------------------------------------------------//
- COMMAND:afklist(playerid, params[])
- {
- #pragma unused params
- new count = 0;
- new name[MAX_PLAYER_NAME];
- new string[128];
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "AFK Players:");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- if(pInfo[i][AFKstatus] == 1)
- {
- GetPlayerName(i, name, sizeof(name));
- format(string, 256, "%s{FFFFFF}[{6EF83C}ID:{F81414}%d{FFFFFF}]", name,i );
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- count++;
- }
- }
- }
- if (count == 0)
- {
- SendClientMessage(playerid, COLOR_RED, "Nobody is AFK!");
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:animlist(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_BLUE, "/relax | /scared | /sick | /wave | /spank | /taichi | /crossarms |");
- SendClientMessage(playerid, COLOR_BLUE, "/wank | /kiss | /talk | /fucku | /cocaine | /rocky | /sit | /smoke |");
- SendClientMessage(playerid, COLOR_BLUE, "/beach | /lookout | /circle | /medic | /chat | /die | /slapa | /rofl |");
- SendClientMessage(playerid, COLOR_BLUE, "/glitched | /fakefire | /bomb | /robman | /handsup | /piss |");
- SendClientMessage(playerid, COLOR_BLUE, "/getin | /skate | /cover | /fart | /vomit | /drunk | /bj1 | /bj2 | /bj3");
- SendClientMessage(playerid, COLOR_BLUE, "/funnywalk | /kickass | /cell | /laugh | /eat | /injured |");
- SendClientMessage(playerid, COLOR_BLUE, "/slapass | /laydown | /arrest | /laugh | /eat | /carjack | /strip | /strip2");
- SendClientMessage(playerid, COLOR_BLUE, "/animswat | /animswat1 | /animswat2 | /animswat3 | /animswat4 | /animswat5");
- SendClientMessage(playerid, COLOR_BLUE, "/animswat6 | /strip3 | /strip4 | /strip5 | /baseball | /baseball2");
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:ghostrider(playerid, params[])
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "[GHOSTRIDER] {FFFFFF}You have to be in a 'freeway' motorbike!");
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xFF0000AA, "[GHOSTRIDER] {FFFFFF}You must be the driver!");
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 463) return SendClientMessage(playerid, 0xFF0000AA, "[GHOSTRIDER] {FFFFFF}You have to be in a 'freeway' motorbike!");
- if(grider[playerid][0])
- {
- DestroyObject(grider[playerid][0]);
- DestroyObject(grider[playerid][1]);
- DestroyObject(grider[playerid][2]);
- grider[playerid][0] = 0;
- return 1;
- }
- new Float:vh;
- GetVehicleHealth(GetPlayerVehicleID(playerid), vh);
- if(vh < 250) return SendClientMessage(playerid, 0xFF0000AA, "[GHOSTRIDER] {FFFFFF}Repair your bike first!");
- grider[playerid][0] = CreateObject(18689, 0.0, 0.0, 0.0, 0.0, 0.0, 256.0);
- grider[playerid][1] = CreateObject(18689, 0.0, 0.0, 0.0, 0.0, 0.0, 256.0);
- grider[playerid][2] = CreateObject(18693, 0.0, 0.0, 0.0, 0.0, 0.0, 256.0);
- AttachObjectToVehicle(grider[playerid][0], GetPlayerVehicleID(playerid), 0.0, 0.6, -1.7, 0.0, 0.0, 0.0);
- AttachObjectToVehicle(grider[playerid][1], GetPlayerVehicleID(playerid), 0.0, -1.4, -1.7, 0.0, 0.0, 0.0);
- AttachObjectToPlayer(grider[playerid][2], playerid, 0.0, -0.01, -0.9, 0.0, 0.0, 0.0);
- ChangeVehicleColor(GetPlayerVehicleID(playerid), 0, 0);
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:bank(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 20, 2315.952880, -1.618174, 26.742187))
- {
- ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "Bank", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED,"You are not at the bank!"); return 1;
- }
- }
- //----------------------------------------------------------------------------//
- COMMAND:atm(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 1, 1367.30004883,-1290.30004883,13.19999981))
- {
- ShowPlayerDialog( playerid, DIALOG_bank, DIALOG_STYLE_LIST, "ATM", "Balance \nWithdraw \nDeposit", "OK", "Leave" );
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED,"You are not at the ATM!"); return 1;
- }
- }
- //----------------------------------------------------------------------------//
- COMMAND:getadmin(playerid, params[])
- {
- new string[64], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format(string,sizeof string,"Want somebody to suck your penis? CONTACT: %s!",pName);
- SendClientMessageToAll(COLOR_GREEN,string);
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:getguns(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-4,"Only admins can use this command!");
- 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");
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:myicon(playerid, params[])
- {
- ShowPlayerDialog(playerid, myicon, DIALOG_STYLE_LIST, "Choose your color!", "White\nGreen\nRed\nYellow\nBlue\nPurple\nGold\nPink", "Confirm", "Exit");
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:modcar(playerid, params[])
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not in a vehicle!");
- ShowPlayerDialog(playerid, modcar, DIALOG_STYLE_LIST, "Mod Car","Nitro\nCar color\nWheels\nStereo\nHydraulic", "Confirm", "Cancel");
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:setskin(playerid, params[])
- {
- new skin;if(sscanf(params,"i",skin)) return SendClientMessage(playerid,COLOR_RED,"[USAGE]: /skin [skinid]");
- if(skin >= skin && skin < 300)
- {
- SetPlayerSkin(playerid,skin);
- } else return SendClientMessage(playerid,COLOR_RED,"Invalid skin ID!");
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:fix(playerid, params[])
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
- RepairVehicle(GetPlayerVehicleID(playerid));
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:nos(playerid, params[])
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
- AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
- PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:kill(playerid, params[])
- {
- SetPlayerHealth(playerid, 0);
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:rules(playerid, params[])
- {
- 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");
- return 1;
- }
- //---------------------------------Animations---------------------------------//
- COMMAND:relax(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"BEACH", "bather", 4.0, 1, 0, 1, 0, 0);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:handsup(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:bomb(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 1, 0, 0);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:robman(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 1, 0, 0);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:wank(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"PAULNMAC", "wank_loop", 1.800001, 1, 0, 1, 1, 600);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:crossarms(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"PAULNMAC", "wank_loop", 1.800001, 1, 0, 1, 1, 600);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:taichi(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"PARK","Tai_Chi_Loop",4.0,1,0,0,0,0);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:spank(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 1, 0, 0);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:wave(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 1, 0, 0);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:sick(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 1, 0, 0);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:scared(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid, "ped", "cower", 3.0, 1, 0, 1, 0, 0);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:talk(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"PED","IDLE_CHAT",1.800001, 1, 1, 1, 1, 13000);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:kiss(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"KISSING", "Grlfrd_Kiss_02", 1.800001, 1, 0, 1, 1, 600);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:sit(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"INT_OFFICE", "OFF_Sit_Bored_Loop", 1.800001, 1, 0, 1, 1, 600);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:fucku(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"ped", "fucku", 4.1, 0, 1, 1, 1, 1 );
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:cocaine(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"CRACK", "crckdeth2", 1.800001, 1, 0, 1, 1, 600);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:rocky(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"GYMNASIUM", "GYMshadowbox", 1.800001, 1, 0, 1, 1, 600);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:smoke(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 1, 0, 0);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:beach(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"BEACH","SitnWait_loop_W",4.1,0,1,1,1,1);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:lookout(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"ON_LOOKERS","lkup_in",4.1,0,1,1,1,1);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:circle(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"CHAINSAW","CSAW_Hit_2",4.1,0,1,1,1,1);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:medic(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"MEDIC","CPR",4.1,0,1,1,1,1);
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- COMMAND:chat(playerid, params[])
- {
- if (GetPlayerState(playerid)== 1)
- {
- ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,0,1,1,1,1);
- Anim[playerid] =1;
- SendClientMessage(playerid,0x0080C0C8,"Press LMB to clear animation");
- }
- return 1;
- }
- //---------------------------------Functions----------------------------------//
- GetParams(Source[]){
- new Destination[256];
- new SLen=strlen(Source);
- new at,pos=0,tp=0;
- new tempo[256];
- format(Params[0],sizeof(Params),"");
- format(Params[1],sizeof(Params),"");
- format(Params[2],sizeof(Params),"");
- format(Params[3],sizeof(Params),"");
- for(at=pos;at<=SLen;at++){
- strmid(tempo,Source,at,at+1,sizeof(tempo));
- if(!strcmp(tempo,".",true)){
- if(tp<=10){
- strmid(Destination,Source,pos,at,sizeof(Destination));
- format(Params[tp][0],256,"%s",Destination);
- tp=tp+1;
- }
- pos=at+1;
- }
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- GetFileData(Source[]){
- new Destination[256];
- new SLen=strlen(Source);
- new at,pos=0,tp=0;
- new tempo[256];
- format(FileData[0],sizeof(FileData),"");
- format(FileData[1],sizeof(FileData),"");
- format(FileData[2],sizeof(FileData),"");
- format(FileData[3],sizeof(FileData),"");
- format(FileData[4],sizeof(FileData),"");
- format(FileData[5],sizeof(FileData),"");
- format(FileData[6],sizeof(FileData),"");
- for(at=pos;at<=SLen;at++){
- strmid(tempo,Source,at,at+1,sizeof(tempo));
- if(!strcmp(tempo,",",true)){
- if(tp<=10){
- strmid(Destination,Source,pos,at,sizeof(Destination));
- format(FileData[tp][0],256,"%s",Destination);
- tp=tp+1;
- }
- pos=at+1;
- }
- }
- return 1;
- }
- //----------------------------------------------------------------------------//
- GetPlayerCountry(playerid,Country[256]){
- new IPAddress[256];
- new a,b,c,d,ipf;
- new File:IPFile;
- new Text[256],start,end;
- GetPlayerIp(playerid,IPAddress,sizeof(IPAddress));
- GetParams(IPAddress);
- a=strval(Params[0]);
- b=strval(Params[1]);
- c=strval(Params[2]);
- d=strval(Params[3]);
- if(a==127 && b==0 && c==0 && d==1){
- format(Country,sizeof(Country),"Localhost");
- return 1;
- }
- ipf = (16777216*a) + (65536*b) + (256*c) + d;
- if(!fexist("CountriesIPs/IPLIST.csv")) return SendClientMessage(playerid,0xFF0000FF,"Country file not found.");
- IPFile=fopen("CountriesIPs/IPLIST.csv",io_read);
- fread(IPFile,Text,sizeof(Text),false);
- while(strlen(Text)>0){
- GetFileData(Text);
- start=strval(FileData[0]);
- end=strval(FileData[1]);
- if(ipf>=start && ipf<=end){
- format(Country,sizeof(Country),"%s(%s)",FileData[6],FileData[5]);
- fclose(IPFile);
- return 1;
- }
- fread(IPFile,Text,sizeof(Text),false);
- }
- fclose(IPFile);
- return 1;
- }
- GetPName(playerid){
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
- //----------------------------------------------------------------------------//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement