rendered paste body//Credits goes to:
//Cam some of the classes are his
//CodeMaster added the selection screen sounds and the kool Team chat
//Nitroglycerine for tree id :P
//DM Messages by yellowblood
//Necrioss for the wicked car/stats save system and the login/register system and settings file
//[CBK]$$$PiMp Made this
//===============================Include Files==================================
#include <a_samp>
#include <dini>
#include <dudb>
#include <time>
#include <file>
#include <dutils>
#include <sinterior>
#include <float>
//===============================Class Defines==================================
#define TEAM_WORKER 0
#define TEAM_PIMP 1
#define TEAM_GOLFER 2
#define TEAM_TRIAD 3
#define TEAM_ARMY 4
#define TEAM_VALET 5
#define TEAM_MEDIC 6
#define TEAM_FBI 7
#define TEAM_CHICKEN 8
#define TEAM_RICH 9
#define TEAM_PILOT 10
#define TEAM_DANANG 11
//========================0.2 Forward Declarations==============================
//forward PlayerName(playerid);
forward Gangs();
forward Keys();
forward Float:GetOptimumRampDistance(playerid);
forward Float:GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance);
forward AddStaticVehicle2(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2);
forward keys2();
forward IsPlayerNameOnline(compname[]);
forward profitup();
forward SetupPlayerForClassSelection(playerid);
forward SetCheckpoint(playerid, i);
forward PlaySoundForPlayer(playerid, soundid);
forward weapreturn(playerid);
forward dteamchatcmd(playerid,params[]);
forward checkpointUpdate();
forward getCheckpointType(playerID);
forward isPlayerInArea(playerID, Float:data[4]);
forward ctimer();
forward resetcount();
forward announcer();
forward scoreupdate();
forward eject();
forward CheckSpeedo(playerid);
forward SystemMsg(playerid,msg[]);
forward resetcar();
forward PhoneCut();
forward Settings();
forward SaveData();
forward SoundForAll(sound);
forward resetmessage();
forward newracestart();
forward kartraceann();
forward kartraceready();
forward startkart();
forward vehiclecheck();
forward raceend();
forward racercheck();
forward hoverraceann();
forward hoverraceready();
forward starthover();
forward quadraceann();
forward quadraceready();
forward startquad();
forward GameModeExitFunc();
forward GetPlayers();
forward SetPlayerRandomSpawn(playerid);
forward SetupPlayerForClassSelection(playerid);
//==============================Settings Files==================================
#define FILE_SETTINGS "settings.ini"
//=============================Max Points/Gangs=================================
#pragma dynamic 40000
#define CallCost 1
#define MAX_CARS 251
#define MAX_POINTS 63
#define BIZ_AMOUNT 60
#define MAX_SCORE 99 //max score for when the round's over
//===============================Checkpoint defines===================================
#define CP_BANK 20
#define CP_BANK_2 21
#define CP_BANK_3 22
#define BIZ1 23
#define BIZ2 24
#define BIZ3 25
#define BIZ4 26
#define BIZ5 27
#define BIZ6 28
#define BIZ7 29
#define BIZ8 30
#define BIZ9 31
#define BIZ10 32
#define BIZ11 33
#define BIZ12 34
#define BIZ13 35
#define BIZ14 36
#define BIZ15 37
#define BIZ16 38
#define BIZ17 39
#define BIZ18 40
#define BIZ19 41
#define BIZ20 42
#define BIZ21 43
#define BIZ22 44
#define BIZ23 45
#define BIZ24 46
#define BIZ25 47
#define BIZ26 48
#define BIZ27 49
#define BIZ28 50
#define BIZ29 51
#define BIZ30 52
#define BIZ31 53
#define BIZ32 54
#define BIZ33 55
#define BIZ34 56
#define BIZ35 57
#define BIZ36 58
#define BIZ37 59
#define BIZ38 60
#define BIZ39 61
#define BIZ40 62
#define BIZ41 63
#define BIZ42 64
#define BIZ43 65
#define BIZ44 66
#define BIZ45 67
#define BIZ46 68
#define BIZ47 69
#define BIZ48 70
#define BIZ49 71
#define BIZ50 72
#define BIZ51 73
#define BIZ52 74
#define BIZ53 75
#define BIZ54 76
#define BIZ55 77
#define BIZ56 78
#define BIZ57 79
#define BIZ58 80
#define BIZ59 81
#define BIZ60 82
//================================Vehicle Defines===============================
new VehicleName[212][0] = {
"Landstalker",
"Bravura",
"Buffalo",
"Linerunner",
"Pereniel",
"Sentinel",
"Dumper",
"Firetruck",
"Trashmaster",
"Stretch",
"Manana",
"Infernus",
"Voodoo",
"Pony",
"Mule",
"Cheetah",
"Ambulance",
"Leviathan",
"Moonbeam",
"Esperanto",
"Taxi",
"Washington",
"Bobcat",
"Mr Whoopee",
"BF Injection",
"Hunter",
"Premier",
"Enforcer",
"Securicar",
"Banshee",
"Predator",
"Bus",
"Rhino",
"Barracks",
"Hotknife",
"Trailer", //artict1
"Previon",
"Coach",
"Cabbie",
"Stallion",
"Rumpo",
"RC Bandit",
"Romero",
"Packer",
"Monster Truck",
"Admiral",
"Squalo",
"Seasparrow",
"Pizzaboy",
"Tram",
"Trailer", //artict2
"Turismo",
"Speeder",
"Reefer",
"Tropic",
"Flatbed",
"Yankee",
"Caddy",
"Solair",
"Berkley's RC Van",
"Skimmer",
"PCJ-600",
"Faggio",
"Freeway",
"RC Baron",
"RC Raider",
"Glendale",
"Oceanic",
"Sanchez",
"Sparrow",
"Patriot",
"Quad",
"Coastguard",
"Dinghy",
"Hermes",
"Sabre",
"Rustler",
"ZR-350",
"Walton",
"Regina",
"Comet",
"BMX",
"Burrito",
"Camper",
"Marquis",
"Baggage",
"Dozer",
"Maverick",
"News Chopper",
"Rancher",
"FBI Rancher",
"Virgo",
"Greenwood",
"Jetmax",
"Hotring",
"Sandking",
"Blista Compact",
"Police Maverick",
"Boxville",
"Benson",
"Mesa",
"RC Goblin",
"Hotring Racer", //hotrina
"Hotring Racer", //hotrinb
"Bloodring Banger",
"Rancher",
"Super GT",
"Elegant",
"Journey",
"Bike",
"Mountain Bike",
"Beagle",
"Cropdust",
"Stunt",
"Tanker", //petro
"RoadTrain",
"Nebula",
"Majestic",
"Buccaneer",
"Shamal",
"Hydra",
"FCR-900",
"NRG-500",
"HPV1000",
"Cement Truck",
"Tow Truck",
"Fortune",
"Cadrona",
"FBI Truck",
"Willard",
"Forklift",
"Tractor",
"Combine",
"Feltzer",
"Remington",
"Slamvan",
"Blade",
"Freight",
"Streak",
"Vortex",
"Vincent",
"Bullet",
"Clover",
"Sadler",
"Firetruck", //firela
"Hustler",
"Intruder",
"Primo",
"Cargobob",
"Tampa",
"Sunrise",
"Merit",
"Utility",
"Nevada",
"Yosemite",
"Windsor",
"Monster Truck", //monstera
"Monster Truck", //monsterb
"Uranus",
"Jester",
"Sultan",
"Stratum",
"Elegy",
"Raindance",
"RC Tiger",
"Flash",
"Tahoma",
"Savanna",
"Bandito",
"Freight", //freiflat
"Trailer", //streakc
"Kart",
"Mower",
"Duneride",
"Sweeper",
"Broadway",
"Tornado",
"AT-400",
"DFT-30",
"Huntley",
"Stafford",
"BF-400",
"Newsvan",
"Tug",
"Trailer", //petrotr
"Emperor",
"Wayfarer",
"Euros",
"Hotdog",
"Club",
"Trailer", //freibox
"Trailer", //artict3
"Andromada",
"Dodo",
"RC Cam",
"Launch",
"Police Car (LSPD)",
"Police Car (SFPD)",
"Police Car (LVPD)",
"Police Ranger",
"Picador",
"S.W.A.T. Van",
"Alpha",
"Phoenix",
"Glendale",
"Sadler",
"Luggage Trailer", //bagboxa
"Luggage Trailer", //bagboxb
"Stair Trailer", //tugstair
"Boxville",
"Farm Plow", //farmtr1
"Utility Trailer" //utiltr1
};
new heavycar[24][0] = {
{406},
{444},
{556},
{557},
{573},
{601},
{407},
{427},
{433},
{434},
{499},
{498},
{482},
{431},
{524},
{578},
{455},
{403},
{414},
{443},
{515},
{428},
{408},
{456}
};
new boat[11][0] = {
{472},
{473},
{493},
{595},
{484},
{430},
{453},
{452},
{446},
{454},
{539}
};
new mbike[11][0] = {
{581},
{521},
{462},
{463},
{468},
{471},
{586},
{522},
{523},
{461},
{448}
};
new pbike[3][0] = {
{481},
{509},
{510}
};
new splane[6][0] = {
{593},
{512},
{513},
{460},
{464},
{465}
};
new mplane[2][0] = {
{519},
{511}
};
new lplane[2][0] = {
{553},
{592}
};
new milair[4][0] = {
{520},
{476},
{447},
{425}
};
new sheli[4][0] = {
{487},
{488},
{469},
{497}
};
new lheli[3][0] = {
{417},
{548},
{563}
};
//===========================Character Selection Music==========================
#define SOUND_MUSIC1 1062
#define SOUND_MUSIC2 1068
#define SOUND_MUSIC3 1076
#define SOUND_OFF 1184
//=================================Team Colors==================================
#define COLOR_GREEN 0x33AA33AA //SFgrove color
#define COLOR_RED 0xAA3333AA //pimp color
#define COLOR_PINK 0xFF66FFAA //triad color
#define COLOR_BLUE 0x0000BBAA //mechanic color
#define COLOR_LIGHTBLUE 0x33CCFFAA //pilot color
#define COLOR_ORANGE 0xFF9900AA //Swat color
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PURPLE 0x330066AA
#define COLOR_GREY 0xCCCCCAA
#define COLOR_SKIN 0xFFCC99AA
#define COLOR_DARKGREY 0x333333AA
#define COLOR_DARKRED 0x990000AA
#define RED 0xFF0000AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_BRIGHTRED 0xDC143CAA
#define COLOR_AQUA 0x7CFC00AA
#define COLOR_SYSTEM 0xEFEFF7AA
//===============================Modified DCMD==================================
#define cmd(%1) if((strcmp(cmdtext,%1,true,strlen(%1))==0)&&(((cmdtext[strlen(%1)]==0)&&(d%1(playerid,"")))||((cmdtext[strlen(%1)]==32)&&(d%1(playerid,cmdtext[strlen(%1)+1]))))) return 1
//================================Admin Stuff===================================
enum pInfo
{
pAdmin,
pJailedby,
}
//==================================Defines=====================================
new teamchatcmd[] = "/t";
new gVehicleClass[MAX_VEHICLES];
new gVC;
new playercount[MAX_PLAYERS];
new biznote[MAX_PLAYERS];
new carnote[MAX_PLAYERS];
new Calling[MAX_PLAYERS];
new Answered[MAX_PLAYERS];
new Callerid[MAX_PLAYERS];
new allowprofit[MAX_PLAYERS];
new profit[MAX_PLAYERS];
new totalprofit[MAX_PLAYERS];
new bizid[MAX_PLAYERS];
new cttmp[256];
new tmpname[256];
new ownername[256];
new propmess[256];
new propcost[MAX_PLAYERS];
new propowned[MAX_PLAYERS];
new buyable[MAX_PLAYERS];
new playernameh[MAX_PLAYER_NAME];
new playerbiz[MAX_PLAYERS];
new Count[MAX_PLAYERS];
new cseconds,cstring[40];
new PlayerInfo[MAX_PLAYERS][pInfo];
new moneyed[MAX_PLAYERS];
new ignition[MAX_PLAYERS];
new secure[MAX_PLAYERS];
new admined[MAX_PLAYERS];
new bought[MAX_PLAYERS];
new carowned[MAX_PLAYERS];
new currentvehicle[MAX_PLAYERS];
new carcost[256];
new server[256];
new passenger[MAX_PLAYERS];
new cartemp[MAX_PLAYERS];
new gTeam[MAX_PLAYERS];
new Spawned[MAX_PLAYERS];
new tmpcar[MAX_PLAYERS];
new welcome[MAX_PLAYERS];
new frozen[MAX_PLAYERS];
new speedo[MAX_PLAYERS];
new messaged[MAX_PLAYERS];
new used[MAX_PLAYERS];
new CashScoreOld;
new tmpcar2[MAX_PLAYERS];
new aMessage[MAX_PLAYERS];
new setd[MAX_PLAYERS];
new propactive[MAX_PLAYERS];
new amount[MAX_PLAYERS];
new biznum[MAX_PLAYERS];
new telemoney[MAX_PLAYERS];
new carbuyable[MAX_PLAYERS];
new bizbuyable[MAX_PLAYERS];
new tempid[MAX_PLAYERS];
new carname[256];
new lockmess[256];
new securemess[256];
new carmess[256];
new password[256];
new oldvehcount;
new Float:g, Float:h, Float:l;
new Float:t, Float:u, Float:o;
//================================Checkpoints===================================
new Float:checkCoords[MAX_POINTS][4] = {
{-36.5483,-57.9948, -17.2655,-49.2967}, //BANK
{-37.2183,-91.8006, -14.1099,-74.6845}, //BANK_2
{-34.6621,-31.4095, -2.6782,-25.6232}, //BANK_3
{2059.7805,1020.1033,2289.0493,1193.4093},
{2055.5642,1533.3348,2200.9768,1753.8568},
{2114.8748,1775.9012,2277.7209,1891.3472},
{2146.1289,1893.4567,2342.6091,1950.9486},
{2137.8066,2038.1023,2223.3726,2143.6411},
{2225.2517,2088.4695,2359.3306,2143.9646},
{1842.4160,1264.5808,2059.4907,1454.3223},
{1968.2183,929.2423,2054.0447,1096.8796},
{2056.7427,1444.7155,2190.7131,1537.8398},
{2537.2771,2232.3604,2664.7832,2461.8420},
{2027.6141,2288.6062,2177.2280,2443.9287},
{2322.5151,1603.0068,2550.0662,1714.9113},
{1976.6951,1846.7843,2138.2932,2028.0287},
{2517.0713,2125.2759,2540.1426,2140.9841},
{2517.1316,2279.6184,2540.0034,2314.0369},
{2309.3223,2231.9849,2239.1592,2263.0171},
{2307.8157,2404.8630,2365.8564,2427.3931},
{2113.8269,1420.0763,2169.8450,1448.3851},
{2133.8765,1424.9305,2158.0867,1449.6304},
{2081.6860,2033.0593,2136.8855,2121.2231},
{2405.2615,2044.4905,2429.2261,2070.7527},
{2512.7620,2292.9004,2538.0837,2316.1021},
{2405.6833,2001.2031,2427.2678,2024.1396},
{2210.8799,1418.5393,2221.6172,1434.6121}, //num24
{1004.0436,1378.4221,1238.1447,1789.2527},
{1303.5311,2043.1515,1575.4657,2310.8394},
{1982.6249,1481.2999,2055.5203,1587.4567},
{2138.1567,908.3344,2207.1643,980.6557},
{2518.3003,2046.3043,2621.8103,2114.5112},
{2501.6440,1985.4578,2550.4285,2055.2839},
{2484.2690,2229.0103,2534.2617,2246.9116},
{2166.9695,1354.7913,2251.1807,1443.4131},
{1921.2307,2014.2312,1995.0787,2118.3655},
{2076.9065,2203.9939,2086.9548,2222.7378},
{2516.0190,2140.3875,2549.2168,2156.4136},
{2579.2708,1827.0596,2638.5925,1869.3435},
{2102.8501,2225.0020,2128.5029,2233.7532},
{2341.3113,2023.0891,2418.6460,2059.8914},
{2601.2441,1656.5068,2637.8970,1678.0903},
{2336.8066,2054.1135,2403.8230,2083.4001},
{2421.8442,1971.7770,2507.7588,2059.8337},
{1101.3241,2043.9854,1189.1630,2148.9053},
{2427.3594,2044.5748,2449.6052,2070.0330},
{2467.3035,2037.6560,2527.0105,2068.9089},
{2347.1316,2086.8259,2436.4583,2143.5769},
{2102.3923,2232.8354,2132.9700,2279.6086},
{2086.9155,2206.2480,2095.4680,2223.6389},
{2404.2832,1967.7424,2439.7622,2000.2843},
{2172.5940,1458.2136,2201.1655,1537.2443},
{2094.0740,2204.3918,2104.2151,2223.1936},
{2206.0823,1947.1849,2137.1362,2023.3031},
{2449.7007,2043.6879,2469.7415,2074.7456},
{2503.3691,1940.5511,2610.8059,2002.4291},
{2514.7412,2153.7595,2546.4314,2176.9170},
{2515.2012,2324.6948,2542.5288,2350.3384},
{2089.9951,2107.3723,2129.4351,2138.4326},
{2035.4915,2104.2634,2089.2329,2126.5642},
{2337.3936,1961.5359,2392.2026,2023.3726},
{2197.4590,1418.8319,2212.3408,1436.3138},
{2219.5940,1416.0967,2250.4465,1436.7446}
};
new Float:checkpoints[MAX_POINTS][4] = {
{-22.2549,-55.6575,1003.5469,2.5},
{-23.0664,-90.0882,1003.5469,2.5},
{-33.9593,-29.0792,1003.5573,2.5},
{2181.2170,1117.3793,12.2120,2.5},
{2185.4421,1691.4431,10.6553,2.5},
{2219.9041,1839.5925,10.3847,2.5},
{2162.7468,1903.8865,10.3884,2.5},
{2167.2166,2117.6150,10.3809,2.5},
{2317.3208,2117.7710,10.3882,2.5},
{1934.8152,1344.3130,9.5411,2.5},
{2028.6173,997.6895,10.3901,2.5},
{2139.1824,1483.6544,10.3850,2.5},
{2634.2117,2342.9260,10.2322,2.5},
{2127.1482,2374.2432,10.3928,2.5},
{2433.9910,1694.5219,10.3891,2.5},
{2027.4666,1919.8239,11.8970,2.5},
{2535.0242,2137.1760,10.3844,2.5},
{2533.9272,2290.7966,10.3965,2.5},
{2292.8953,2250.4241,10.3915,2.5},
{2327.7629,2418.4009,10.3137,2.5},
{2125.8101,1439.5314,10.3825,2.5},
{2144.4243,1438.7078,10.3857,2.5},
{2088.1013,2080.2449,10.5105,2.5},
{2413.2683,2063.5012,10.3790,2.5},
{2516.7546,2302.4880,10.3827,2.5},
{2412.0635,2016.4637,10.3789,2.5},
{2215.1062,1431.6699,10.6265,2.5},
{1098.4010,1611.0776,12.1107,2.5},
{1479.4565,2252.0762,10.5973,2.5},
{2004.3060,1544.7435,13.1615,2.5},
{2155.3611,937.0895,10.3759,2.5},
{2536.4421,2078.7681,10.3914,2.5},
{2518.4578,2033.5502,10.6029,2.5},
{2500.1050,2240.7932,10.3955,2.5},
{2200.1270,1388.8220,10.3802,2.5},
{1945.0096,2069.8103,10.3847,2.5},
{2081.3513,2221.6086,10.3705,2.5},
{2537.7957,2151.2844,10.3940,2.5},
{2634.9871,1845.2051,10.5572,2.5},
{2107.3560,2229.2830,10.7454,2.5},
{2395.3364,2044.5300,10.3796,2.5},
{2635.2498,1673.8412,10.5941,2.5},
{2364.5168,2076.1494,10.3798,2.5},
{2464.9089,2034.4392,10.5851,2.5},
{1162.8470,2070.3850,10.3921,2.5},
{2436.7664,2061.3137,10.3951,2.5},
{2490.2861,2062.2139,10.3753,2.5},
{2366.6399,2123.9949,10.4007,2.5},
{2106.3506,2250.8586,10.5889,2.5},
{2090.6064,2220.4714,10.3877,2.5},
{2411.2610,1992.9418,10.3783,2.5},
{2195.4019,1469.8882,10.3641,2.5},
{2095.6563,2221.7317,10.3953,2.5},
{2192.3142,1986.8772,11.6534,2.5},
{2456.7498,2060.2307,10.3932,2.5},
{2542.1289,1969.6676,10.3852,2.5},
{2536.7393,2162.0422,10.3918,2.5},
{2519.7532,2335.0073,10.3927,2.5},
{2099.8533,2120.0144,10.3961,2.5},
{2070.7163,2120.6021,10.3895,2.5},
{2366.6096,1981.6423,10.3858,2.5},
{2206.2791,1431.5449,10.6267,2.5},
{2228.6863,1431.7811,10.6125,2.5}
};
//=================================Save Player Pos==============================
enum SavePlayerPosEnum
{
Float:LastX,
Float:LastY,
Float:LastZ
}
new SavePlayerPos[MAX_PLAYERS][SavePlayerPosEnum];
//=================================Checkpoint Type==============================
new checkpointType[MAX_POINTS] = {
CP_BANK,
CP_BANK_2,
CP_BANK_3,
BIZ1,
BIZ2,
BIZ3,
BIZ4,
BIZ5,
BIZ6,
BIZ7,
BIZ8,
BIZ9,
BIZ10,
BIZ11,
BIZ12,
BIZ13,
BIZ14,
BIZ15,
BIZ16,
BIZ17,
BIZ18,
BIZ19,
BIZ20,
BIZ21,
BIZ22,
BIZ23,
BIZ24,
BIZ25,
BIZ26,
BIZ27,
BIZ28,
BIZ29,
BIZ30,
BIZ31,
BIZ32,
BIZ33,
BIZ34,
BIZ35,
BIZ36,
BIZ37,
BIZ38,
BIZ39,
BIZ40,
BIZ41,
BIZ42,
BIZ43,
BIZ44,
BIZ45,
BIZ46,
BIZ47,
BIZ48,
BIZ49,
BIZ50,
BIZ51,
BIZ52,
BIZ53,
BIZ54,
BIZ55,
BIZ56,
BIZ57,
BIZ58,
BIZ59,
BIZ60,
};
//================================More Defines==================================
new Float:ta, Float:tb, Float:tc;
new logged[MAX_PLAYERS];
new bank[999];
new PlayerInterior[MAX_PLAYERS];
new carused[MAX_PLAYERS];
new playerCheckpoint[MAX_PLAYERS];
new reset[MAX_PLAYERS];
new ejected[MAX_PLAYERS];
//================================Global Defines================================
new Float:Pos[MAX_PLAYERS][4];
//new tk[MAX_PLAYERS];
//================================Main Info=====================================
main()
{
print(" ");
print("\n--------------------------------------");
print(" SFTDM Reloaded Tradotta By Ascordi Del Forum-Sam!!!");
print("--------------------------------------\n");}
//=================================Telephone====================================
public PhoneCut()
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if (Calling[i] > -1 && Answered[i] == 1 && Callerid[i] == 1)
{
if (GetPlayerMoney(i) >= CallCost)
{
GivePlayerMoney(i, -CallCost);
}
if (GetPlayerMoney(i) < CallCost)
{
SendClientMessage(i, COLOR_BRIGHTRED, "CREDITO: nn hai abbastanza credito per continuare la telefonata");
SendClientMessage(Calling[i], COLOR_BRIGHTRED, "CREDITO: Il tuo amico non ha piu credito nel suo conto, Che vuoi se è povero!!!!!");
Calling[Calling[i]] = -1;
Answered[Calling[i]] = 0;
Calling[i] = -1;
Answered[i] = 0;
Callerid[i] = 0;
}
}
}
}
return 1;
}
public OnPlayerText(playerid, text[])
{
if (Calling[playerid] > -1 && Answered[playerid] == 1)
{
new string[256];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s: %s", sendername, text);
SendClientMessage(Calling[playerid], COLOR_YELLOW, string);
format(string, sizeof(string), "%s: %s", sendername, text);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "%s: %s", sendername, text);
print(string);
format(string, sizeof(string), "%s: %s", sendername, text);
print(string);
return 0;
}
return 1;
}
//================================GameMode Exit=================================
public OnGameModeExit()
{
dini_IntSet(FILE_SETTINGS,"vehicleresetcount",gVC);
return 1;
}
//===============================Gamemode Start=================================
public OnGameModeInit()
{
print("\n \nGameModeInit(SFTDM Reloaded 2.0)");
SetGameModeText("Real Life By.Snake95");
ShowNameTags(1);
ShowPlayerMarkers(1);
SetWorldTime(12);
SetTimer("CheckSpeedo", 700, 1);
SetTimer("SaveData",1000,1);
SetTimer("Settings",1000,1);
SetTimer("checkpointUpdate",100, 1);
SetTimer("scoreupdate",1000,1);
SetTimer("ctimer",1000,1);
SetTimer("profitup",300000,1);
SetTimer("PhoneCut",1000,1);
oldvehcount = dini_Int(FILE_SETTINGS,"vehicleresetcount");
//==============================ALL GAME TEAMS==================================
//Classes Note: Some of the Classes are Cams so give Credit to him too
AddPlayerClass(105,2508.0906,-1672.3979,13.3785,88.5103,29,9999,25,600,24,9999);//GROVE
AddPlayerClass(106,2508.0906,-1672.3979,13.3785,88.5103,29,9999,25,600,24,9999);//GROVE
AddPlayerClass(107,2508.0906,-1672.3979,13.3785,88.5103,29,9999,25,600,24,9999);//GROVE
AddPlayerClass(108,2352.9197,-1167.6571,27.7326,10.3408,30,9999,37,600,42,9999);//VAGOS
AddPlayerClass(109,2352.9197,-1167.6571,27.7326,10.3408,30,9999,37,600,42,9999);//VAGOS
AddPlayerClass(110,2352.9197,-1167.6571,27.7326,10.3408,30,9999,37,600,42,9999);//vagos
AddPlayerClass(102,2070.2710,-1570.2823,13.4166,183.6345,32,9999,22,600,33,9999);//BALLAS
AddPlayerClass(103,2070.2710,-1570.2823,13.4166,183.6345,32,9999,22,600,33,1000);//BALLAS
AddPlayerClass(104,2070.2710,-1570.2823,13.4166,183.6345,32,9999,22,600,33,1000);//BALLAS
AddPlayerClass(111,2303.5532,-1646.3413,14.5748,5843,31,9999,23,600,27,9999);//MAFIA
AddPlayerClass(112,2303.5532,-1646.3413,14.5748,200.5843,31,9999,23,600,27,9999);//MAFIA
AddPlayerClass(113,2303.5532,-1646.3413,14.5748,200.5843,31,9999,23,600,27,9999);//MAFIA
AddPlayerClass(125,2303.5532,-1646.3413,14.5748,200.5843,31,9999,23,600,27,9999);//MAFIA
AddPlayerClass(124,2303.5532,-1646.3413,14.5748,200.5843,31,9999,23,600,27,9999);//MAFIA
AddPlayerClass(127,2303.5532,-1646.3413,14.5748,200.5843,31,9999,23,600,27,9999);//MAFIA
AddPlayerClass(285,1584.7920,-1677.5713,5.8973,277.7305,31,9999,22,600,3,9999);//SBIRRO
AddPlayerClass(286,1584.7920,-1677.5713,5.8973,277.7305,31,9999,22,600,3,9999);//SBIRRO
AddPlayerClass(287,1584.7920,-1677.5713,5.8973,277.7305,31,9999,22,600,3,9999);//SBIRRO
AddPlayerClass(192,2386.0945,-1712.7379,14.2167,167.3103,22,9000,31,9000,23,9999);//CIVILE
AddPlayerClass(22,2386.0945,-1712.7379,14.2167,167.3103,22,9000,31,9000,23,9999);
AddPlayerClass(186,2386.0945,-1712.7379,14.2167,167.3103,22,9000,31,9000,23,9999);
AddPlayerClass(120,2386.0945,-1712.7379,14.2167,167.3103,22,9000,31,9000,23,9999);
AddPlayerClass(19,2386.0945,-1712.7379,14.2167,167.3103,22,9000,31,9000,23,9999);
AddPlayerClass(22,2386.0945,-1712.7379,14.2167,167.3103,22,9000,31,9000,23,9999);
AddPlayerClass(181,2386.0945,-1712.7379,14.2167,167.3103,22,9000,31,9000,23,9999);
AddPlayerClass(244,2386.0945,-1712.7379,14.2167,167.3103,22,9000,31,9000,23,9999);
AddPlayerClass(212,2386.0945,-1712.7379,14.2167,167.3103,22,9000,31,9000,23,9999);
AddPlayerClass(152,2386.0945,-1712.7379,14.2167,167.3103,22,9000,31,9000,23,9999);
//========================ALL GAME VEHICLES AND PICKUPS=========================
AddStaticPickup(371, 2, 1529.3684,-1347.9644,329.4609); // para
CreateObject(9339, 1393.364014, -1504.600464, 9.096040, 0.0000, 0.0000, 344.4528);
CreateObject(1634, 1371.487671, -1567.995117, 8.969193, 0.0000, 0.0000, 161.7972);
CreateObject(4100, 1370.013794, -1699.439087, 9.681642, 0.0000, 0.0000, 81.3283);
CreateObject(1225, 1429.715820, -1717.864746, 6.265130, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1452.736328, -1723.516968, 6.265130, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1452.372925, -1728.150391, 6.265130, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1442.976807, -1720.879028, 6.265130, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1435.184937, -1723.375610, 6.265130, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1425.018066, -1721.262817, 6.265130, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1435.096802, -1719.033813, 6.265130, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1464.880127, -1727.202148, 6.265130, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1473.672119, -1729.218628, 6.217814, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1476.621582, -1729.676147, 6.193041, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1481.629883, -1731.086060, 6.149582, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1490.251831, -1732.748901, 6.076447, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1497.015869, -1734.419067, 5.971431, 0.0000, 0.0000, 0.0000);
CreateObject(1425, 1520.875244, -1736.212280, 5.436152, 0.0000, 0.0000, 258.7500);
CreateObject(1225, 1522.231812, -1735.743042, 5.350423, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1521.282349, -1736.952637, 5.371252, 0.0000, 0.0000, 0.0000);
CreateObject(984, 1624.121948, -1751.307129, 3.594145, 0.0000, 0.0000, 112.5000);
CreateObject(1425, 1669.128540, -1769.777100, 3.423698, 0.0000, 0.0000, 258.7500);
CreateObject(1425, 1668.985718, -1770.570801, 3.423555, 0.0000, 0.0000, 258.7500);
CreateObject(1225, 1670.102051, -1771.912964, 3.377432, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1670.102051, -1770.412964, 3.377432, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1669.905396, -1768.915405, 3.377336, 0.0000, 0.0000, 0.0000);
CreateObject(1634, 1936.937134, -1831.125000, 7.375443, 0.0000, 0.0000, 256.1717);
CreateObject(1427, 1920.710571, -1835.943359, 3.531519, 0.0000, 0.0000, 78.7500);
CreateObject(1427, 1919.243530, -1837.682983, 3.531519, 0.0000, 0.0000, 78.7500);
CreateObject(1225, 1924.536743, -1835.910400, 3.390131, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1923.267212, -1841.404053, 3.390130, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1924.215332, -1837.583374, 3.390130, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1923.400146, -1840.355957, 3.390130, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1923.872559, -1838.464722, 3.390130, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1924.750977, -1834.999146, 3.390131, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1924.928101, -1834.130859, 3.390130, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1928.535156, -1832.830078, 3.487121, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1924.295898, -1836.750244, 3.390131, 0.0000, 0.0000, 0.0000);
CreateObject(1225, 1923.714844, -1839.295898, 3.390131, 0.0000, 0.0000, 0.0000);
CreateObject(4870, 2117.726563, -1851.077026, 3.394706, 0.0000, 0.0000, 0.0000);
CreateObject(1245, 2016.735718, -1849.714233, 4.471948, 0.0000, 0.0000, 180.0000);
CreateObject(1245, 2016.879517, -1852.938965, 4.471948, 0.0000, 0.0000, 180.0000);
CreateObject(1245, 2017.334473, -1846.651123, 4.471948, 0.0000, 0.0000, 180.0000);
CreateObject(1245, 2016.525269, -1856.472168, 4.471948, 0.0000, 0.0000, 180.0000);
CreateObject(17653, 2309.703613, -1852.058350, 9.043278, 0.0000, 0.0000, 270.0000);
CreateObject(1634, 2393.207031, -1851.427368, 18.874268, 0.0000, 0.8594, 270.8595);
CreateObject(1634, 2595.414063, -1854.072021, 3.881397, 0.0000, 0.0000, 270.0000);
CreateObject(1634, 2572.262451, -1906.781128, 3.984688, 0.0000, 0.0000, 181.7189);
CreateObject(13592, 2599.044189, -1517.788574, 25.186707, 0.0000, 326.4820, 83.9839);
CreateObject(13592, 2612.493896, -1522.400879, 24.866062, 0.0000, 326.4820, 83.9839);
CreateObject(13592, 2605.407715, -1519.975464, 24.937420, 0.0000, 326.4820, 83.9839);
CreateObject(1632, 2571.787598, -1678.443481, 1.977108, 0.0000, 0.0000, 180.0000);
CreateObject(1632, 2570.934814, -1794.698486, 1.940737, 0.0000, 0.0000, 0.0000);
CreateObject(13641, 2597.969727, -1971.882080, 4.578619, 0.0000, 0.0000, 270.0000);
CreateObject(16401, 2570.078125, -1985.285156, 2.853264, 0.0000, 0.0000, 270.0000);
CreateObject(16401, 2579.196533, -1985.002686, 2.853264, 0.0000, 0.0000, 270.0000);
CreateObject(1634, 2573.181641, -1962.015381, 4.156693, 0.0000, 0.0000, 1.7189);
CreateObject(3985, 2621.644775, -2062.039795, 243.639923, 0.0000, 0.0000, 0.0000);
CreateObject(6965, 2622.678223, -2070.082520, 249.221130, 0.0000, 0.0000, 0.0000);
CreateObject(737, 2599.571045, -2051.558594, 245.787384, 0.0000, 0.0000, 0.0000);
CreateObject(737, 2643.577148, -2050.728027, 245.787384, 0.0000, 0.0000, 0.0000);
CreateObject(11507, 1460.113281, -108.135841, 194.861435, 0.0, 0.0, 180.0);
CreateObject(11507, 1214.021240, -107.197754, 197.665619, 0.0, 0.0, 180.0);
CreateObject(11507, 960.208008, -106.939079, 217.257339, 0.0, 0.0, 180.0);
CreateObject(11111, 1426.8864, -2497.1648, 23.3797, 315.3093, 0.0000, 269.7591);
CreateObject(11111, 1384.8903, -2496.9875, 66.1774, 313.5904, 0.0000, 269.7591);
CreateObject(11111, 1343.8188, -2496.7952, 109.3410, 313.5904, 0.0000, 269.7591);
CreateObject(11111, 1303.0612, -2496.6526, 152.1940, 313.5904, 0.0000, 269.7591);
CreateObject(11111, 1252.4650, -2495.5837, 172.1331, 3.4377, 0.0000, 268.0403);
CreateObject(1632, 1426.3339, -2497.2019, 25.2624, 315.3093, 0.8594, 271.4781);
CreateObject(1632, 1434.0632, -2497.0234, 23.7869, 335.9358, 0.8594, 271.4781);
CreateObject(1632, 1442.2400, -2496.9316, 25.5798, 1.7189, 1.7189, 271.4781);
CreateObject(1632, 1447.8456, -2496.7908, 30.2580, 30.0803, 0.0000, 271.4781);
CreateObject(4023, 1496.6951, -2611.7095, 24.2781, 0.0000, 0.0000, 0.0000);
CreateObject(1632, 1521.6614, -2624.2476, 15.1470, 19.7670, 0.0000, 179.5182);
CreateObject(1632, 1521.5396, -2627.9275, 20.5587, 42.9718, 0.0000, 179.5182);
CreateObject(1633, 1521.5065, -2629.0671, 27.4390, 69.6144, 0.0000, 181.2370);
CreateObject(1633, 1521.4144, -2628.7585, 33.6472, 85.0842, 4.2972, 181.2370);
CreateObject(1696, 1492.8369, -2597.0437, 35.9572, 0.0000, 0.0000, 0.0000);
CreateObject(1696, 1498.2075, -2597.0518, 35.9572, 0.0000, 0.0000, 0.0000);
CreateObject(13590, 1780.0720, -2520.6892, 13.8227, 0.0000, 0.0000, 93.5746);
CreateObject(12956, 1729.3098, -2483.9460, 15.9329, 0.0000, 0.0000, 0.0000);
CreateObject(3287, 2045.6914, -2596.6194, 17.2359, 0.0000, 0.0000, 0.0000);
CreateObject(3287, 2051.9907, -2596.5471, 17.0911, 0.0000, 0.0000, 0.0000);
CreateObject(6928, 1976.7775, -2634.5837, 14.4132, 0.0000, 0.0000, 0.0000);
CreateObject(5126, 2124.8418, -2549.4048, 27.6712, 0.0000, 0.0000, 179.6225);
CreateObject(13593, 2034.4865, -2599.0085, 13.5647, 14.6104, 0.0000, 269.7591);
CreateObject(3426, 1629.6284, -2445.1775, 13.2959, 0.0000, 0.0000, 182.9559);
CreateObject(1632, 1656.1104, -2543.0635, 18.3440, 24.9237, 0.0000, 90.2409);
CreateObject(16776, 1481.3427, -2601.0891, 36.7008, 0.0000, 0.8594, 52.3215);
CreateObject(13593, 2061.3398, -2597.9016, 13.4081, 10.3132, 0.0000, 89.2777);
CreateObject(1632, 1878.9061, -2543.0371, 18.6032, 34.3775, 0.0000, 271.4780);
CreateObject(1632, 1888.6827, -2543.1458, 18.7771, 34.3775, 0.0000, 92.7152);
CreateObject(13592, 1409.4922, -2593.0117, 21.6425, 274.0564, 0.0000, 354.8434);
CreateObject(13592, 1408.3781, -2593.4358, 28.7675, 274.0564, 0.0000, 354.8434);
CreateObject(13592, 1407.3538, -2593.8059, 35.3425, 274.0564, 0.0000, 354.8434);
CreateObject(13592, 1406.2087, -2594.2056, 42.5964, 274.0564, 0.0000, 354.8434);
CreateObject(13592, 1405.1012, -2594.6135, 49.8590, 274.0564, 0.0000, 354.8434);
CreateObject(13592, 1403.9801, -2595.0313, 57.1115, 274.0564, 0.0000, 354.8434);
CreateObject(1655, 1394.8033, -2603.2500, 66.8318, 358.2811, 85.9437, 84.2248);
CreateObject(9241, 1377.6155, -2593.7058, 61.1308, 0.0000, 0.0000, 0.0000);
CreateObject(1632, 1415.9493, -2601.7278, 14.1970, 10.3132, 29.2208, 127.1967);
CreateObject(18450, 1827.5482, -2381.7698, 24.2228, 0.8594, 18.0482, 290.3857);
CreateObject(18450, 1801.2488, -2312.2051, 48.4443, 0.8594, 18.0482, 290.3857);
CreateObject(8420, 1754.5964, -2267.7273, 61.2594, 0.0000, 0.0000, 110.0078);
CreateObject(1655, 1752.6357, -2308.7371, 63.1154, 11.1727, 0.0000, 171.7832);
CreateObject(3749, 1786.8469, -2274.8413, 66.7194, 0.0000, 0.0000, 19.7670);
CreateObject(17565, 1686.7581, -2594.6494, 15.0556, 0.0000, 0.0000, 269.7591);
CreateObject(13640, 1765.0620, -2235.1028, 61.9312, 0.0000, 0.0000, 21.4859);
CreateObject(13640, 1744.0219, -2243.5769, 62.2312, 0.0000, 0.0000, 21.4859);
CreateObject(8420, 1698.6826, -2288.0735, 61.0652, 0.0000, 0.0000, 289.5261);
CreateObject(13647, 1698.9702, -2285.4363, 61.0378, 0.0000, 0.0000, 20.6265);
CreateObject(13648, 1735.0952, -2272.0552, 61.0319, 0.0000, 0.0000, 110.0079);
CreateObject(16304, 1661.4893, -2274.0464, 66.0802, 0.0000, 0.0000, 0.0000);
CreateObject(13638, 1711.5342, -2316.4524, 63.5642, 0.0000, 0.0000, 109.1485);
CreateObject(13636, 1706.5358, -2254.1160, 63.3222, 0.0000, 0.0000, 19.0114);
CreateObject(9241, 1377.7820, -2569.3269, 61.1427, 0.0000, 0.0000, 180.3776);
CreateObject(11395, 1378.5243, -2556.5215, 69.8165, 0.0000, 0.0000, 0.0000);
CreateObject(1632, 1648.7120, -2543.2063, 18.4282, 24.9237, 0.0000, 268.8997);
CreateObject(982, 1366.7220, -2589.8557, 62.6425, 0.0000, 0.0000, 0.0000);
CreateObject(982, 1366.7361, -2589.8643, 63.8174, 0.0000, 180.3775, 0.0000);
CreateObject(1634, 2069.8381, -2669.7764, 13.4044, 0.0000, 0.0000, 333.3575);
CreateObject(6873, 1480.5852, -2650.3755, -71.8370, 0.0000, 0.0000, 89.2774);
CreateObject(1634, 1477.2397, -2622.6929, 36.9723, 14.6104, 0.0000, 104.8513);
CreateObject(1634, 1472.5040, -2623.8879, 42.9320, 36.0963, 0.0000, 104.8513);
CreateObject(1634, 1469.8650, -2624.4973, 50.5999, 54.1445, 0.0000, 104.8513);
CreateObject(1633, 1469.9115, -2624.6479, 59.0704, 76.4899, 0.0000, 98.7312);
CreateObject(4874, 1506.5398, -2647.9612, 71.3241, 0.0000, 0.0000, 179.5182);
CreateObject(5822, 1455.6718, -2654.4487, 77.6688, 0.0000, 0.0000, 183.9195);
CreateObject(5130, 1460.0166, -2636.4358, 66.6083, 0.0000, 0.0000, 41.2530);
CreateObject(1632, 1500.5956, -2632.8254, 64.1694, 28.3614, 0.0000, 269.7591);
CreateObject(13592, 1819.9015, -2574.5352, 22.0925, 0.0001, 1.7189, 99.6946);
CreateObject(13592, 1813.1265, -2574.6609, 22.0675, 0.0001, 1.7189, 99.6946);
CreateObject(13592, 1806.3298, -2574.7683, 22.0175, 0.0001, 1.7189, 99.6946);
CreateObject(13592, 1799.5603, -2574.9287, 22.0175, 0.0001, 1.7189, 99.6946);
CreateObject(13592, 1792.2646, -2575.0603, 21.9925, 0.0001, 1.7189, 99.6946);
CreateObject(13592, 1784.8563, -2575.2151, 21.9425, 0.0001, 1.7189, 99.6946);
CreateObject(1655, 1780.4288, -2570.0522, 14.3720, 10.3132, 0.0000, 3.4378);
CreateObject(1634, 1402.6847, -2660.9553, 13.5250, 0.0000, 0.0000, 340.2330);
CreateObject(1634, 1347.7880, -2551.6384, 13.4223, 0.0000, 0.0000, 271.4780);
CreateObject(1655, 1994.1520, -2494.0068, 14.4642, 10.3132, 0.0000, 268.0403);
CreateObject(1655, 2000.0996, -2494.2261, 20.5966, 35.2369, 0.0000, 268.0403);
CreateObject(1655, 2003.6462, -2494.3943, 28.1032, 48.9879, 0.0000, 268.0403);
CreateObject(1655, 2005.0548, -2494.4941, 35.5448, 63.5983, 0.0000, 268.0403);
CreateObject(1655, 2004.6226, -2494.5181, 43.8596, 77.3492, 0.0000, 268.0403);
CreateObject(1655, 2001.9056, -2494.4958, 51.1968, 97.1163, 0.0000, 268.0403);
CreateObject(1655, 1996.2144, -2494.3252, 57.4748, 121.1805, 0.0000, 268.0403);
CreateObject(1655, 1988.6832, -2493.8108, 61.1651, 140.9477, 0.8594, 265.4620);
CreateObject(8391, 1395.7748, -2431.3250, 28.9601, 0.0000, 0.0000, 282.6506);
CreateObject(1655, 1385.6543, -2424.4712, 14.3048, 8.5944, 0.0000, 90.2409);
CreateObject(1655, 1379.8706, -2424.4619, 19.5930, 30.0803, 0.0000, 90.2409);
CreateObject(1655, 1375.9878, -2424.4226, 25.9121, 41.2530, 0.0000, 90.2409);
CreateObject(1655, 1373.5939, -2424.4739, 33.3081, 57.5822, 0.0000, 90.2409);
CreateObject(1655, 1373.1646, -2424.4941, 41.6484, 71.3332, 0.0000, 90.2409);
CreateObject(1655, 1369.6245, -2460.2290, 48.6771, 13.7509, 0.0000, 191.6545);
CreateObject(1655, 1422.3533, -2402.3047, 48.7021, 13.7509, 0.0000, 282.7546);
CreateObject(4726, 1463.3341, -2396.3433, 49.8039, 0.0000, 0.0000, 0.0000);
CreateObject(4727, 1463.3159, -2396.3982, 50.1277, 0.0000, 0.0000, 0.0000);
CreateObject(7979, 1473.2761, -2546.4255, 15.6338, 0.0000, 0.0000, 90.2409);
CreateObject(10948, 1905.3707, -2250.6580, 62.3934, 0.0000, 0.0000, 89.2774);
CreateObject(5001, 1947.1947, -2290.4810, 32.9187, 80.7871, 312.7310, 133.2128);
CreateObject(1633, 1951.4948, -2272.3796, 13.0586, 354.8434, 358.2811, 357.4217);
CreateObject(1632, 1890.5048, -2273.5845, 59.1998, 16.3293, 0.0000, 87.6625);
CreateObject(1632, 1886.0028, -2273.4019, 65.1168, 42.1124, 0.0000, 87.6625);
CreateObject(1632, 1884.5913, -2273.3604, 71.9893, 67.8955, 0.0000, 87.6625);
CreateObject(1632, 1885.8025, -2273.2524, 79.7829, 85.9437, 0.0000, 94.5380);
CreateObject(1632, 1911.1649, -2211.9255, 83.1748, 16.3293, 0.0000, 1.7189);
CreateObject(1632, 1911.1115, -2207.3425, 89.1723, 42.1124, 0.0000, 1.7189);
CreateObject(1632, 1911.1431, -2205.3062, 96.6625, 61.8794, 0.0000, 358.2811);
CreateObject(1655, 1847.4841, -2245.5437, 105.7248, 0.0000, 0.0000, 104.7472);
CreateObject(13638, 1704.0999, -2331.6973, 71.6820, 0.0000, 0.0000, 109.1485);
CreateObject(13592, 1402.8209, -2595.4497, 64.3669, 274.0564, 0.0000, 354.8434);
CreateObject(4113, 1377.5581, -2576.0313, 23.3505, 0.0000, 0.0000, 278.3535);
CreateObject(1684, 1886.1834, -2195.4612, 103.2395, 0.0000, 0.0000, 269.7591);
CreateObject(1684, 1886.1470, -2205.5059, 103.2395, 0.0000, 0.0000, 269.7591);
CreateObject(1684, 1886.1008, -2215.5513, 103.2453, 0.0000, 0.0000, 269.7591);
CreateObject(13638, 1688.6693, -2333.5049, 79.7685, 0.0000, 0.0000, 18.9077);
CreateObject(13562, 2120.8804, -2549.0730, 44.2037, 0.0000, 0.0000, 0.0000);
CreateObject(1632, 2062.5491, -2548.6404, 14.9220, 17.1887, 0.0000, 268.0403);
CreateObject(7073, 1978.3165, -2627.2849, 51.8151, 0.0000, 0.0000, 85.9437);
CreateObject(1632, 1977.2985, -2616.7556, 13.8470, 11.1727, 359.1406, 180.3777);
CreateObject(1632, 1977.3795, -2622.0452, 20.5220, 43.8313, 359.1406, 180.3777);
CreateObject(1633, 1977.4076, -2623.6675, 27.2699, 64.4577, 0.0000, 179.5182);
CreateObject(1633, 1977.4138, -2624.4458, 34.5979, 71.3332, 0.0000, 179.5182);
CreateObject(1633, 1977.2733, -2624.1338, 41.3472, 82.5059, 0.0000, 179.5182);
CreateObject(13722, 2045.7214, -2638.5005, 21.9834, 0.0000, 0.0000, 180.3776);
CreateObject(13831, 2045.7052, -2638.5134, 21.9632, 0.0000, 0.0000, 180.3776);
CreateObject(3256, 2130.8538, -2513.3096, 13.1846, 0.0000, 0.0000, 0.0000);
CreateObject(1267, 2139.7283, -2489.1035, 28.6116, 0.0000, 0.0000, 0.0000);
CreateObject(6066, 2111.7190, -2493.4143, 15.0473, 0.0000, 0.0000, 184.7789);
CreateObject(1655, 2105.7898, -2493.8894, 13.6892, 2.5783, 0.0000, 274.9158);
CreateObject(6875, 2137.0735, -2400.5913, 6.7954, 0.0000, 0.0000, 0.0000);
CreateObject(6066, 2091.9978, -2448.8511, 15.0473, 0.0000, 0.0000, 232.0480);
CreateObject(1655, 2088.4063, -2453.4890, 13.7720, 2.5783, 0.0000, 322.1847);
CreateObject(9237, 2095.3101, -2638.3826, 20.5323, 0.0000, 0.0000, 282.6507);
CreateObject(1632, 1438.7162, -2633.6597, 84.2600, 3.4377, 0.0000, 54.9000);
CreateObject(4005, 1560.7459, -2382.5532, 20.3501, 0.0000, 0.0000, 3.4377);
CreateObject(6066, 1565.3146, -2435.8921, 14.9547, 0.0000, 0.0000, 275.0197);
CreateObject(1655, 1565.6495, -2441.8306, 13.7048, 3.4377, 0.0000, 4.2972);
CreateObject(6099, 1860.5532, -2657.6689, 21.0845, 0.0000, 0.0000, 0.0000);
CreateObject(6066, 1860.4592, -2581.1760, 15.0223, 0.0000, 0.0000, 86.9069);
CreateObject(1655, 1860.6936, -2575.0767, 13.7720, 2.5783, 0.0000, 176.0804);
CreateObject(1655, 1860.3190, -2633.5332, 36.9818, 2.5783, 0.0000, 0.8594);
CreateObject(1632, 1389.1747, -2556.1677, 63.2709, 4.2972, 0.0000, 330.7792);
CreateObject(11111, 1458.4629, -2497.3127, 2.1547, 329.0603, 0.0000, 269.7591);
CreateObject(1378, 2036.9343, -2373.8577, 36.6131, 0.0000, 0.0000, 312.7310);
CreateObject(1632, 1983.8982, -2421.1467, 13.8470, 4.2972, 0.0000, 310.9085);
CreateObject(1632, 1981.2323, -2418.0398, 13.8470, 4.2972, 0.0000, 310.9085);
CreateObject(1655, 1985.9271, -2416.7034, 17.1400, 30.0803, 0.0000, 311.0121);
CreateObject(1632, 2020.6383, -2389.0981, 44.2427, 23.2048, 0.0000, 310.9085);
CreateObject(1655, -2239.2400, -1735.8900, 480.1100, 0.0000, 0.0000, 220.0000);
CreateObject(3055, 230.6800, -1910.7400, 0.4500, 90.0000, 0.0000, 0.0000);
CreateObject(3055, 222.8500, -1910.7500, 0.4600, 90.0000, 0.0000, 0.0000);
//skroad
CreateObject(18449, 2520.9541, -1610.8210, 54.7345, 0.0000, 306.7150, 0.8594);
CreateObject(18449, 2558.3713, -1610.6698, 114.3982, 0.0000, 298.1206, 0.0000);
CreateObject(18449, 2595.8835, -1610.6539, 184.5256, 0.0000, 298.1206, 0.0000);
CreateObject(18449, 2632.8396, -1610.6309, 253.7211, 0.0000, 298.1206, 0.0000);
CreateObject(18449, 2670.2693, -1610.6257, 323.7372, 0.0000, 298.1206, 0.0000);
CreateObject(18449, 2707.6824, -1610.6024, 393.6658, 0.0000, 298.1206, 0.0000);
CreateObject(18449, 2744.4993, -1610.6088, 462.5435, 0.0000, 298.1206, 0.0000);
CreateObject(18449, 2782.0684, -1610.5925, 532.8621, 0.0000, 298.1206, 0.0000);
CreateObject(18449, 2819.6699, -1610.5679, 603.2286, 0.0000, 298.1206, 0.0000);
CreateObject(18449, 2856.9753, -1610.5376, 673.0189, 0.0000, 298.1206, 0.0000);
CreateObject(18449, 2894.5356, -1610.5482, 743.3477, 0.0000, 298.1206, 0.0000);
CreateObject(18449, 2932.0188, -1610.6125, 813.4912, 0.0000, 298.1206, 0.0000);
CreateObject(18449, 2979.2112, -1610.5981, 876.7773, 0.0000, 315.3093, 0.0000);
CreateObject(18449, 3035.8696, -1610.5890, 932.8416, 0.0000, 315.3093, 0.0000);
CreateObject(18449, 3091.9768, -1610.5883, 988.3503, 0.0000, 315.3093, 0.0000);
CreateObject(18449, 3148.2869, -1610.5679, 1044.0637, 0.0000, 315.3093, 0.0000);
CreateObject(18449, 3204.7615, -1610.5299, 1099.9456, 0.0000, 315.3093, 0.0000);
CreateObject(18449, 3261.4958, -1610.5055, 1156.0834, 0.0000, 315.3093, 0.0000);
CreateObject(18449, 3325.5532, -1610.4595, 1202.0547, 0.0000, 333.3575, 0.0000);
CreateObject(18449, 3396.6646, -1610.4713, 1237.7325, 0.0000, 333.3575, 0.0000);
CreateObject(18449, 3467.6904, -1610.5023, 1273.3676, 0.0000, 333.3575, 0.0000);
CreateObject(18449, 3538.1736, -1610.5227, 1308.7449, 0.0000, 333.3575, 0.0000);
CreateObject(18449, 3607.8508, -1610.5436, 1343.7198, 0.0000, 333.3575, 0.0000);
CreateObject(18449, 3679.0918, -1610.5148, 1379.4767, 0.0000, 333.3575, 0.0000);
CreateObject(18449, 3750.2859, -1610.4646, 1415.2097, 0.0000, 333.3575, 0.0000);
CreateObject(18449, 3825.7336, -1610.4839, 1436.6946, 0.0000, 354.8434, 0.0000);
CreateObject(4639, 3865.6023, -1601.0863, 1442.3084, 0.0000, 0.0000, 89.2774);
CreateObject(3627, 3939.5134, -1607.8434, 1444.4513, 0.0000, 0.0000, 0.0000);
CreateObject(18449, 2532.5139, -1610.6694, 71.6908, 0.0000, 317.8877, 1.7189);
CreateObject(18449, 2526.8171, -1610.8329, 67.2572, 0.0000, 328.2009, 1.7189);
CreateObject(18449, 2523.7686, -1610.9111, 65.1158, 0.0000, 342.8113, 1.7189);
CreateObject(18449, 2513.1240, -1611.2356, 61.7643, 0.0000, 354.8434, 1.7189);
CreateObject(18449, 2496.6313, -1611.7927, 61.3713, 0.0000, 4.2972, 1.7189);
CreateObject(18449, 2495.8384, -1611.8748, 62.0968, 0.0000, 12.0321, 1.7189);
CreateObject(18449, 2487.4050, -1612.0728, 65.9149, 0.0000, 22.3454, 1.7189);
CreateObject(18449, 2502.7729, -1611.6041, 55.0266, 0.0000, 38.6747, 1.7189);
CreateObject(1655, -2239.2400, -1735.8900, 480.1100, 0.0000, 0.0000, 220.0000);
CreateObject(3055, 230.6800, -1910.7400, 0.4500, 90.0000, 0.0000, 0.0000);
CreateObject(3055, 222.8500, -1910.7500, 0.4600, 90.0000, 0.0000, 0.0000);
//----------------------------------Vehicles------------------------------------
AddStaticVehicle(534,2518.8787,-1684.2831,13.1937,52.0758,64,1); // remintong grove
AddStaticVehicle(534,2506.4358,-1693.9718,13.2608,1.4113,1,39); // sultan trukkata grove
AddStaticVehicle(522,2433.7410,-1671.0415,13.1613,349.5496,3,8); // nrg 500 grove
AddStaticVehicle(522,2432.8293,-1671.1030,13.1555,349.1795,6,25); // nrg 500 grove 2
AddStaticVehicle(522,2431.9426,-1671.0377,13.1644,348.6516,7,79); // nrg 500 grove 3
AddStaticVehicle(522,2431.0623,-1670.9467,13.1609,348.1337,8,82); // nrg 500 grove 4
AddStaticVehicle(522,2430.1785,-1670.8535,13.1582,347.9308,36,105); // nrg 500 grove 5
AddStaticVehicle(567,2442.7993,-1646.1359,13.2035,178.5755,123,1); // savanna1 grove
AddStaticVehicle(567,2455.2522,-1665.7228,13.2006,87.5659,116,1); // savanna2 grove
AddStaticVehicle(492,2490.9226,-1682.4877,13.0638,90.6356,112,1); // grenwood grove 1
AddStaticVehicle(492,2473.7646,-1691.3702,13.2408,2.7877,106,1); // greenwood grove2
AddStaticVehicle(492,2427.3853,-1639.4136,13.1905,186.6326,80,1); // remintong grove
AddStaticVehicle(492,2383.5498,-1645.9495,13.2549,178.7280,75,1); // savanna4 grove
AddStaticVehicle(522,2297.2246,-1630.5723,14.2744,180.3242,39,106); // nrg500 mafia1
AddStaticVehicle(522,2298.1274,-1630.7581,14.2397,180.3025,51,118); // nrg500 mafia2
AddStaticVehicle(522,2299.0303,-1630.9463,14.2242,180.2813,3,3); // nrg500 mafia3
AddStaticVehicle(522,2299.9333,-1631.1345,14.2108,180.2503,3,8); // nrg500 mafia4
AddStaticVehicle(522,2300.8367,-1631.3234,14.1940,180.1998,6,25); // nrg500 mafia5
AddStaticVehicle(411,2294.0591,-1684.2192,13.5474,359.2083,12,1); // infernus nafia
AddStaticVehicle(411,2290.6267,-1684.0750,13.5687,359.7349,64,1); // infernus mafia1
AddStaticVehicle(411,2287.9636,-1684.1881,13.5904,0.8292,123,1); // infernus mafia2
AddStaticVehicle(411,2284.8530,-1684.1437,13.6493,1.8612,116,1); // infernus mafia3
AddStaticVehicle(522,1154.3909,-2796.8760,-12.9272,4.7880,6,25); // dm2
AddStaticVehicle(411,2030.8008,-2626.7700,13.2301,359.0888,112,1); // infernus stunt
AddStaticVehicle(411,2034.7756,-2626.4065,13.2739,4.1386,106,1); // infernus stunt 1
AddStaticVehicle(411,2038.9429,-2626.3376,13.2740,8.7706,80,1); // infernus stunt 2
AddStaticVehicle(411,2043.9033,-2626.2786,13.2740,358.7639,75,1); // infernus stunt 3
AddStaticVehicle(411,2048.6963,-2625.9937,13.2739,7.1394,12,1); // infernus stunt 4
AddStaticVehicle(522,2076.3884,-2622.3203,13.1189,356.7242,7,79); // nrg stunt
AddStaticVehicle(522,2075.1072,-2622.4363,13.1165,4.1936,8,82); // nrg stunt 1
AddStaticVehicle(522,2077.6982,-2622.0369,13.1173,12.4949,36,105); // nrg stunt 2
AddStaticVehicle(522,2079.1819,-2621.9302,13.1327,7.9478,39,106); // nrg stunt 3
AddStaticVehicle(522,2080.0728,-2621.9600,13.1095,7.9478,51,118); // nrg stunt 3
AddStaticVehicle(522,2080.0728,-2621.9600,13.1095,7.9478,51,118); // nrg stunt 3
AddStaticVehicle(522,2080.9631,-2621.9873,13.1114,7.9475,3,3); // nrg stunt 4
AddStaticVehicle(522,2081.8535,-2622.0144,13.1109,7.9474,3,8); // nrg stunt 5
AddStaticVehicle(411,2090.5720,-2622.5520,13.2740,1.4089,64,1); // monster jam
AddStaticVehicle(411,2094.8552,-2622.7007,13.2740,3.6151,123,1); // monster jam
AddStaticVehicle(468,1758.0865,-2302.3826,61.9630,17.7417,116,1); // shanzech stunt
AddStaticVehicle(468,1767.1626,-2299.7998,61.8080,17.5216,7,79); // shanzech stunt
AddStaticVehicle(468,1767.1626,-2299.7998,61.8080,17.5220,7,79); // shanzech stunt
AddStaticVehicle(468,1767.1626,-2299.7998,61.8080,17.5222,7,79); // shanzech stunt2
AddStaticVehicle(468,1764.4745,-2300.5676,61.8077,16.2222,8,82); // shanzech stunt3
AddStaticVehicle(468,1761.3396,-2301.6899,61.8068,19.4418,36,105); // shanzech stunt4
AddStaticVehicle(522,1770.5403,-2298.5789,61.8077,21.1933,39,106); // nrg 5000 ell 1
AddStaticVehicle(522,1773.4535,-2297.8196,61.8085,18.6445,51,118); // nrg 5000 ell 2
AddStaticVehicle(522,1775.8542,-2295.8022,61.8076,19.7055,3,3); // nrg 5000 ell 3
AddStaticVehicle(444,1228.1309,-2497.3813,171.9716,269.0586,32,53); // monster jam sky
AddStaticVehicle(444,1228.2288,-2492.2227,171.9668,271.4591,32,14); // monster jam sky 2
AddStaticVehicle(522,2088.3718,-1555.4800,12.6942,179.8045,3,3); // NRG 550 BALLAS
AddStaticVehicle(522,2089.5679,-1555.5757,12.6766,177.9903,3,8); // NRG 550 BALLAS 2
AddStaticVehicle(522,2090.4739,-1555.5421,12.6819,178.0040,6,25); // NRG 550 BALLAS 3
AddStaticVehicle(522,2091.3730,-1555.6913,12.6675,178.0023,7,79); // NRG 550 BALLAS 4
AddStaticVehicle(522,2092.2720,-1555.8418,12.6642,178.0000,8,82); // NRG 550 BALLAS 5
AddStaticVehicle(443,2155.6694,-1593.2162,14.9872,250.4263,20,1); // ROD TRAINER BALLAS
AddStaticVehicle(566,2100.2271,-1580.9495,13.1550,90.8035,80,1); // THAOMA BALLAS
AddStaticVehicle(566,2099.9910,-1577.3778,13.1305,92.3466,75,1); // THAOMA BALLAS 2
AddStaticVehicle(566,2100.3931,-1572.6965,13.1107,87.4600,12,1); // THAOMA BALLAS 3
AddStaticVehicle(566,2100.3408,-1567.5413,13.1160,88.4118,64,1); // THAOMA BALLAS 4
AddStaticVehicle(522,2093.5664,-1555.9265,12.6730,182.1072,36,105); // NRG 500 BALLAS 123
AddStaticVehicle(444,2103.3958,-1599.9155,13.9243,223.1009,32,66); // MONSTER TRUCK BALLAS
AddStaticVehicle(481,2423.6812,-1675.5714,13.2467,3.1478,39,106); // BMX GROVE
AddStaticVehicle(481,1668.2297,-2300.8101,61.6126,292.8519,8,82); // BMX STUNT 2
AddStaticVehicle(481,1667.0118,-2298.2546,61.6127,286.7441,3,3); // BMX STUNT 3
AddStaticVehicle(481,1665.7428,-2294.9451,61.5951,292.4991,3,8); // BMX STUNT 3
AddStaticVehicle(522,1824.1931,-1349.0968,13.9953,273.3365,3,3); // nrg 1
AddStaticVehicle(547,1997.5244,-1327.4843,23.4883,179.9136,112,1); // primo 12
AddStaticVehicle(547,2030.9495,-1327.5366,23.4839,183.7586,106,1); // primo 134
AddStaticVehicle(547,2478.9473,-1747.0847,13.2740,357.8070,112,1); // primo 45
AddStaticVehicle(492,2408.9268,-1719.1444,13.4035,181.8846,106,1); // greenwood
AddStaticVehicle(567,2390.4197,-1719.0897,13.3258,179.7728,80,1); // savanna
AddStaticVehicle(443,2554.9563,-1734.6453,14.0165,269.7358,24,1); // packer
AddStaticVehicle(406,2370.5742,-1763.4363,15.0511,357.9900,1,1); // dumper
AddStaticVehicle(410,2274.8960,-1416.0431,23.6943,56.8076,75,1); // infernus
AddStaticVehicle(412,2347.9473,-1159.1171,26.9579,96.8441,75,1); // voodoo
AddStaticVehicle(522,2352.9751,-1141.6810,27.1783,181.9448,3,3); // nrg 500 vagos
AddStaticVehicle(522,2353.8535,-1141.8179,27.1743,181.6461,3,8); // nrg 500 vagos2
AddStaticVehicle(522,2354.7048,-1141.3191,27.2675,181.0766,6,25); // nrg 500 vagos3
AddStaticVehicle(522,2356.3013,-1141.3147,27.4830,181.0285,12,1); // nrg 500 vagos4 (infernus
AddStaticVehicle(412,2340.9729,-1149.2019,26.7833,92.2305,64,1); // voododo vagos2
AddStaticVehicle(412,2378.0356,-1164.9951,27.3306,9.3935,123,1); // voododo vagos3
AddStaticVehicle(412,2361.6592,-1182.2194,27.3948,263.9367,116,1); // voododo vagos4
AddStaticVehicle(411,-345.7862,1514.6765,75.0888,0.1478,80,1); // infernus drift3
AddStaticVehicle(411,-342.7604,1514.5752,75.0865,0.3167,75,1); // infernus2 drift3
AddStaticVehicle(411,-339.6896,1514.5332,75.0864,0.2628,12,1); // infernus2 drift33
AddStaticVehicle(547,-336.5579,1515.1410,75.0863,0.2435,64,1); // primo drift3
AddStaticVehicle(603,-333.5161,1515.1885,75.0865,358.9011,123,1); // phoneix drift3
AddStaticVehicle(603,-330.2986,1515.1144,75.0864,1.1704,116,1); // phoenix drift3
AddStaticVehicle(402,-327.3361,1514.9377,75.0825,359.8215,112,1); // buffalo drift3
AddStaticVehicle(415,-303.9377,1583.1078,75.0864,134.8085,106,1); // cheeetat
AddStaticVehicle(415,-301.2539,1580.8212,75.0864,134.5907,80,1); // cheeetat drift3
AddStaticVehicle(415,-299.0472,1578.3138,75.0865,138.1758,75,1); // cheeetat drift5
AddStaticVehicle(444,-263.2474,1542.5616,75.7307,132.9630,32,42); // monstertruck drift3
AddStaticVehicle(444,-266.6477,1546.2799,75.7557,134.0321,32,53); // monstertruck21drift3
AddStaticVehicle(506,-270.5515,1547.5591,75.0865,133.0527,12,1); // bullet drift3
AddStaticVehicle(506,-273.1127,1550.1941,75.0865,136.1121,64,1); // bullet drift3
AddStaticVehicle(506,-275.4181,1552.6567,75.0865,131.9577,123,1); // bullet drift4
AddStaticVehicle(560,-277.4445,1555.2098,75.0647,134.1337,9,39); // sultan drift3
AddStaticVehicle(560,-280.0954,1557.8258,75.0643,136.6493,17,1); // sultan drift56
AddStaticVehicle(560,-282.4182,1560.4689,75.0650,133.3314,21,1); // sultan drift55
AddStaticVehicle(565,-296.7955,1576.0068,74.9311,135.4846,36,105); // flash
AddStaticVehicle(565,-294.2097,1572.9902,75.0865,133.8765,116,1); // flash 2
AddStaticVehicle(565,-292.0292,1570.7581,75.0864,133.7728,112,1); // flash 3
AddStaticVehicle(535,-287.1223,1565.5518,75.0864,132.5555,106,1); // slamvan
AddStaticVehicle(535,-284.8970,1563.0165,75.0851,135.2020,80,1); // slamvan 2
AddStaticVehicle(535,-289.6971,1568.2755,75.0865,137.0736,75,1); // slamvan 22
AddStaticVehicle(596,1570.3250,-1709.7268,5.6177,0.0445,12,1); // macchina sbirri
AddStaticVehicle(597,1574.6542,-1709.3180,5.6177,358.1753,64,1); // macchina sbirr2
AddStaticVehicle(596,1578.6786,-1709.1710,5.6177,357.3241,123,1); // macchina sbirr3.
AddStaticVehicle(523,1603.1097,-1692.1721,5.4615,84.6336,6,25); // hp100 sbirri
AddStaticVehicle(523,1602.8762,-1687.7090,5.4624,86.2039,7,79); // hp100 sbirri
AddStaticVehicle(523,1603.3292,-1684.0415,5.4613,87.8400,7,79); // hp100 sbirri3646
AddStaticVehicle(523,1603.3149,-1695.6471,5.4609,87.6207,6,25); // hp100 sbirri3646264
AddStaticVehicle(597,1595.2561,-1711.2612,5.6177,356.6027,116,1); // securi car
AddStaticVehicle(601,1603.0701,-1615.5986,13.2256,88.0754,112,1); // fbi 54
AddStaticVehicle(601,1602.9216,-1619.7399,13.2240,96.2959,106,1); // fbi 5456
AddStaticVehicle(597,1583.2130,-1608.0487,13.1099,173.5380,80,1); // securi car 152
AddStaticVehicle(597,1577.5625,-1607.5500,13.1099,172.9946,75,1); // sbirri
AddStaticVehicle(523,1577.5625,-1607.5500,13.1099,172.9946,75,1); // jfbdlù
AddStaticVehicle(411,1570.3250,-1709.7268,5.6177,0.0445,12,1); // macchina sbirri
AddStaticVehicle(411,1574.6542,-1709.3180,5.6177,358.1753,64,1); // macchina sbirr2
AddStaticVehicle(411,1578.6786,-1709.1710,5.6177,357.3241,123,1); // macchina sbirr3.
AddStaticVehicle(522,1603.1097,-1692.1721,5.4615,84.6336,6,25); // hp100 sbirri
AddStaticVehicle(522,1602.8762,-1687.7090,5.4624,86.2039,7,79); // hp100 sbirri
AddStaticVehicle(522,1603.3292,-1684.0415,5.4613,87.8400,7,79); // hp100 sbirri3646
AddStaticVehicle(522,1603.3149,-1695.6471,5.4609,87.6207,6,25); // hp100 sbirri3646264
AddStaticVehicle(411,1595.2561,-1711.2612,5.6177,356.6027,116,1); // securi car
AddStaticVehicle(411,1603.0701,-1615.5986,13.2256,88.0754,112,1); // fbi 54
AddStaticVehicle(411,1602.9216,-1619.7399,13.2240,96.2959,106,1); // fbi 5456
AddStaticVehicle(411,1583.2130,-1608.0487,13.1099,173.5380,80,1); // securi car 15 2
AddStaticVehicle(411,1577.5625,-1607.5500,13.1099,172.9946,75,1); // sbirri
AddStaticVehicle(411,1577.5625,-1607.5500,13.1099,172.9946,75,1); // jfbdlù
AddStaticVehicle(534,2497.6829,-1655.6301,13.1182,74.1093,12,1); // remintong grove hjg verde
AddStaticVehicle(481,2425.0833,-1675.3848,13.2375,8.1699,6,25); // bmx grove
AddStaticVehicle(481,2426.1208,-1675.2120,13.2420,6.4954,7,79); // bmx grove 5
AddStaticVehicle(534,2403.5588,-1644.5376,13.2740,178.5682,0,0); // remintong grove nera fc
AddStaticVehicle(567,2361.6987,-1672.1949,13.2734,357.9164,123,1); // savanna grovestreeet
AddStaticVehicle(566,2063.7097,-1636.6951,13.2739,268.5570,116,1); // bullet
AddStaticVehicle(492,2052.2241,-1694.8846,13.2817,270.8326,112,1); // grebkjbsv grenwood
AddStaticVehicle(522,2550.4153,-1732.3530,5.8124,267.5779,51,118); // nrg500 stunt
AddStaticVehicle(522,2550.4617,-1736.7487,5.8129,267.5943,3,3); // nrg500 stunt6
AddStaticVehicle(522,2550.3696,-1734.9244,5.8149,269.0833,3,8); // nrg500 stunt66
AddStaticVehicle(522,2550.3335,-1731.3038,5.8179,271.9223,6,25); // nrg500 stunt6652
AddStaticVehicle(522,2550.4883,-1739.0686,5.8136,266.0471,7,79); // nrg500 stunt66525
AddStaticVehicle(481,2579.9104,-1745.6825,7.7873,174.8521,8,82); // bmx stunt 2
AddStaticVehicle(481,2586.6685,-1745.2755,7.8527,184.2124,36,105); // bmx stunt 22
AddStaticVehicle(481,2578.0225,-1758.7231,1.2113,176.3833,39,106); // bmx stunt 23
AddStaticVehicle(481,2578.9128,-1758.7260,1.2086,176.3349,51,118); // bmx stunt 232
AddStaticVehicle(481,2579.8091,-1758.9043,1.2021,176.3340,3,3); // bmx stunt 2324
AddStaticVehicle(481,2580.7053,-1759.0836,1.2021,176.3326,3,8); // bmx stunt 231
AddStaticVehicle(468,2581.6016,-1759.2627,1.2015,176.3314,6,25); // bmx stunt 232
AddStaticVehicle(468,2616.4758,-1730.3459,5.8024,88.4056,7,79); // sanchez stunt 2 f
AddStaticVehicle(468,2616.9473,-1728.7244,5.8077,87.9847,6,25); // sanchez stunt 2 f3
AddStaticVehicle(468,2616.8276,-1732.3193,5.8113,78.3911,7,79); // sanchez stunt 2 f33
AddStaticVehicle(468,2616.8008,-1738.9849,5.8138,93.9531,6,25); // sanchez stunt 2 f332
AddStaticVehicle(522,1419.0848,-1315.7773,13.1260,177.6265,8,82); // nrgg hisgdi
AddStaticVehicle(522,1419.9819,-1315.9352,13.1161,177.6263,36,105); // nrgg hisgdi52
AddStaticVehicle(522,1420.8790,-1316.0942,13.1151,177.6262,39,106); // nrgg hisgdi525
AddStaticVehicle(522,1421.7760,-1316.2535,13.1151,177.6260,51,118); // nrgg hisgdi5255
AddStaticVehicle(522,1422.6730,-1316.4128,13.1157,177.6259,3,3); // nrgg hisgdi5255
AddStaticVehicle(522,1423.5699,-1316.5720,13.1151,177.6256,3,8); // nrgg hisgdi52552
AddStaticVehicle(522,1418.8672,-1335.2177,13.1266,355.5617,6,25); // nrgg hisgdi52
AddStaticVehicle(522,1419.6173,-1335.3979,13.1315,355.5671,7,79); // nrgg hisgdi522
AddStaticVehicle(522,1420.9308,-1336.3773,13.1320,2.0191,8,82); // nrgg hisgdi5236
AddStaticVehicle(522,1421.8271,-1336.4974,13.1341,2.0178,36,105); // nrgg hisgdi52362
AddStaticVehicle(522,1422.7235,-1336.6176,13.1348,2.0166,39,106); // nrgg hisgdi523623
//-----------------------------------------285/250 CARS ALTOGETHER
//----------------------218/250 Cars in Use
//49/50 Car Types in Use
for(new i=1;i<=gVC;i++)
{
carcost[i] = 50000;
for(new s=0; s<24; s++)
{
if(gVehicleClass[i] == heavycar[s][0])
{
carcost[i] = 100000;
}
}
for(new a=0; a<11; a++)
{
if(gVehicleClass[i] == boat[a][0])
{
carcost[i] = 50000;
}
}
for(new b=0; b<11; b++){
if(gVehicleClass[i] == mbike[b][0])
{
carcost[i] = 40000;
}
}
for(new d=0; d<3; d++)
{
if(gVehicleClass[i] == pbike[d][0])
{
carcost[i] = 3000;
}
}
for(new e=0; e<6; e++)
{
if(gVehicleClass[i] == splane[e][0])
{
carcost[i] = 500000;
}
}
for(new f=0; f<2; f++)
{
if(gVehicleClass[i] == mplane[f][0])
{
carcost[i] = 1500000;
}
}
for(new v=0; v<2; v++)
{
if(gVehicleClass[i] == lplane[v][0])
{
carcost[i] = 2000000;
}
}
for(new n=0; n<4; n++)
{
if(gVehicleClass[i] == milair[n][0])
{
carcost[i] = 4000000;
}
}
for(new j=0; j<4; j++)
{
if(gVehicleClass[i] == sheli[j][0])
{
carcost[i] = 750000;
}
}
for(new k=0; k<3; k++)
{
if(gVehicleClass[i] == lheli[k][0])
{
carcost[i] = 1250000;
}
}
format(tmpname,sizeof(tmpname),"%d",i);
format(carname,sizeof(carname),"%s", VehicleName[gVehicleClass[i]-400][0]);
if (!dini_Exists(tmpname))
{
dini_Create(tmpname);
dini_Set(tmpname, "owner", "server");
dini_Set(tmpname, "carname", carname);
dini_IntSet(tmpname, "carcost", carcost[i]);
dini_IntSet(tmpname, "carlock", 0);
dini_IntSet(tmpname, "bought", 0);
dini_IntSet(tmpname, "secure", 0);
dini_IntSet(tmpname, "asecure", 0);
dini_IntSet(tmpname, "used", 0);
dini_IntSet(tmpname, "buybar", 0);
GetVehiclePos(i,t,u,o);
dini_IntSet(tmpname, "sx", floatround(t));
dini_IntSet(tmpname, "sy", floatround(u));
dini_IntSet(tmpname, "sz", floatround(o));
}
if(gVC != oldvehcount)
{
format(tmpname,sizeof(tmpname),"%d",i);
format(carname,sizeof(carname),"%s", VehicleName[gVehicleClass[i]-400][0]);
dini_Create(tmpname);
dini_Set(tmpname, "owner", "server");
dini_Set(tmpname, "carname", carname);
dini_IntSet(tmpname, "carcost", carcost[i]);
dini_IntSet(tmpname, "carlock", 0);
dini_IntSet(tmpname, "bought", 0);
dini_IntSet(tmpname, "secure", 0);
dini_IntSet(tmpname, "asecure", 0);
dini_IntSet(tmpname, "used", 0);
dini_IntSet(tmpname, "buybar", 0);
GetVehiclePos(i,t,u,o);
dini_IntSet(tmpname, "sx", floatround(t));
dini_IntSet(tmpname, "sy", floatround(u));
dini_IntSet(tmpname, "sz", floatround(o));
}
}
for(new p=0; p <= gVC; p++)
{
new filename[256];
format(filename, sizeof(filename), "%d", p);
if (dini_Exists(filename))
{
dini_IntSet(filename, "used", 0);
}
}
for(new tempb=1;tempb<=BIZ_AMOUNT;tempb++)
{
if(tempb >= 1 && tempb <=9)
{
propcost[tempb] = 14000000;
profit[tempb] = 7500;
}
if(tempb >= 10 && tempb <=13)
{
propcost[tempb] = 11000000;
profit[tempb] = 4750;
}
if(tempb >= 14 && tempb <=19)
{
propcost[tempb] = 11000;
profit[tempb] = 55;
}
if(tempb >= 20 && tempb <=24)
{
propcost[tempb] = 1200000;
profit[tempb] = 600;
}
if(tempb >= 25)
{
propcost[tempb] = 20000000;
profit[tempb] = 10000;
}
if(tempb >= 26)
{
propcost[tempb] = 18000000;
profit[tempb] = 8500;
}
if(tempb >= 27)
{
propcost[tempb] = 15000000;
profit[tempb] = 8000;
}
if(tempb >= 28 && tempb <=29)
{
propcost[tempb] = 2500000;
profit[tempb] = 800;
}
if(tempb >= 30 && tempb <=31)
{
propcost[tempb] = 850000;
profit[tempb] = 290;
}
if(tempb >= 32 && tempb <=33)
{
propcost[tempb] = 900000;
profit[tempb] = 330;
}
if(tempb >= 34 && tempb <=36)
{
propcost[tempb] = 500000;
profit[tempb] = 230;
}
if(tempb >= 37 && tempb <=39)
{
propcost[tempb] = 600000;
profit[tempb] = 250;
}
if(tempb >= 40 && tempb <=42)
{
propcost[tempb] = 700000;
profit[tempb] = 290;
}
if(tempb == 43)
{
propcost[tempb] = 1200000;
profit[tempb] = 690;
}
if(tempb == 44)
{
propcost[tempb] = 1100000;
profit[tempb] = 590;
}
if(tempb == 45)
{
propcost[tempb] = 650000;
profit[tempb] = 200;
}
if(tempb == 46)
{
propcost[tempb] = 800000;
profit[tempb] = 225;
}
if(tempb == 47)
{
propcost[tempb] = 1000000;
profit[tempb] = 490;
}
if(tempb >= 48 && tempb <=49)
{
propcost[tempb] = 25000;
profit[tempb] = 99;
}
if(tempb >= 50 && tempb <=53)
{
propcost[tempb] = 80000;
profit[tempb] = 175;
}
if(tempb >= 54 && tempb <=60)
{
propcost[tempb] = 50000;
profit[tempb] = 99;
}
format(tmpname,sizeof(tmpname),"BIZ%d",tempb);
if (!dini_Exists(tmpname))
{
dini_Create(tmpname);
dini_Set(tmpname, "owner", "server");
dini_IntSet(tmpname, "propcost", propcost[tempb]);
dini_IntSet(tmpname, "profit", profit[tempb]);
dini_IntSet(tmpname, "totalprofit", 0);
dini_IntSet(tmpname, "bought", 0);
dini_IntSet(tmpname, "idnumber", tempb);
dini_IntSet(tmpname, "buybar", 0);
}
//-----------------------------------Pickups------------------------------------
AddStaticPickup(1242, 15, 1198.6222,-2036.7010,69.0078); //Armor WHITE HOSE
AddStaticPickup(1242, 15, 2037.5424,1955.0793,12.0647); //Armor hotel2
AddStaticPickup(1242, 15, -1666.2980,1204.7188,7.2546); //Armor car dealer2
AddStaticPickup(1242, 15, 2216.9341,-1179.4139,25.8906); //Armor motel
AddStaticPickup(1242, 15, 1582.2346,-2433.3376,13.5547); //Armor airport2
AddStaticPickup(1242, 15, 915.7377,-1235.0343,17.2109); //Armor MOVIE
AddStaticPickup(1242, 15, -1111.8021,-1672.5598,76.3672); //Armor HIPPY
AddStaticPickup(1242, 15, 1296.5054,-786.7410,88.3125); //Armor ADMIN
AddStaticPickup(1242, 15, -534.7692,-178.1900,78.4047); //armor FOREST
AddStaticPickup(1242, 15, -2771.5168,-251.6141,7.1875); //armor hotel
AddStaticPickup(1242, 15, -1321.9531,2504.2705,89.5703); //armor hobo
AddStaticPickup(1242, 15, -2241.2661,2321.9829,7.5454); //armor secret
AddStaticPickup(1242, 15, -2720.7385,231.9487,4.3418); //armor at trans
AddStaticPickup(1242, 15, 2238.8762,2449.3284,11.0372); //armor at security cop
AddStaticPickup(1242, 15, -1844.8163,-1708.9067,41.1060); //armor at Rock Quarry
AddStaticPickup(1242, 15, -2230.1113,-1743.3027,480.8695); //armor at chilliad
AddStaticPickup(1242, 15, 2184.7224,-1203.6058,1049.8330); //armor at lombardi str
AddStaticPickup(1242, 15, -1954.3491,303.5424,35.4688); //armor at car dealer
AddStaticPickup(1242, 15, 2537.5513,-1663.5591,15.1492); //armor at grove str back right behind spwn
AddStaticPickup(1242, 15, 1331.1685,1257.4764,14.2731); //armor at airort
AddStaticPickup(1242, 15, 2293.2725,1435.4340,38.4735); //armor at driuft
AddStaticPickup(1242, 15, 2582.8208,-1717.3884,8.0025); //aromr rbed
AddStaticPickup(1242, 15, 1654.0404,-1658.1034,22.5156); //armor 3towers
AddStaticPickup(1242, 15, 2332.5977,-1064.6901,1049.0234); //armor pimp
AddStaticPickup(1242, 15, 688.0721,841.4696,-39.0077); //armor quarry1
AddStaticPickup(1242, 15, 538.1361,839.2096,-34.6727); //armor quar 2
AddStaticPickup(1242, 15, 545.5967,919.9224,-34.7484); //armor quar 3
AddStaticPickup(1242, 15, 623.2344,894.4736,-35.4231); //armor quar 4
AddStaticPickup(1242, 15, 2746.5503,-2453.7292,13.8623); //Armor military
AddStaticPickup(370, 15, -2291.5791,2318.0688,15.2117); //SECRET JETPACK
AddStaticPickup(371, 15, -2240.2351,-1747.3890,480.8622); //chilliad parachute
AddStaticPickup(657, 2, -2649.4902, 1383.0055, 7.1826); //Kool Spinning tree
AddStaticPickup(354, 2, -2649.4902, 1383.0055, 7.1826);//Flare in tree
AddStaticPickup(354, 2, -2649.4902, 1383.0055, 10.5802);//Flare in tree
AddStaticPickup(354, 2, -2649.4902, 1383.0055, 14.9802);//Flare in tree
AddStaticPickup(354, 2, -2649.4902, 1383.0055, 13.9802);//Flare in tree
}
return 1;
}
//============================Is Player Name Online=============================
public IsPlayerNameOnline(compname[])
{
new playername[MAX_PLAYER_NAME];
for(new i=0;i<=MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
GetPlayerName(i, playername, sizeof(playername));
if(strcmp(playername,compname,false) == 0)
{
return i;
}
}
}
return 100;
}
//=================================Biz Profit===================================
public profitup()
{
for(new tempa=1;tempa<=BIZ_AMOUNT;tempa++)
{
format(tmpname,sizeof(tmpname),"BIZ%d",tempa);
propowned[tempa] = dini_Int(tmpname, "bought");
if (propowned[tempa] == 1)
{
new tmp[256];
totalprofit[tempa] = dini_Int(tmpname, "totalprofit");
profit[tempa] = dini_Int(tmpname, "profit");
tmp[tempa] = profit[tempa]+totalprofit[tempa];
dini_IntSet(tmpname, "totalprofit", tmp[tempa]);
}
}
for(new i=0;i<=MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
new ownera[MAX_PLAYERS],playername[256];
GetPlayerName(i, playername, sizeof(playername));
ownera[i] = dini_Int(udb_encode(playername),"bizowned");
if(ownera[i] > 0)
{
SendClientMessage(i,COLOR_LIGHTBLUE,"Il profitto della tua propietà e stato aggiornato");
}
}
}
return 1;
}
//===========================Define AddStaticVehicle2===========================
public AddStaticVehicle2(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2)
{
if(gVC<=MAX_CARS)
{
gVC++;
gVehicleClass[gVC] = modelid;
AddStaticVehicle(modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2);
}
}
//==========================Selection Screen Stuff==============================
public OnPlayerRequestClass(playerid, classid)
//--------------------------Selection Screen Colors-----------------------------
{
if(classid == 0)
{
GameTextForPlayer(playerid, "~g~Famiglie di GROVE STREET", 2000, 5);
SetPlayerColor(playerid,COLOR_GREEN);
gTeam[playerid] = TEAM_WORKER;
}
else if(classid == 1)
{
GameTextForPlayer(playerid, "~g~Famiglie di GROVE STREET", 2000, 5);
SetPlayerColor(playerid,COLOR_RED);
gTeam[playerid] = TEAM_PIMP;
}
else if(classid == 2)
{
GameTextForPlayer(playerid, "~g~Famiglie di GROVE STREET", 2000, 5);
SetPlayerColor(playerid,COLOR_YELLOW);
gTeam[playerid] = TEAM_GOLFER;
}
else if(classid == 3)
{
GameTextForPlayer(playerid, "~y~Vagos di Los Antos", 2000, 5);
SetPlayerColor(playerid,COLOR_PINK);
gTeam[playerid] = TEAM_TRIAD;
}
else if(classid == 4)
{
GameTextForPlayer(playerid, "~y~Vagos di Los Antos", 2000, 5);
SetPlayerColor(playerid,COLOR_GREEN);
gTeam[playerid] = TEAM_ARMY;
}
else if(classid == 5)
{
GameTextForPlayer(playerid, "~y~Vagos di Los Antos", 2000, 5);
SetPlayerColor(playerid,COLOR_LIGHTBLUE);
gTeam[playerid] = TEAM_VALET;
}
else if(classid == 6)
{
GameTextForPlayer(playerid, "~r~Ballas", 2000, 5);
SetPlayerColor(playerid,COLOR_PURPLE);
gTeam[playerid] = TEAM_MEDIC;
}
else if(classid == 7)
{
GameTextForPlayer(playerid, "~r~Ballas", 2000, 5);
SetPlayerColor(playerid,COLOR_ORANGE);
gTeam[playerid] = TEAM_FBI;
}
else if(classid == 8)
{
GameTextForPlayer(playerid, "~r~Ballas", 2000, 5);
SetPlayerColor(playerid,COLOR_GREY);
gTeam[playerid] = TEAM_CHICKEN;
}
else if(classid == 9)
{
GameTextForPlayer(playerid, "~r~Cammorrista", 2000, 5);
SetPlayerColor(playerid,COLOR_SKIN);
gTeam[playerid] = TEAM_RICH;
}
else if(classid == 10)
{
GameTextForPlayer(playerid, "~r~Cammorrista", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKGREY);
gTeam[playerid] = TEAM_PILOT;
}
else if(classid == 11)
{
GameTextForPlayer(playerid, "~r~Cammorrista", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKRED);
gTeam[playerid] = TEAM_DANANG;
}
else if(classid == 12)
{
GameTextForPlayer(playerid, "~r~Cammorrista", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKRED);
gTeam[playerid] = TEAM_DANANG;
}
else if(classid == 13)
{
GameTextForPlayer(playerid, "~r~Cammorrista", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKRED);
gTeam[playerid] = TEAM_DANANG;
}
else if(classid == 14)
{
GameTextForPlayer(playerid, "~r~Cammorrista", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKRED);
gTeam[playerid] = TEAM_DANANG;
}
else if(classid == 15)
{
GameTextForPlayer(playerid, "~r~Sbirro", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKRED);
gTeam[playerid] = TEAM_DANANG;
}
else if(classid == 16)
{
GameTextForPlayer(playerid, "~r~Sbirro", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKRED);
gTeam[playerid] = TEAM_DANANG;
}
else if(classid == 17)
{
GameTextForPlayer(playerid, "~r~Sbirro", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKRED);
gTeam[playerid] = TEAM_DANANG;
}
else if(classid == 18)
{
GameTextForPlayer(playerid, "~r~Civile", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKRED);
gTeam[playerid] = TEAM_DANANG;
}
else if(classid == 19)
{
GameTextForPlayer(playerid, "~r~Civile", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKRED);
gTeam[playerid] = TEAM_DANANG;
}
else if(classid == 20)
{
GameTextForPlayer(playerid, "~r~Civile", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKRED);
gTeam[playerid] = TEAM_DANANG;
}
else if(classid == 21)
{
GameTextForPlayer(playerid, "~r~Civile", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKRED);
gTeam[playerid] = TEAM_DANANG;
}
else if(classid == 22)
{
GameTextForPlayer(playerid, "~r~Civile", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKRED);
gTeam[playerid] = TEAM_DANANG;
}
else if(classid == 23)
{
GameTextForPlayer(playerid, "~r~Civile", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKRED);
gTeam[playerid] = TEAM_DANANG;
}
else if(classid == 24)
{
GameTextForPlayer(playerid, "~r~Civile", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKRED);
gTeam[playerid] = TEAM_DANANG;
}
else if(classid == 25)
{
GameTextForPlayer(playerid, "~r~Civile", 2000, 5);
SetPlayerColor(playerid,COLOR_DARKRED);
gTeam[playerid] = TEAM_DANANG;
}
//---------------------Player Selection Screen Locations------------------------
//-------------------------------Worker
if(classid == 0)
{
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerPos(playerid, 1979.3451,1329.2415,10.0156);
SetPlayerCameraPos(playerid, 1973.2175,1329.5684,10.0156);
SetPlayerCameraLookAt(playerid, 1973.2175,1329.5684,10.0156);
return 1;
}
//-------------------------------Pimp
else if(classid ==1)
{
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerPos(playerid, 1979.3451,1329.2415,10.0156);
SetPlayerCameraPos(playerid, 1973.2175,1329.5684,10.0156);
SetPlayerCameraLookAt(playerid, 1973.2175,1329.5684,10.0156);
return 1;
}
//-------------------------------Golfer
else if(classid == 2)
{
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerPos(playerid, 1979.3451,1329.2415,10.0156);
SetPlayerCameraPos(playerid, 1973.2175,1329.5684,10.0156);
SetPlayerCameraLookAt(playerid, 1973.2175,1329.5684,10.0156);
return 1;
}
//-------------------------------Triad
else if(classid == 3)
{
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerPos(playerid, 1979.3451,1329.2415,10.0156);
SetPlayerCameraPos(playerid, 1973.2175,1329.5684,10.0156);
SetPlayerCameraLookAt(playerid, 1973.2175,1329.5684,10.0156);
return 1;
}
//-------------------------------Army
else if(classid == 4)
{
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerPos(playerid, 1979.3451,1329.2415,10.0156);
SetPlayerCameraPos(playerid, 1973.2175,1329.5684,10.0156);
SetPlayerCameraLookAt(playerid, 1973.2175,1329.5684,10.0156);
return 1;
}
//-------------------------------Valet
else if(classid == 5)
{
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerPos(playerid, 1979.3451,1329.2415,10.0156);
SetPlayerCameraPos(playerid, 1973.2175,1329.5684,10.0156);
SetPlayerCameraLookAt(playerid, 1973.2175,1329.5684,10.0156);
return 1;
}
//-------------------------------Medic
else if(classid == 6)
{
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerPos(playerid, 1979.3451,1329.2415,10.0156);
SetPlayerCameraPos(playerid, 1973.2175,1329.5684,10.0156);
SetPlayerCameraLookAt(playerid, 1973.2175,1329.5684,10.0156);
return 1;
}
//-------------------------------FBI
else if(classid == 7)
{
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerPos(playerid, 1979.3451,1329.2415,10.0156);
SetPlayerCameraPos(playerid, 1973.2175,1329.5684,10.0156);
SetPlayerCameraLookAt(playerid, 1973.2175,1329.5684,10.0156);
return 1;
}
//-----------------------------Chicken
else if(classid == 8)
{
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerPos(playerid, 1979.3451,1329.2415,10.0156);
SetPlayerCameraPos(playerid, 1973.2175,1329.5684,10.0156);
SetPlayerCameraLookAt(playerid, 1973.2175,1329.5684,10.0156);
return 1;
}
//-------------------------------Rich
else if(classid == 9)
{
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerPos(playerid, 1979.3451,1329.2415,10.0156);
SetPlayerCameraPos(playerid, 1973.2175,1329.5684,10.0156);
SetPlayerCameraLookAt(playerid, 1973.2175,1329.5684,10.0156);
return 1;
}
//-------------------------------Pilot
else if(classid == 10)
{
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerPos(playerid, 1979.3451,1329.2415,10.0156);
SetPlayerCameraPos(playerid, 1973.2175,1329.5684,10.0156);
SetPlayerCameraLookAt(playerid, 1973.2175,1329.5684,10.0156);
return 1;
}
//-------------------------------Da Nang
else if(classid == 11)
{
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerPos(playerid, 1979.3451,1329.2415,10.0156);
SetPlayerCameraPos(playerid, 1973.2175,1329.5684,10.0156);
SetPlayerCameraLookAt(playerid, 1973.2175,1329.5684,10.0156);
return 1;
}
return 1;
}
//================================Random Functions==============================
public SystemMsg(playerid,msg[])
{
if ((IsPlayerConnected(playerid))&&(strlen(msg)>0))
{
SendClientMessage(playerid,COLOR_SYSTEM,msg);
}
return 1;
}
stock PlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}
//==============================On Player Connect===============================
public OnPlayerConnect(playerid)
{
printf("OnPlayerConnect(%d)", playerid);
allowprofit[playerid] = 0;
speedo[playerid] = 1;
buyable[playerid] = 0;
bank[playerid]=0;
Calling[playerid] = -1;
Answered[playerid] = 0;
Callerid[playerid] = 0;
Spawned[playerid] = 0;
welcome[playerid] = 1;
moneyed[playerid] = 1;
setd[playerid] = 0;
PlayerInterior[playerid] = GetPlayerInterior(playerid);
server = dini_Get(FILE_SETTINGS, "servername");
new string[256];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "Benvenuto %s, sul server [AI]", playername);
SendClientMessage(playerid, COLOR_ORANGE, string);
GameTextForPlayer(playerid, " ~g~ Benvenuti nel Server~n~~n~~y~~n~~r~~n~Official [AI]",10000,1);
return 1;
}
//============================On Player Exit Vehicle============================
public OnPlayerExitVehicle(playerid)
{
used[playerid] = 0;
passenger[playerid] = 0;
return 1;
}
//=============================On Player Spawn==================================
public OnPlayerSpawn(playerid)
{
if(logged[playerid] == 1)
{
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
bank[playerid] = dini_Int(udb_encode(playername), "bank");
if(bank[playerid] > 20000)
{
amount[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW, "Hai $20000 nell bank account te ne regalo $10000, ringrazia.");
}
if(bank[playerid] < 20000)
{
amount[playerid] = 10000;
SendClientMessage(playerid,COLOR_YELLOW, "NN hai piu $20000 nell bank account te ne restano $10000 spawn.");
}
GivePlayerMoney(playerid,amount[playerid]);
}
if(welcome[playerid] == 1)
{
SendClientMessage(playerid,COLOR_YELLOW, "Se vuoi comprare veicoli,attività e altro allora REGISTRATI! fai /registrami [password]'");
SendClientMessage(playerid,COLOR_YELLOW, "Per entrare fai /entra [password]'");
SendClientMessage(playerid,COLOR_BRIGHTRED, "Avrete di nuovo i vostri soldi dopo essere entrati -.-!");
welcome[playerid] = 0;
}
GameTextForPlayer(playerid,"~y~Fatti forza e uccidi a tutti i team (avversari)", 3000, 5);
PlayerPlaySound(playerid,SOUND_OFF,-1421.1034,1488.5735,11.8084);
Spawned[playerid] = 1;
return 1;
}
//============================Anti-Team kill Script=============================
public OnPlayerDeath(playerid, killerid, reason)
{
new name[MAX_PLAYER_NAME];
new string[256];
new deathreason[20];
GameTextForPlayer(playerid,"~r~SEI MORTO",10000,2);
GetPlayerName(playerid, name, sizeof(name));
GetWeaponName(reason, deathreason, 20);
new pstring[256]; //player message
if (killerid == INVALID_PLAYER_ID)
{
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
if (reason == WEAPON_DROWN)
{
format(string, sizeof(string), "*** %s SANK LIKE A BRICK.", name);
}
else {
if (strlen(deathreason) > 0)
{
format(string, sizeof(string), "*** %s . (%s)", name, deathreason);
}
else {
format(string, sizeof(string), "*** %s .", name);
}
}
//SendClientMessageToAll(COLOR_RED, string);
}
else
{
new killer[MAX_PLAYER_NAME];
GetPlayerName(killerid, killer, sizeof(killer));
if (strlen(deathreason) > 0)
{
format(string, sizeof(string), "*** %s Ha ucciso %s. (%s)", killer, name, deathreason);
}
else {
format(string, sizeof(string), "*** %s Ha ucciso %s.", killer, name);
}
if(gTeam[playerid] == gTeam[killerid])
{
new warning[256];
format(warning, sizeof(warning), "Gran figlio di puttana ma che cazzo fai non vedi che e la tua squadra, che hai la cataratta????");
SendClientMessage(killerid, 0xFFFF00AA, warning);
RemovePlayerFromVehicle(killerid);
SetPlayerInterior(killerid,6);
SetPlayerPos(killerid, 265.4426, 79.16441, 1001.039);
ResetPlayerWeapons(killerid);
GivePlayerMoney(killerid, -2500);
SetPlayerScore(killerid, GetPlayerScore(killerid)-1);
}
else{
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
GivePlayerMoney(killerid, 5000);
new kstring[256]; //killer message
new pname[MAX_PLAYER_NAME]; //player name
GetPlayerName(playerid, pname, sizeof(pname));
format(kstring, sizeof(kstring), "~b~Hai ucciso a %s",pname);
GameTextForPlayer(killerid, kstring, 4000, 3);
new kname[MAX_PLAYER_NAME]; //killername
GetPlayerName(killerid, kname, sizeof(kname));
format(pstring, sizeof(pstring), "~r~Sei stato ucciso da %s",kname);
GameTextForPlayer(playerid, pstring, 4000, 3);
}
//if(IsPlayerInAnyVehicle(killerid)){
//new string2[256];
//format(string2, sizeof(string2), "%s had to use his car to kill so he had his weapons removed!",killer);
//SendClientMessageToAll(COLOR_RED, string2);
//ResetPlayerWeapons(killerid);
SendDeathMessage(killerid,playerid,reason);
SendClientMessageToAll(COLOR_RED, string);
Spawned[playerid] = 0;
moneyed[playerid] = 0;
}
return 1;
}
//===============================Random Functions===============================
public OnVehicleSpawn(vehicleid)
{
printf("OnVehicleSpawn(%d)", vehicleid);
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
new filename[256];
format(filename, sizeof(filename), "%d", vehicleid);
}
//=============================Player save system!==============================
public OnPlayerDisconnect(playerid)
{
new playername[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid, playername, sizeof(playername));
if (dini_Exists(udb_encode(playername)) && logged[playerid] == 1)
{
dini_IntSet(udb_encode(playername), "money", GetPlayerMoney(playerid));
dini_IntSet(udb_encode(playername), "bank", bank[playerid]);
dini_IntSet(udb_encode(playername), "vehicleresetcount", gVC);
PlayerInterior[playerid] = GetPlayerInterior(playerid);
if(PlayerInterior[playerid] == 0)
{
new Float:x, Float:y, Float:z;
new Float:a;
GetPlayerFacingAngle(playerid,a);
dini_IntSet(udb_encode(playername), "a", floatround(a));
GetPlayerPos(playerid,x,y,z);
dini_IntSet(udb_encode(playername), "x", floatround(x));
dini_IntSet(udb_encode(playername), "y", floatround(y));
dini_IntSet(udb_encode(playername), "z", floatround(z));
}
}
format(string, sizeof(string), "--- %s logged out.", playername);
printf(string);
logged[playerid] = 0;
return 1;
}
//============================Get Checkpoint Type===============================
public getCheckpointType(playerID)
{
return checkpointType[playerCheckpoint[playerID]];
}
//====================================Speedo====================================
public CheckSpeedo()
{
new string[256];
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
if(speedo[i] == 1 && aMessage[i] == 0 && Count[i] == 0)
{
new Float:x,Float:y,Float:z;
new Float:distance,value;
new filename[256];
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(i));
carname = dini_Get(filename, "carname");
GetPlayerPos(i, x, y, z);
distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePlayerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
value = floatround(distance * 11000);
format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~r~Veicolo: ~g~%s~n~~b~MpH: ~g~%d ~r~/ ~b~Km/H: ~g~%d",carname,floatround(value/2200),floatround(value/1400));
GameTextForPlayer(i,string,850,3);
SavePlayerPos[i][LastX] = x;
SavePlayerPos[i][LastY] = y;
SavePlayerPos[i][LastZ] = z;
}
if(speedo[i] == 2 && aMessage[i] == 0 && Count[i] == 0)
{
new Float:x,Float:y,Float:z;
new Float:distance,value;
new filename[256];
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(i));
carname = dini_Get(filename, "carname");
GetPlayerPos(i, x, y, z);
distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePlayerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
value = floatround(distance * 11000);
format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~r~Veicolo: ~g~%s~n~MpH: ~g~%d ~r~/ ~b~Km/H: ~g~%d",carname,floatround(value/2200),floatround(value/1400));
GameTextForPlayer(i,string,850,3);
SavePlayerPos[i][LastX] = x;
SavePlayerPos[i][LastY] = y;
SavePlayerPos[i][LastZ] = z;
}
}
}
return 1;
}
//==================================Count Timer=================================
public ctimer()
{
if (cseconds)
{
format(cstring,6,"~w~%d", cseconds-1);
GameTextForAll(cstring,1100,4);
SoundForAll(1056);
cseconds --;
if (!cseconds)
{
GameTextForAll("~r~GO GO GO!!!",2000,4);
SoundForAll(1057);
for (new i = 0; i < MAX_PLAYERS; i ++)
{
if (IsPlayerConnected(i)) SetTimer("resetcount",2000,0);
}
}
}
}
//=================================Reset Count==================================
public resetcount()
{
for (new i = 0; i < MAX_PLAYERS; i ++)
{
if (IsPlayerConnected(i)) Count[i] = 0;
}
}
//==================================Announcer===================================
public announcer()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && aMessage[i] == 1)
{
aMessage[i] = 0;
return 1;
}
}
return 1;
}
//==================================Team Chat===================================
dteamchatcmd(playerid,params[])
{
new team;
team = GetPlayerTeam(playerid);
new players = GetPlayers();
new playername[256];
GetPlayerName(playerid,playername,256);
new temptext[256];
new count;
for(count = 0;count <= players;count++)
{
if(IsPlayerConnected(count))
{
if(GetPlayerTeam(count) == team)
{
format(temptext,256,"[TEAM]%s: %s",playername,params);
SendClientMessage(count,COLOR_BLUE,temptext);
}
}
}
return true;
}
//=================================Count Sound==================================
SoundForAll(sound)
{
for (new i = 0, j = MAX_PLAYERS; i < j; i ++)
{
if (IsPlayerConnected(i)) PlayerPlaySound(i,sound,0.0,0.0,0.0);
}
}
//=================================Score Update=================================
public scoreupdate()
{
new CashScore;
new name[MAX_PLAYER_NAME];
//new string[256];
for(new i=0; i<MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
GetPlayerName(i, name, sizeof(name));
CashScore = GetPlayerMoney(i);
SetPlayerScore(i, CashScore);
if (CashScore > CashScoreOld)
{
CashScoreOld = CashScore;
}
}
}
}
//=================================Eject Public=================================
public eject()
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i) == 1)
{
if (IsPlayerInAnyVehicle(i) == 1)
{
if (GetPlayerVehicleID(i) == tmpcar2[i] && ejected[i] == 1)
{
new filename[256];
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(i));
carname = dini_Get(filename, "carname");
RemovePlayerFromVehicle(i);
SetPlayerPos(i,g,h,l);
ejected[i] = 0;
format(carmess,sizeof(carmess),"Il propetario di questo %s lo ha bloccato. Fatti una passeggiata perdente!!!", carname);
SendClientMessage(i, COLOR_BRIGHTRED, carmess);
}
}
}
}
}
//=================================Reset Message================================
public resetmessage()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && messaged[i] == 1)
{
messaged[i] = 0;
return 1;
}
}
return 1;
}
//===================================Reset Car==================================
public resetcar()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && reset[i] == 1)
{
reset[i] = 0;
new playername[MAX_PLAYER_NAME];
new filename[256];
GetPlayerName(i, playername, MAX_PLAYER_NAME);
tmpcar[i] = dini_Int(udb_encode(playername), "carowned");
format(filename, sizeof(filename), "%d", tmpcar[i]);
dini_IntSet(filename, "used", 0);
carused[i] = dini_Int(filename, "used");
if(carused[i] == 0)
{
GetPlayerName(i, playername, MAX_PLAYER_NAME);
new Float:a;
GetPlayerFacingAngle(i, a);
t = dini_Int(filename, "sx");
u = dini_Int(filename, "sy");
o = dini_Int(filename, "sz");
t += (3 * floatsin(-a, degrees));
u += (3 * floatcos(-a, degrees));
SetPlayerPos(i,t,u,o+3);
carname = dini_Get(filename, "carname");
format(carmess,sizeof(carmess),"IL tuo %s è stato resettato e sei stato teletrasportato là.",carname);
SendClientMessage(i, COLOR_ORANGE, carmess);
return 1;
}
}
}
return 1;
}
//===========================On Player State Change=============================
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new filename[256];
if(newstate == PLAYER_STATE_DRIVER)
{
new string[256];
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
carname = dini_Get(filename, "carname");
new val1[256];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
val1 = dini_Get(filename, "owner");
secure[playerid] = dini_Int(filename, "secure");
admined[playerid] = dini_Int(filename, "asecure");
if(admined[playerid] == 1)
{
if(PlayerInfo[playerid][pAdmin] > 0)
{
format(carmess,sizeof(carmess),"Questo %s è impostato per uso dagli admin. Chi nn è admin verrà espulso.",carname);
SendClientMessage(playerid,COLOR_ORANGE,carmess);
used[playerid] = 1;
return 1;
}
GetPlayerPos(playerid,ta,tb,tc);
SetPlayerPos(playerid,ta,tb,tc+5);
RemovePlayerFromVehicle(playerid);
format(string, sizeof(string), "Questo %s è stato regolato per permettere il controllo di admin/moderator soltanto e siete proibiti per usarlo.",carname);
SendClientMessage(playerid, COLOR_ORANGE, string);
return 1;
}
if(admined[playerid] == 2)
{
if(PlayerInfo[playerid][pAdmin] > 0)
{
format(carmess,sizeof(carmess),"Questo %s attualmente è regolato per uso di admin soltanto. Ucciderà chiunque che non sia i admin.",carname);
SendClientMessage(playerid,COLOR_ORANGE,carmess);
used[playerid] = 1;
return 1;
}
RemovePlayerFromVehicle(playerid);
SetPlayerHealth(playerid, -999);
format(string, sizeof(string), "La gestione dell'assistente ha regolato questo %s all'uccisione di chiunque provi di guidarlo... perdente R.I.P!",carname);
SendClientMessage(playerid, COLOR_ORANGE, string);
format(string, sizeof(string), "%s appena ha provato a rubare %s è stato ucciso dal sistema di di sicurezza... R.I.P",playername,carname);
SendClientMessageToAll(COLOR_ORANGE, string);
return 1;
}
if(secure[playerid] == 0)
{
if (strcmp(val1,playername,false) == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "Il sistema di sicurezza del tuo veicolo è disattivato.");
used[playerid] = 1;
return 1;
}
}
if(secure[playerid] == 1)
{
if (strcmp(val1,playername,false) == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "Il tuo sistema di sicurezza è impostato per cacciare gli intrusi.");
used[playerid] = 1;
return 1;
}
if(PlayerInfo[playerid][pAdmin] > 1)
{
format(string, sizeof(string), "Il proprietario di questo %s (%s), ha fissato questo veicolo ma come Livello 2 ADMIN puoi ancora usarlo.",carname, val1);
SendClientMessage(playerid, COLOR_ORANGE, string);
return 1;
}
GetPlayerPos(playerid,ta,tb,tc);
SetPlayerPos(playerid,ta,tb,tc+5);
RemovePlayerFromVehicle(playerid);
format(string, sizeof(string), "Il proprietario di questo %s (%s), ha fissato questo veicolo e siete proibiti di usarlo.", carname, val1);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
return 1;
}
if(secure[playerid] == 2)
{
if (strcmp(val1,playername,false) == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "Il tuo sistema di sicurezza è impostato per uccidere gli intrusi.lol!!!");
used[playerid] = 1;
return 1;
}
if(PlayerInfo[playerid][pAdmin] > 1)
{
format(string, sizeof(string), "Il proprietario di questo %s (%s), ha fissato questo veicolo ma come Livello 2 ADMIN puoi ancora usarlo.", carname, val1);
SendClientMessage(playerid, COLOR_ORANGE, string);
return 1;
}
RemovePlayerFromVehicle(playerid);
SetPlayerHealth(playerid, -999);
format(string, sizeof(string), "Il proprietario di questo %s (%s), ha regolato questo veicolo all'uccisione di chiunque provi di guidarlo... perdente R.I.P!",carname, val1);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
format(string, sizeof(string), "%s appena ha provato di rubare %s di %s ed è stato ucciso dal sistema di sicurezza... R.I.P la prossima volta guarda di chi è la auto prima di prenderla testa di cazzo!",playername,val1,carname);
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
return 1;
}
used[playerid] = 1;
}
return 1;
}
//===================================Commands===================================
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256],tmp[256];
new idx;
new string[256];
new playername[MAX_PLAYER_NAME];
new tmp2[256];
new moneys[MAX_PLAYERS];
new giveplayerid;
new giveplayer[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
new playermoney[MAX_PLAYERS];
new level[MAX_PLAYERS];
cmd = strtok(cmdtext, idx);
//------------------------------------telep------------------------------------
//---------------------------------Login System---------------------------------
if(strcmp(cmd, "/entra", true) == 0)
{
if(Spawned[playerid] == 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Fai /entra o /registrami");
return 1;
}
if(logged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Sei già loggato stupido");
return 1;
}
tmp = strtok(cmdtext, idx);
GetPlayerName(playerid, playername, sizeof(playername));
if(!strlen(tmp))
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USO: /entra [password]");
else
{
if (dini_Exists(udb_encode(playername)))
{
tmp2 = dini_Get(udb_encode(playername), "password");
if (udb_hash(tmp) != strval(tmp2))
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Parola d'accesso errata.");
}
else {
logged[playerid] = 1;
dini_Set(udb_encode(playername),"pass",tmp);
new tmp4[256];
new Float:x, Float:y, Float:z;
new Float:a;
playercount[playerid] = dini_Int(udb_encode(playername), "vehicleresetcount");
if(playercount[playerid] != gVC)
{
dini_IntSet(udb_encode(playername), "carowned", 0);
dini_IntSet(udb_encode(playername), "car", 0);
dini_IntSet(udb_encode(playername), "notified", 1);
SendClientMessage(playerid, COLOR_BRIGHTRED, "I veicoli del server sono stati resettati e quindi portati al loro posto non lo capisci imbecille?????");
}
x = dini_Int(udb_encode(playername), "x");
y = dini_Int(udb_encode(playername), "y");
z = dini_Int(udb_encode(playername), "z");
a = dini_Int(udb_encode(playername), "a");
carowned[playerid] = dini_Int(udb_encode(playername), "carowned");
moneys[playerid] = dini_Int(udb_encode(playername), "money");
if(moneys[playerid] < 10000)
{
bank[playerid] = dini_Int(udb_encode(playername), "bank");
if(bank[playerid] > 20000)
{
SendClientMessage(playerid,COLOR_YELLOW, "Tu hai $20000 in bank account se muori avrai tolti $10000.");
}
if(bank[playerid] < 20000)
{
moneys[playerid] = 10000;
SendClientMessage(playerid,COLOR_YELLOW, "Tu nn hai $20000 in bank account,ma hai $10000 in meno.");
}
GivePlayerMoney(playerid,moneys[playerid]);
}
if(moneys[playerid] >= 10000)
{
GivePlayerMoney(playerid,moneys[playerid]);
}
tmp4 = dini_Get(udb_encode(playername), "bank");
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(playername), "level");
bank[playerid] = strval(tmp4);
SetPlayerPos(playerid,x,y,z);
SetPlayerFacingAngle(playerid,a);
SendClientMessage(playerid, COLOR_GREEN, "Ora siete entrati e siete stati ristabiliti alla vostra ultima posizione conosciuta.");
SendClientMessage(playerid, COLOR_GREEN, "Soldi,posizione e auto verranno salvate ogni volta che uscirete dal gioko magnifiko!");
biznote[playerid] = dini_Int(udb_encode(playername), "bizsold");
carnote[playerid] = dini_Int(udb_encode(playername), "carsold");
if(biznote[playerid] == 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "NOTIZIA SHOCK!! il vostro commercio è stato ripristinato recentemente da un admin. I soldi dalla vendita sono stati trasferiti nel vostro cliente della banca!");
dini_IntSet(udb_encode(playername), "bizsold", 0);
}
if(carnote[playerid] == 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "NOTIZIA SHOCK!! il vostro veicolo è stato ripristinato recentemente da un admin. I soldi dalla vendita sono stati trasferiti nel vostro cliente della banca!");
dini_IntSet(udb_encode(playername), "carsold", 0);
}
}
}
else {
format(string, sizeof(string), "Questo account %s, nn esiste su questo server. Fai /registrami [password] per creare un account.", playername);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
}
return 1;
}
//------------------------------skroad------------------------------------------
//------------------------------Registration System-----------------------------
if(strcmp(cmd, "/registrami", true) == 0)
{
if(Spawned[playerid] == 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi usare /entra o /registrami");
return 1;
}
tmp = strtok(cmdtext, idx);
GetPlayerName(playerid, playername, sizeof(playername));
if(20 < strlen(tmp) || strlen(tmp) < 5)
{
SendClientMessage(playerid, COLOR_YELLOW, "devi usare una password da 5-20 caratteri.");
return 1;
}
if(!strlen(tmp))
SendClientMessage(playerid, COLOR_YELLOW, "USO: /registrami [password]");
else {
if (!dini_Exists(udb_encode(playername)))
{
dini_Create(udb_encode(playername));
dini_IntSet(udb_encode(playername), "password", udb_hash(tmp));
dini_Set(udb_encode(playername),"pass",tmp);
new Float:x, Float:y, Float:z;
new Float:a;
GetPlayerFacingAngle(playerid,a);
dini_IntSet(udb_encode(playername), "a", floatround(a));
GetPlayerPos(playerid,x,y,z);
dini_IntSet(udb_encode(playername), "x", floatround(x));
dini_IntSet(udb_encode(playername), "y", floatround(y));
dini_IntSet(udb_encode(playername), "z", floatround(z));
dini_IntSet(udb_encode(playername), "carowned", 0);
dini_IntSet(udb_encode(playername), "car", 0);
dini_IntSet(udb_encode(playername), "level", 0);
format(string, sizeof(string), "--- %s (id: %d) hai creato un account. Password: %s.", playername, playerid, tmp);
printf(string);
format(string, sizeof(string), "Account %s creato! con la password: %s.", playername, tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
else {
format(string, sizeof(string), "%s sei già registrato.", playername,tmp);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
}
return 1;
}
//--------------------------------Change Password-------------------------------
if(strcmp(cmd, "/setpass", true) == 0)
{
tmp = dini_Get(FILE_SETTINGS, "register");
if (strval(tmp) == 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Non sei reggistrato nel server Idiota!!!!! -.-!");
return 1;
}
tmp = strtok(cmdtext, idx);
GetPlayerName(playerid, playername, sizeof(playername));
if(20 < strlen(tmp) || strlen(tmp) < 5)
{
SendClientMessage(playerid, COLOR_YELLOW, "la password deve essere lunga almeno da 5-20 caratteri -.-.");
return 1;
}
if(!strlen(tmp))
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /setpass [password]");
else {
if (dini_Exists(udb_encode(playername)))
{
if (logged[playerid] == 1)
{
dini_Set(udb_encode(playername),"pass",tmp);
dini_IntSet(udb_encode(playername), "password", udb_hash(tmp));
format(string, sizeof(string), "--- %s (id: %d) hai cambiato password in %s.", playername, playerid, tmp);
printf(string);
format(string, sizeof(string), "password cambiata in %s, adesso entra di nuovp.", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
else SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi essere loggato epr cambiare password cretino-.-.");
}
else {
format(string, sizeof(string), "%s non esiste questo account -.-.", playername);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
}
return 1;
}
//---------------------------------Bank System----------------------------------
if(strcmp(cmd, "/deposit", true) == 0)
{
if(IsPlayerInCheckpoint(playerid) == 0 || getCheckpointType(playerid) != CP_BANK && getCheckpointType(playerid) != CP_BANK_2 && getCheckpointType(playerid) != CP_BANK_3)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Dovete essere ad una zona della banca per usare questo comando stupidi!!!.");
return 1;
}
new tmp8[256];
tmp8 = strtok(cmdtext, idx);
if(!strlen(tmp8))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USO: /deposit [amount]");
return 1;
}
moneys[playerid] = strval(tmp8);
if(moneys[playerid] < 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Ma sei poverello??? Devi depositare un importo più notevolmente in di 0$ !");
return 1;
}
if(GetPlayerMoney(playerid) < moneys[playerid])
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "NN hai soldi per quello sei povero che ci vuoi far!!!");
return 1;
}
GivePlayerMoney(playerid, 0-moneys[playerid]);
bank[playerid] = bank[playerid]+moneys[playerid];
format(string, sizeof(string), "Tu hai depositato $%d, il tuo conto corrente ora è $%d.", moneys[playerid], bank[playerid]);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
//------------------------------Withdraw from Bank------------------------------
if(strcmp(cmd, "/withdraw", true) == 0)
{
if(IsPlayerInCheckpoint(playerid) == 0 || getCheckpointType(playerid) != CP_BANK && getCheckpointType(playerid) != CP_BANK_2 && getCheckpointType(playerid) != CP_BANK_3)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Devi essere nei pressi di una banca per utilizzare il comando testa di cazzo.");
return 1;
}
new tmp9[256];
tmp9 = strtok(cmdtext, idx);
if(!strlen(tmp9))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USO: /withdraw [amount]");
return 1;
}
moneys[playerid] = strval(tmp9);
if(moneys[playerid] < 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Sei poverello??? devi depositare un importo più di 0$!!!");
return 1;
}
if(moneys[playerid] > bank[playerid])
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "NN hai soldi per quello sei poverello cosa ci vuoi far!!!");
return 1;
}
GivePlayerMoney(playerid, moneys[playerid]);
bank[playerid] = bank[playerid]-moneys[playerid];
format(string, sizeof(string), "Tu hai preso $%d dal tuo conto corrente, e hai $%d.", moneys[playerid], bank[playerid]);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
//-----------------------------------Balance------------------------------------
if(strcmp(cmd, "/balance", true) == 0)
{
if(IsPlayerInCheckpoint(playerid) == 0 || getCheckpointType(playerid) != CP_BANK && getCheckpointType(playerid) != CP_BANK_2 && getCheckpointType(playerid) != CP_BANK_3)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Devi essere nei pressi di una banca testa di cazzo.");
return 1;
}
format(string, sizeof(string), "Tu hai $%d in banca.", bank[playerid]);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
//----------------------------------Give Cash-----------------------------------
if(strcmp(cmd, "/givecash", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /givecash [playerid] [amount]");
return 1;
}
giveplayerid = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /givecash [playerid] [amount]");
return 1;
}
moneys[playerid] = strval(tmp);
if (IsPlayerConnected(giveplayerid))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
playermoney[playerid] = GetPlayerMoney(playerid);
if (moneys[playerid] > 0 && playermoney[playerid] >= moneys[playerid])
{
GivePlayerMoney(playerid, (0 - moneys[playerid]));
GivePlayerMoney(giveplayerid, moneys[playerid]);
format(string, sizeof(string), "ha inviato %s (id: %d), $%d.", giveplayer,giveplayerid, moneys[playerid]);
SendClientMessage(playerid, COLOR_GREEN, string);
format(string, sizeof(string), "hai ricevuto $%d da %s (id: %d).", moneys[playerid], sendername, playerid);
SendClientMessage(giveplayerid, COLOR_GREEN, string);
printf("%s(playerid:%d) sta trasferendo %d a %s(playerid:%d)",sendername, playerid, moneys[playerid], giveplayer, giveplayerid);
}
else {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Impossibile effettuare sta transizione .");
}
}
else {
format(string, sizeof(string), "ID:%d non sei attivo come player -.-.", giveplayerid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
return 1;
}
//--------------------------------Set Admin-------------------------------------
if(strcmp(cmd, "/setadmin", true) == 0)
{
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /setadmin [playerid] [level] -=(0 = no admin/1 = min admin/2 = full admin)=-");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /setadmin [playerid] [level] -=(0 = no admin/1 = min admin/2 = full admin)=-");
return 1;
}
if(logged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use this command!");
return 1;
}
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
if (PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have permission to use this command!");
return 1;
}
level[playerid] = strval(tmp);
if(level[playerid] < 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Invalid Admin Level -=(0 = no admin/1 = min admin/2 = full admin)=-");
return 1;
}
if(level[playerid] > 2)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Invalid Admin Level -=(0 = no admin/1 = min admin/2 = full admin)=-");
return 1;
}
if(level[playerid] == PlayerInfo[giveplayerid][pAdmin])
{
format(string, sizeof(string), "That player already has level %d admin privelages.", level[playerid]);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
return 1;
}
if (IsPlayerConnected(giveplayerid))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
dini_IntSet(udb_encode(giveplayer), "level", level[playerid]);
format(string, sizeof(string), "Admin/Moderator %s (id: %d), gave %s (id: %d) level %d admin powers.",sendername,playerid,giveplayer,giveplayerid,level[playerid]);
SendClientMessageToAll(COLOR_ORANGE, string);
format(string, sizeof(string), "You have given %s (id: %d), level %d admin powers.", giveplayer,giveplayerid, level[playerid]);
SendClientMessage(playerid, COLOR_ORANGE, string);
format(string, sizeof(string), "You were made a level %d admin by Admin/Moderator %s (id: %d).", level[playerid], sendername, playerid);
SendClientMessage(giveplayerid, COLOR_ORANGE, string);
PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
}
else
{
format(string, sizeof(string), "ID:%d is not an active player ID number.", giveplayerid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
return 1;
}
//-------------------------------Admin Tele-------------------------------------
if(strcmp(cmd, "/atele", true) == 0)
{
new telename[MAX_PLAYER_NAME];
new teleid;
new Float:pX, Float:pY, Float:pZ;
tmp = strtok(cmdtext, idx);
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
if(logged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use this command!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] == 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have permission to use that command!");
return 1;
}
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /atele [teleportee id] [destination id]");
return 1;
}
giveplayerid = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /atele [teleportee id] [destination id]");
return 1;
}
teleid = strval(tmp);
if (IsPlayerConnected(giveplayerid) && IsPlayerConnected(teleid))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(teleid, telename, sizeof(telename));
GetPlayerPos(teleid, pX,pY,pZ);
SetPlayerPos(giveplayerid, pX,pY,pZ);
format(string, sizeof(string), "Admin/Moderator %s (id: %d) teleported %s (id: %d) to %s (id: %d)", sendername,playerid,giveplayer,giveplayerid,telename,teleid);
SendClientMessageToAll(COLOR_ORANGE, string);
format(string, sizeof(string), "You teleported %s (id: %d) to %s (id: %d).", giveplayer,giveplayerid,telename,teleid);
SendClientMessage(playerid, COLOR_ORANGE, string);
format(string, sizeof(string), "You have been teleported to %s (id: %d) by Admin/Moderator %s (id: %d).", telename,teleid,sendername,playerid);
SendClientMessage(giveplayerid, COLOR_ORANGE, string);
}
if (!IsPlayerConnected(giveplayerid))
{
format(string, sizeof(string), "ID:%d is not an active player ID number.", giveplayerid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
if (!IsPlayerConnected(teleid))
{
format(string, sizeof(string), "ID:%d is not an active player ID number.", teleid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
return 1;
}
//--------------------------------Admin Ban-------------------------------------
if(strcmp(cmd, "/aban", true) == 0)
{
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /aban [playerid]");
return 1;
}
if(logged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use this command!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 2)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have permission to use that command!");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] > 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot ban a fellow admin or moderator!");
return 1;
}
if (IsPlayerConnected(giveplayerid))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Admin/Moderator %s (id: %d) banned %s (id: %d).", sendername,playerid,giveplayer,giveplayerid);
SendClientMessageToAll(COLOR_BRIGHTRED,string);
format(string, sizeof(string), "%s (id: %d) has been banned.", giveplayer,giveplayerid);
SendClientMessage(playerid, COLOR_GREEN, string);
format(string, sizeof(string), "You were banned by Admin/Moderator %s (id: %d).", sendername,playerid);
SendClientMessage(giveplayerid, COLOR_BRIGHTRED, string);
Ban(giveplayerid);
}
else {
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
return 1;
}
//-----------------------------------Count Down---------------------------------
if(strcmp(cmd, "/count", true) == 0)
{
new seconds;
tmp = strtok(cmdtext, idx);
seconds = strval(tmp);
if (!seconds)
SendClientMessage(playerid, COLOR_BRIGHTRED, "Testa di cazzo devi inserire i secondi per il count down.");
if (seconds > 20)
{
SendClientMessage(giveplayerid, COLOR_BRIGHTRED, "La durata del count down puo essere massimo da 1-20");
return 1;
}
else if (cseconds)
SendClientMessage(playerid, COLOR_BRIGHTRED, "Count down e stato attivato!!! -.-.");
else
{
format(cstring,40,"il count down e di %d seconds.",seconds);
SendClientMessage(playerid,COLOR_LIGHTBLUE, cstring);
cseconds = seconds+1;
Count[playerid] = 1;
}
return 1;
}
//----------------------------Admin Stats Search--------------------------------
if(strcmp(cmd, "/astats", true) == 0)
{
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
new vehicle[MAX_PLAYERS], business[MAX_PLAYERS];
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /astats [playerid]");
return 1;
}
if(logged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use this command!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 2)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Only Level 2 Admins have permission to use that command!");
return 1;
}
if (IsPlayerConnected(giveplayerid))
{
new infostring[256];
new Float:hp;
GetPlayerHealth(giveplayerid, hp);
format(infostring,sizeof(infostring),"-------<:: Player Information - %s ::>-------",giveplayer);
SendClientMessage(playerid, COLOR_ORANGE,infostring);
new log[256];
if(logged[giveplayerid] == 0)
{
format(log,sizeof(log),"Not logged in");
if(!dini_Exists(udb_encode(giveplayer)))
{
format(infostring,sizeof(infostring),"General Info - Name: %s / Health: %d (Not yet registered)",giveplayer, floatround(hp));
SendClientMessage(playerid, COLOR_GREEN,infostring);
format(infostring,sizeof(infostring),"Money Info - Wallet: $%d", GetPlayerMoney(giveplayerid));
SendClientMessage(playerid, COLOR_GREEN,infostring);
format(infostring,sizeof(infostring),"Vehicle Info - N/A");
SendClientMessage(playerid, COLOR_GREEN,infostring);
format(infostring,sizeof(infostring),"Business Info - N/A");
SendClientMessage(playerid, COLOR_GREEN,infostring);
return 1;
}
}
if(logged[giveplayerid] == 1)
{
format(log,sizeof(log),"Logged in");
}
PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
vehicle[giveplayerid] = dini_Int(udb_encode(giveplayer), "carowned");
business[giveplayerid] = dini_Int(udb_encode(giveplayer), "bizowned");
password = dini_Get(udb_encode(giveplayer),"pass");
format(infostring,sizeof(infostring),"General Info - Name: %s / Level: %d / Health: %d / Password: %s / Status: %s", giveplayer, PlayerInfo[giveplayerid][pAdmin], floatround(hp), password, log);
SendClientMessage(playerid, COLOR_GREEN,infostring);
format(infostring,sizeof(infostring),"Money Info - Wallet: $%d / Bank: $%d", GetPlayerMoney(giveplayerid), bank[giveplayerid]);
SendClientMessage(playerid, COLOR_GREEN,infostring);
if(vehicle[giveplayerid] > 0)
{
new filename[256],cost[MAX_PLAYERS],securelvl[MAX_PLAYERS],asecurelvl[MAX_PLAYERS];
new secmess[256],asecmess[256];
format(filename,sizeof(filename),"%d",vehicle[giveplayerid]);
carname = dini_Get(filename, "carname");
cost[giveplayerid] = dini_Int(filename, "carcost");
securelvl[giveplayerid] = dini_Int(filename, "secure");
asecurelvl[giveplayerid] = dini_Int(filename, "asecure");
if(securelvl[giveplayerid] == 0)
{
format(secmess,sizeof(secmess),"None");
}
if(securelvl[giveplayerid] == 1)
{
format(secmess,sizeof(secmess),"Eject");
}
if(securelvl[giveplayerid] == 2)
{
format(secmess,sizeof(secmess),"Lethal");
}
if(asecurelvl[giveplayerid] == 0)
{
format(asecmess,sizeof(asecmess),"None");
}
if(asecurelvl[giveplayerid] == 1)
{
format(asecmess,sizeof(asecmess),"Eject");
}
if(asecurelvl[giveplayerid] == 2)
{
format(asecmess,sizeof(asecmess),"Lethal");
}
format(infostring,sizeof(infostring),"Vehicle Info - Model: %s (ID:%d) / Cost: $%d / Security: %s / Admin security: %s", carname,vehicle[giveplayerid],cost[giveplayerid],secmess,asecmess);
SendClientMessage(playerid, COLOR_GREEN,infostring);
}
if(vehicle[giveplayerid] == 0)
{
SendClientMessage(playerid, COLOR_GREEN,"Vehicle Info - No owned vehicle yet");
}
if(business[giveplayerid] > 0)
{
new filename[256],bcost[MAX_PLAYERS],earnings[MAX_PLAYERS];
format(filename,sizeof(filename),"BIZ%d", business[giveplayerid]);
bcost[giveplayerid] = dini_Int(filename,"propcost");
earnings[giveplayerid] = dini_Int(filename,"profit");
format(infostring,sizeof(infostring),"Business Info - Name: %s / Cost: $%d / Profit level: $%d", filename,bcost[giveplayerid],earnings[giveplayerid]);
SendClientMessage(playerid, COLOR_GREEN,infostring);
}
if(business[giveplayerid] == 0)
{
SendClientMessage(playerid, COLOR_GREEN,"Business Info - No owned business yet");
}
return 1;
}
else {
format(string, sizeof(string), "ID:%d is not an active player ID number.", giveplayerid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
return 1;
}
//--------------------------------Admin Kick------------------------------------
if(strcmp(cmd, "/akick", true) == 0)
{
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /akick [playerid]");
return 1;
}
if(logged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use this command!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have permission to use that command!");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] > 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot kick a fellow admin or moderator!");
return 1;
}
if (IsPlayerConnected(giveplayerid))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Admin/Moderator %s (id: %d) kicked %s (id: %d).", sendername,playerid,giveplayer,giveplayerid);
SendClientMessageToAll(COLOR_BRIGHTRED,string);
format(string, sizeof(string), "%s (id: %d) has been kicked.", giveplayer,giveplayerid);
SendClientMessage(playerid, COLOR_GREEN, string);
format(string, sizeof(string), "You were kicked by Admin/Moderator %s (id: %d).", sendername,playerid);
SendClientMessage(giveplayerid, COLOR_BRIGHTRED, string);
Kick(giveplayerid);
}
else {
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
return 1;
}
//--------------------------------Admin Jail------------------------------------
if(strcmp(cmd, "/ajail", true) == 0)
{
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /ajail [playerid]");
return 1;
}
if(logged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use this command!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have permission to use that command!");
return 1;
}
if(PlayerInfo[giveplayerid][pJailedby] == 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "That player is already in jail!");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] > 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot jail a fellow admin or moderator!");
return 1;
}
if (IsPlayerConnected(giveplayerid))
{
PlayerInfo[giveplayerid][pJailedby] = 1;
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
SetPlayerInterior(giveplayerid,6);
TogglePlayerControllable(giveplayerid,0);
SetPlayerPos(giveplayerid,265.1273,77.6823,1001.0391);
SetPlayerFacingAngle(playerid,271.3259);
format(string, sizeof(string), "Admin/Moderator %s (id: %d) jailed %s (id: %d).", sendername,playerid,giveplayer,giveplayerid);
SendClientMessageToAll(COLOR_ORANGE,string);
format(string, sizeof(string), "%s (id: %d) has been jailed.", giveplayer,giveplayerid);
SendClientMessage(playerid, COLOR_ORANGE, string);
format(string, sizeof(string), "You were jailed by Admin/Moderator %s (id: %d).", sendername,playerid);
SendClientMessage(giveplayerid, COLOR_ORANGE, string);
}
else {
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
return 1;
}
//-------------------------------Admin UnJail-----------------------------------
if(strcmp(cmd, "/aunjail", true) == 0)
{
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /aunjail [playerid]");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have permission to use that command!");
return 1;
}
if(PlayerInfo[giveplayerid][pJailedby] == 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "That player is not in jail!");
return 1;
}
if (IsPlayerConnected(giveplayerid))
{
if(IsPlayerConnected(giveplayerid))
{
PlayerInfo[giveplayerid][pJailedby] = 0;
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
SetPlayerInterior(giveplayerid,0);
TogglePlayerControllable(giveplayerid,1);
SetPlayerPos(giveplayerid,2283.2024,2424.1245,10.8203);
format(string, sizeof(string), "Admin/Moderator %s (id: %d) released %s (id: %d) from jail.", sendername,playerid,giveplayer,giveplayerid);
SendClientMessageToAll(COLOR_ORANGE, string);
format(string, sizeof(string), "%s (id: %d) has been released from jail.", giveplayer,giveplayerid);
SendClientMessage(playerid, COLOR_ORANGE, string);
format(string, sizeof(string), "You were released from jail by Admin/Moderator %s (id: %d).", sendername,playerid);
SendClientMessage(giveplayerid, COLOR_ORANGE, string);
}
else {
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
}
return 1;
}
//-------------------------------Admin Freeze-----------------------------------
if(strcmp(cmd, "/afreeze", true) == 0)
{
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
if(logged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use this command!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have permission to use that command!");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] > 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot freeze a fellow admin or moderator!");
return 1;
}
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /afreeze [playerid]");
return 1;
}
if (IsPlayerConnected(giveplayerid))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
TogglePlayerControllable(giveplayerid, 0);
frozen[playerid] = 1;
format(string, sizeof(string), "Admin/Moderator %s (id: %d) froze %s (id: %d).", sendername,playerid,giveplayer,giveplayerid);
SendClientMessageToAll(COLOR_ORANGE, string);
format(string, sizeof(string), "%s (id: %d) has been frozen.", giveplayer,giveplayerid);
SendClientMessage(playerid, COLOR_ORANGE, string);
format(string, sizeof(string), "You were frozen by Admin/Moderator %s (id: %d).", sendername,playerid);
SendClientMessage(giveplayerid, COLOR_ORANGE, string);
}
else {
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
return 1;
}
//------------------------------Admin UnFreeze----------------------------------
if(strcmp(cmd, "/aunfreeze", true) == 0)
{
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
if(logged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use this command!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have permission to use that command!");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] > 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot freeze a fellow admin or moderator!");
return 1;
}
if(frozen[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "That player has not been frozen!");
return 1;
}
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /aunfreeze [playerid]");
return 1;
}
if (IsPlayerConnected(giveplayerid)) {
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
TogglePlayerControllable(giveplayerid, 1);
frozen[playerid] = 0;
format(string, sizeof(string), "Admin/Moderator %s (id: %d) unfroze %s (id: %d).", sendername,playerid,giveplayer,giveplayerid);
SendClientMessageToAll(COLOR_ORANGE, string);
format(string, sizeof(string), "%s (id: %d) has been unfrozen.", giveplayer,giveplayerid);
SendClientMessage(playerid, COLOR_ORANGE, string);
format(string, sizeof(string), "You were unfrozen by Admin/Moderator %s (id: %d).", sendername,playerid);
SendClientMessage(giveplayerid, COLOR_ORANGE, string);
}
else {
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
return 1;
}
//----------------------------Admin Give Money----------------------------------
if(strcmp(cmd, "/agivemoney", true) == 0) {
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use this command!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have permission to use that command!");
return 1;
}
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /agivemoney [playerid] [amount]");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /agivemoney [playerid] [amount]");
return 1;
}
moneys[playerid] = strval(tmp);
if (IsPlayerConnected(giveplayerid)) {
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerMoney(playerid);
GivePlayerMoney(giveplayerid, moneys[playerid]);
format(string, sizeof(string), "You have given $%d to %s (id: %d).",moneys[playerid],giveplayer,giveplayerid);
SendClientMessage(playerid, COLOR_ORANGE, string);
format(string, sizeof(string), "You have been given $%d from Admin/Moderator %s (id: %d).", moneys[playerid], sendername, playerid);
SendClientMessage(giveplayerid, COLOR_ORANGE, string);
}
else {
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
return 1;
}
//------------------------------Admin Disarm------------------------------------
if(strcmp(cmd, "/adisarm", true) == 0)
{
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use this command!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have permission to use that command!");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] > 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot disarm a fellow admin or moderator!");
return 1;
}
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /adisarm [playerid]");
return 1;
}
if (IsPlayerConnected(giveplayerid)) {
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
ResetPlayerWeapons(giveplayerid);
format(string, sizeof(string), "Admin/Moderator %s (id: %d) has disarmed %s (id: %d).", sendername,playerid,giveplayer,giveplayerid);
SendClientMessageToAll(COLOR_ORANGE, string);
format(string, sizeof(string), "You have disarmed %s (id: %d).", giveplayer,giveplayerid);
SendClientMessage(playerid, COLOR_ORANGE, string);
format(string, sizeof(string), "Admin/Moderator %s (id: %d) disarmed you.", sendername,playerid);
SendClientMessage(giveplayerid, COLOR_ORANGE, string);
}
else {
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
return 1;
}
//------------------------------Admin Announce----------------------------------
if(strcmp(cmd, "/aannounce", true) == 0)
{
tmp = strtok(cmdtext, idx, strlen(cmdtext));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use this command!");
return 1;
}
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
if(PlayerInfo[playerid][pAdmin] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have permission to use that command!");
return 1;
}
if (!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /aannounce [message]");
return 1;
}
if (2 < strlen(tmp) && strlen(tmp) < 31)
{
format(string, sizeof(string), "~w~%s", tmp);
GameTextForAll(string, 5000, 3);
for(new i=0;i<MAX_PLAYERS;i++) {
if(IsPlayerConnected(i)) {
aMessage[i] = 1;
SetTimer("announcer",5000,0);
}
}
}
else
{
if (strlen(tmp) < 2)
{
format(string, sizeof(string), "- %s - is too short!", tmp);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
if (strlen(tmp) == 2)
{
format(string, sizeof(string), "- %s - is too short!", tmp);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
if (strlen(tmp) > 31)
{
format(string, sizeof(string), "- %s - is too long!", tmp);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
if (strlen(tmp) == 31)
{
format(string, sizeof(string), "- %s - is too long!", tmp);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
}
return 1;
}
//------------------------------Admin Murder------------------------------------
if(strcmp(cmd, "/akill", true) == 0) {
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use this command!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have permission to use that command!");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] > 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot murder a fellow admin or moderator!");
return 1;
}
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /akill [playerid]");
return 1;
}
if (IsPlayerConnected(giveplayerid)) {
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
SetPlayerHealth(giveplayerid, -999);
format(string, sizeof(string), "Admin/Moderator %s (id: %d) murdered %s (id: %d).", sendername,playerid,giveplayer,giveplayerid);
SendClientMessageToAll(COLOR_ORANGE, string);
format(string, sizeof(string), "You have murdered %s (id: %d).", giveplayer,giveplayerid);
SendClientMessage(playerid, COLOR_ORANGE, string);
format(string, sizeof(string), "Admin/Moderator %s (id: %d) murdered you.", sendername,playerid);
SendClientMessage(giveplayerid, COLOR_ORANGE, string);
return 1;
}
else {
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
return 1;
}
}
//---------------------------------Buy Car--------------------------------------
if(strcmp(cmd, "/buycar", true) == 0) {
new filename[256];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
cartemp[playerid] = dini_Int(udb_encode(playername), "carowned");
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
tmp = dini_Get(filename, "owner");
carname = dini_Get(filename, "carname");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi essere registrato,loggato e dentro ad un veicolo per poterlo comprare!");
return 1;
}
carbuyable[playerid] = dini_Int(filename, "buybar");
if(carbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Questo veicolo e impostato come nn vendimile dall amministrazione!");
return 1;
}
if(passenger[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi essere in un veicolo per comprarlo!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid) == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi essere in un veicolo per comprarlo!");
return 1;
}
if (strcmp(tmp,playername,false) == 0) {
format(string, sizeof(string), "Possiedi già questo stupido %s, %s", carname, playername);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
return 1;
}
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
bought[playerid] = dini_Int(filename, "bought");
if(cartemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Questo %s è di %s, nn è in vendita!", carname, tmp);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
return 1;
}
if(cartemp[playerid] > 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Potete possedere soltanto UN veicolo alla volta! Dovete vendere il vostro altro veicolo in primo luogo!");
return 1;
}
if(logged[playerid] == 1) {
new cash[MAX_PLAYERS];
cash[playerid] = GetPlayerMoney(playerid);
if(cash[playerid] >= carcost[playerid]) {
new stringa[256];
format(stringa, sizeof(stringa), "-%d", carcost[playerid]);
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
dini_Set(filename, "owner", playername);
dini_Set(udb_encode(playername), "carowned", filename);
dini_IntSet(filename, "bought", 1);
dini_Set(udb_encode(playername), "car", "1");
GivePlayerMoney(playerid, -carcost[playerid]);
ignition[playerid] = 1;
new string5[256];
tmp[playerid] = GetPlayerVehicleID(playerid);
format(string5, sizeof(string5), "Hai appena comprato questo %s per $%d.", carname, carcost[playerid],carname,"%");
SendClientMessage(playerid, COLOR_GREEN, string5);
return 1;
}
if(cash[playerid] < carcost[playerid]) {
new string6[256];
format(string6, sizeof(string6), "NN hai $%d e nn puoi permettetti questo %s! SEI POVERO", carcost[playerid], carname);
SendClientMessage(playerid, COLOR_BRIGHTRED, string6);
return 1;
}
}
return 1;
}
//-----------------------------------Sell Car-----------------------------------
if(strcmp(cmd, "/sellcar", true) == 0) {
new var1[256];
new filename[256];
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
var1 = dini_Get(filename, "owner");
carname = dini_Get(filename, "carname");
tmp[playerid] = GetPlayerVehicleID(playerid);
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi essere registrato,loggato e su un tuo veicolo per poterlo venderlo!");
return 1;
}
carbuyable[playerid] = dini_Int(filename, "buybar");
if(carbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Questo veicolo è impostato dall administrator nn vendibile!");
return 1;
}
if(passenger[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Dovete essere nel drivers' sede del vostro veicolo per venderlo!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid) == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi essere nel tuo veicolo per venderlo!");
return 1;
}
if (strcmp(var1,playername,false) == 0) {
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
dini_Set(filename, "owner", "server");
dini_IntSet(udb_encode(playername), "carowned", 0);
dini_IntSet(filename, "bought", 0);
dini_IntSet(filename, "secure", 0);
dini_IntSet(udb_encode(playername), "car", 0);
GivePlayerMoney(playerid, carcost[playerid]);
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(tmp[playerid]);
format(string, sizeof(string), "Avete venduto appena il vostro %s per $%d, goditi la passeggiata stronzetto!!!", carname, carcost[playerid]);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
return 1;
}
else {
SendClientMessage(playerid, COLOR_BRIGHTRED, "What are you trying to pull here, you don't own the vehicle!!!");
return 1;
}
}
//-------------------------------Admin Sell Car---------------------------------
//-----------------------------Admin Make Car Buyable---------------------------
//---------------------------Admin Make Car UnBuyable---------------------------
if(strcmp(cmd, "/cunbuy", true) == 0) {
new var1[256];
new filename[256];
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
var1 = dini_Get(filename, "owner");
carname = dini_Get(filename, "carname");
carbuyable[playerid] = dini_Int(filename, "buybar");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be registered and logged in to use this command!");
return 1;
}
if(passenger[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be in the drivers seat to use this command");
return 1;
}
if(IsPlayerInAnyVehicle(playerid) == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be in a vehicle in order to use this command");
return 1;
}
if(carbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This vehicle is already set as un-buyable!");
return 1;
}
if (PlayerInfo[playerid][pAdmin] == 2) {
if (strcmp(server,var1,false) == 0) {
format(string,sizeof(string),"You have set this %d to non-buyable!",carname);
SendClientMessage(playerid,COLOR_ORANGE,string);
dini_IntSet(filename, "buybar", 1);
return 1;
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
var1 = dini_Get(filename, "owner");
dini_Set(filename, "owner", "server");
dini_IntSet(filename, "bought", 0);
dini_IntSet(filename, "secure", 0);
dini_IntSet(filename, "buybar", 1);
if(dini_Exists(udb_encode(var1))) {
tempid[playerid] = IsPlayerNameOnline(var1);
if(tempid[playerid] >= 0 || tempid[playerid] < 100) {
bank[tempid[playerid]] = bank[tempid[playerid]]+carcost[playerid];
dini_IntSet(udb_encode(var1), "car", 0);
dini_IntSet(udb_encode(var1), "carowned", 0);
format(string, sizeof(string), "You just sold %s's %s and set it to non-buyable. The sale money ($%d) was sent to %s's online bank account", var1, carname, carcost[playerid], var1);
SendClientMessage(playerid, COLOR_ORANGE, string);
format(string, sizeof(string), "Admin (%s) has just sold your %s and set it to non-buyable! The sale money ($%d) was sent to your online bank account!", playername, carname, carcost[playerid]);
SendClientMessage(tempid[playerid], COLOR_ORANGE, string);
return 1;
}
else {
bank[tempid[playerid]] = dini_Int(udb_encode(var1), "bank");
bank[tempid[playerid]] = bank[tempid[playerid]]+carcost[playerid];
dini_IntSet(udb_encode(var1), "car", 0);
dini_IntSet(udb_encode(var1), "carowned", 0);
dini_IntSet(udb_encode(var1), "carsold", 1);
dini_IntSet(udb_encode(var1), "bank", bank[tempid[playerid]]);
format(string, sizeof(string), "You just sold %s's %s and set it to non-buyable. The sale money ($%d) was sent to %s's online bank account", var1, carname, carcost[playerid], var1);
SendClientMessage(playerid, COLOR_ORANGE, string);
return 1;
}
}
if(!dini_Exists(udb_encode(var1))) {
format(string, sizeof(string), "You just sold %s's %s and set it to non-buyable. The player file was not found and cannot be altered.", var1, carname);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
}
SendClientMessage(playerid, COLOR_BRIGHTRED, "You are not a server administrator and cannot use this command!");
return 1;
}
//-----------------------------------Lock Car-----------------------------------
if (strcmp(cmdtext, "/lock", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new filename[256];
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
carname = dini_Get(filename, "carname");
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COLOR_YELLOW,"Non e il tuo questo veicolo (vai a lavora prendi i soldi e poi ti compri un veicolo).");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
if(i != playerid)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
}
}
format(lockmess,sizeof(lockmess),"Il tuo veicolo %s e ora bloccato (Non te lo saresti mai aspettato e stronzo!!!! -.-).",carname);
SendClientMessage(playerid,COLOR_GREEN, lockmess);
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1056,pX,pY,pZ);
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "Non sei in un veicolo -.-.");
}
return 1;
}
//----------------------------------Unlock Car----------------------------------
if (strcmp(cmdtext, "/unlock", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new filename[256];
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
carname = dini_Get(filename, "carname");
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COLOR_YELLOW, "NN è il tuo questo veicolo.");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
}
format(lockmess,sizeof(lockmess),"Il tuo %s è ora sbloccato.",carname);
SendClientMessage(playerid,COLOR_GREEN, lockmess);
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1057,pX,pY,pZ);
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "NN sei in un veicolo.");
}
return 1;
}
//---------------------------Secure Car [Non Leathal]---------------------------
if (strcmp(cmdtext, "/securekick", true)==0) {
new filename[256];
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
new val1[256];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
val1 = dini_Get(filename, "owner");
tmpcar[playerid] = dini_Int(udb_encode(playername), "carowned");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be registered and logged in to use this command!");
return 1;
}
if(carbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This vehicle is un-buyable and these commands will not work!");
return 1;
}
if(tmpcar[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must first own a vehicle before you can use this command!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid)) {
if (strcmp(val1,playername,false) == 0) {
dini_IntSet(filename, "secure", 1);
carname = dini_Get(filename, "carname");
format(securemess,sizeof(securemess),"You have set your %s as secure, no other player will be able to use it even when you are offline.", carname);
SendClientMessage(playerid, COLOR_GREEN, securemess);
return 1;
}
else {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not own this vehicle and cannot secure it!");
return 1;
}
}
else {
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You must be in a vehicle to use this command");
return 1;
}
}
//------------------------Admin Secure Car [Non Leathal]------------------------
if (strcmp(cmdtext, "/asecurekick", true)==0) {
new filename[256];
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
tmpcar[playerid] = dini_Int(udb_encode(playername), "carowned");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be registered and logged in to use this command!");
return 1;
}
if (PlayerInfo[playerid][pAdmin] > 0) {
if(IsPlayerInAnyVehicle(playerid)) {
dini_IntSet(filename, "asecure", 1);
carname = dini_Get(filename, "carname");
format(securemess,sizeof(securemess),"You have set this %s as admin only, no other player will be able to use it unless they too are an admin.", carname);
SendClientMessage(playerid, COLOR_GREEN, securemess);
return 1;
}
else {
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You must be in a vehicle to use this command");
return 1;
}
}
else {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have permission to use this command!");
return 1;
}
}
//--------------------------Admin Secure car [Leathal]--------------------------
//-----------------------------------------------------------------------------
if (strcmp(cmdtext, "/asecurekill", true)==0) {
new filename[256];
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
tmpcar[playerid] = dini_Int(udb_encode(playername), "carowned");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be registered and logged in to use this command!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid)) {
if (PlayerInfo[playerid][pAdmin] > 0) {
dini_IntSet(filename, "asecure", 2);
carname = dini_Get(filename, "carname");
format(securemess,sizeof(securemess),"You have set this %s as admin only with lethal protection, no other player will be able to use it unless they too are an admin.", carname);
SendClientMessage(playerid, COLOR_GREEN, securemess);
return 1;
}
else {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have permission to use this command!");
return 1;
}
}
else {
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You must be in a vehicle to use this command");
return 1;
}
}
//---------------------------------Admin Unsecure-------------------------------
if (strcmp(cmdtext, "/aunsecure", true)==0) {
new filename[256];
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
tmpcar[playerid] = dini_Int(udb_encode(playername), "carowned");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be registered and logged in to use this command!");
return 1;
}
if(tmpcar[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must first own a vehicle before you can use this command!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid)) {
if (PlayerInfo[playerid][pAdmin] > 0) {
dini_IntSet(filename, "asecure", 0);
carname = dini_Get(filename, "carname");
format(securemess,sizeof(securemess),"You have set this %s as accessable to everyone.", carname);
SendClientMessage(playerid, COLOR_GREEN, securemess);
return 1;
}
else {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have permission to use this command!");
return 1;
}
}
else {
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You must be in a vehicle to use this command");
return 1;
}
}
//------------------------------------UnSecure----------------------------------
if (strcmp(cmdtext, "/unsecure", true)==0) {
new filename[256];
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
new val1[256];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
val1 = dini_Get(filename, "owner");
tmpcar[playerid] = dini_Int(udb_encode(playername), "carowned");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be registered and logged in to use this command!");
return 1;
}
if(carbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This vehicle is un-buyable and these commands will not work!");
return 1;
}
if(tmpcar[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must first own a vehicle before you can use this command!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid)) {
if (strcmp(val1,playername,false) == 0) {
dini_IntSet(filename, "secure", 0);
carname = dini_Get(filename, "carname");
format(securemess,sizeof(securemess),"You have set your %s as accessable to everyone.", carname);
SendClientMessage(playerid, COLOR_GREEN, securemess);
return 1;
}
else {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not own this vehicle and cannot secure it!");
return 1;
}
}
else {
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You must be in a vehicle to use this command");
return 1;
}
}
//-----------------------------Secure Car [Leathal]-----------------------------
if (strcmp(cmdtext, "/securekill", true)==0) {
new filename[256];
format(filename, sizeof(filename), "%d", GetPlayerVehicleID(playerid));
new val1[256];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
val1 = dini_Get(filename, "owner");
tmpcar[playerid] = dini_Int(udb_encode(playername), "carowned");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Ti devi registrare loggare ed esseree in una auto per utilizzare il comando");
return 1;
}
if(carbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Questo veicolo nn è vendibile e questi ordini non funzioneranno!");
return 1;
}
if(tmpcar[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Dovete possedere un veicolo prima che possiate usare questo ordine!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid)) {
if (strcmp(val1,playername,false) == 0) {
dini_IntSet(filename, "secure", 2);
carname = dini_Get(filename, "carname");
format(securemess,sizeof(securemess),"Avete regolato il vostro %s con protezione mortale, non ci sarà nessun altro giocatore che potrà usarla anche quando siete offline!!!.", carname);
SendClientMessage(playerid, COLOR_GREEN, securemess);
return 1;
}
else {
SendClientMessage(playerid, COLOR_BRIGHTRED, "NN possiedi questo veicolo e nn puo fissarlo!");
return 1;
}
}
else {
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Devi essere in un veicolo per utilizzare il comando");
return 1;
}
}
//------------------------------Teleport to Da Nang-------------------------------
if(strcmp(cmdtext, "/stunt", true) == 0)
{
{
SetPlayerInterior(playerid,0);
{
SetPlayerPos(playerid,2065.0300,-2624.0828,13);
}
GameTextForPlayer(playerid,"Divertitevi su questo stunt fatto da:Snake95&Diablo90",2500,3);
}
return 1;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
if(strcmp(cmdtext, "/dm", true) == 0)
{
{
SetPlayerInterior(playerid,0);
{
SetPlayerPos(playerid,874.4019,-2808.9973,-11);
}
GameTextForPlayer(playerid,"Uccidetevi e morite....R.I.P!!!",2500,3);
}
return 1;
}
//--------------------------------------------------------------------------
if(strcmp(cmdtext, "/drift3", true) == 0)
{
{
SetPlayerInterior(playerid,0);
{
SetPlayerPos(playerid, -353.8616,1530.5092,75);
}
GameTextForPlayer(playerid,"NN spasciatevi le auto!!",2500,3);
}
return 1;
}
if(strcmp(cmdtext, "/bigjump", true) == 0)
{
{
SetPlayerInterior(playerid,0);
{
SetPlayerPos(playerid,-662.584167,2305.653076,136.077987);
}
GameTextForPlayer(playerid,"NN fare lo stronzo...cerca di nn finire di sotto -.-!!",2500,3);
}
return 1;
}
if(strcmp(cmdtext, "/dm2", true) == 0)
{
{
SetPlayerInterior(playerid,0);
{
SetPlayerPos(playerid,755.8146,-1286.4373,13.5579);
}
GameTextForPlayer(playerid,"NN penserai di perdere contro quel bastardo??!!",2500,3);
}
return 1;
}
if(strcmp(cmdtext, "/dm3", true) == 0)
{
{
SetPlayerInterior(playerid,0);
{
SetPlayerPos(playerid,-774.5571,2423.2834,157.1006);
}
GameTextForPlayer(playerid,"Hey fermo!! ti hanno dato le condoglianze??",2500,3);
}
return 1;
}
if(strcmp(cmdtext, "/dm4", true) == 0)
{
{
SetPlayerInterior(playerid,0);
{
SetPlayerPos(playerid,1384.1860,2185.8311,11.0234);
}
GameTextForPlayer(playerid,"NN avere paura di lui e solo un pikkolo mollusco!!",2500,3);
}
return 1;
}
if(strcmp(cmdtext, "/telebank", true) == 0)
{
{
SetPlayerInterior(playerid,6);
{
SetPlayerPos(playerid,-27.7789,-54.9291,1003.5469);
}
GameTextForPlayer(playerid,"Ekko la banca, quando hai finito goditi una lunga passeggiata!!",2500,3);
}
return 1;
}
if(strcmp(cmdtext, "/dm1", true) == 0)
{
{
SetPlayerInterior(playerid,0);
{
SetPlayerPos(playerid,1539.7217,-1358.4211,329.4644);
}
GameTextForPlayer(playerid,"Se hai intenzione di cadere di sotto ci sono i paracaduti deficiente!!",2500,3);
}
return 1;
}
if(strcmp(cmdtext, "/dm5", true) == 0)
{
{
SetPlayerInterior(playerid,0);
{
SetPlayerPos(playerid,1652.3510,-1685.4027,21.4219);
}
GameTextForPlayer(playerid,"NN fare una carneficina come ha fatto Big Smoke e CJ!!",2500,3);
}
return 1;
}
if(strcmp(cmdtext, "/grove", true) == 0)
{
{
SetPlayerInterior(playerid,0);
{
SetPlayerPos(playerid,2508.0906,-1672.3979,13.3785);
}
GameTextForPlayer(playerid,"Benvenuto a GROVE!",2500,3);
}
return 1;
}
if(strcmp(cmdtext, "/stunt2", true) == 0)
{
{
SetPlayerInterior(playerid,0);
{
SetPlayerPos(playerid,1425.2493,-1329.0414,13.5708);
}
GameTextForPlayer(playerid,"State molto attenti nn andate molto veloci!!!",2500,3);
}
return 1;
}
if(strcmp(cmdtext, "/dm6", true) == 0)
{
{
SetPlayerInterior(playerid,0);
{
SetPlayerPos(playerid,2594.6230,-2068.6040,245.6011);
}
GameTextForPlayer(playerid,"Ammazzatevi e cadete di sotto!!!",2500,3);
}
return 1;
}
//------------------------------------Credits-----------------------------------
if(strcmp(cmd, "/credits", true) == 0) {
SendClientMessage(playerid, COLOR_YELLOW, "Questa GM la ha modifikata Snake95&Diablo90");
return 1;
}
//-------------------------------------tascordiani-------------------------------------
if(strcmp(cmd, "/help", true) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "Per vedere le armi disponibili fai /armi.");
SendClientMessage(playerid, COLOR_YELLOW, "Per informazioni sull cellulare fai /cellhelp.");
SendClientMessage(playerid, COLOR_YELLOW, "Per informazioni sulla banca fai/bankhelp.");
SendClientMessage(playerid, COLOR_YELLOW, "Per informazioni sui veicoli fai /vehiclehelp.");
SendClientMessage(playerid, COLOR_YELLOW, "Per informazioni sui luoghi di teleport fai /telep.");
SendClientMessage(playerid, COLOR_ORANGE, "Fai /credit per vedere chi ha contribuito su questo script.");
return 1;
}
//---------------------------------Property Help--------------------------------
if(strcmp(cmd, "/bizhelp", true) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "Per comprare una attività (Devi essere sul checkpoint) - /buybiz");
SendClientMessage(playerid, COLOR_YELLOW, "Per vendere una attività(Devi essere sul checkpoint) - /sellbiz");
SendClientMessage(playerid, COLOR_YELLOW, "Per vedere i profitti della attività fai (Devi essere sul checkpoint) - /getprofit");
return 1;
}
//-----------------------------------Phone Help---------------------------------
if(strcmp(cmd, "/telep", true) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "Per visitare il nostro stunt fai /stunt-/stunt2");
SendClientMessage(playerid, COLOR_YELLOW, "Per farti una gara fai /drift3");
SendClientMessage(playerid, COLOR_YELLOW, "Per sfidare qualcuno (guerra) fai /dm 1-6");
return 1;
}
//------------------------------------------------------------------------------
if(strcmp(cmd, "/cellhelp", true) == 0) {
SendClientMessage(playerid, COLOR_YELLOW, "Le telefonate costano 1$ all secondo");
SendClientMessage(playerid, COLOR_YELLOW, "Per chiamare qualcuno fai /call [player id].");
SendClientMessage(playerid, COLOR_YELLOW, "Per rispondere a una telefonata fai /answer.");
SendClientMessage(playerid, COLOR_YELLOW, "Per uscire da una telefonata fai /hangup.");
return 1;
}
//-----------------------------------Bank Help----------------------------------
if(strcmp(cmd, "/bankhelp", true) == 0) {
SendClientMessage(playerid, COLOR_YELLOW, "Per teleportarti alla banca fai - /telebank");
SendClientMessage(playerid, COLOR_YELLOW, "Per depositare soldi fai /deposit [quanti soldi dovete depositare nn restate al verde!!!]");
SendClientMessage(playerid, COLOR_YELLOW, "Per prelevare soldi /withdraw [quanti soldi volete prendere.]");
SendClientMessage(playerid, COLOR_YELLOW, "Check Balance - /balance");
}
//---------------------------------Vehicle Help---------------------------------
if(strcmp(cmd, "/vehiclehelp", true) == 0) {
SendClientMessage(playerid, COLOR_YELLOW, "Per poter vendere la tua auto devi essere sulla tua auto stupido!!! ricordalo xkè nn ho intezione di didirtelo piu /callcar ");
SendClientMessage(playerid, COLOR_YELLOW, "Per comprare o vendere il veicolo fai-/buycar o /sellcar");
SendClientMessage(playerid, COLOR_YELLOW, "Per sbloccare o bloccare un veicolo fai - /lock o /unlock.");
SendClientMessage(playerid, COLOR_YELLOW, "Attiva o disattiva blocco veicolo LETALE fai /securekill o /unsecure.");
return 1;
}
//--------------------------------Commands list---------------------------------
if (strcmp(cmdtext, "/commands", true)==0)
{
SendClientMessage(playerid, COLOR_YELLOW, "Per vedere gli admin online fai /admins");
SendClientMessage(playerid, COLOR_YELLOW, "Per fare iniziare il countdown fai /count [secondi]");
return 1;
}
//-----------------------------------Save pos-----------------------------------
if (strcmp(cmdtext, "/sp", true)==0)
{
GetPlayerPos(playerid,Pos[playerid][0],Pos[playerid][1],Pos[playerid][2]); // save x,y and z for this player.
GetPlayerFacingAngle(playerid,Pos[playerid][3]); // save the facing angle for this player.
SendClientMessage(playerid,RED,"Posizione salvata!"); // send him a red message.
return 1;
}
//-----------------------------------Load pos-----------------------------------
else if (strcmp(cmdtext, "/lp", true)==0)
{
SetPlayerPos(playerid,Pos[playerid][0],Pos[playerid][1],Pos[playerid][2]); // set his saved position x,y and z.
SetPlayerFacingAngle(playerid,Pos[playerid][3]); // set his saved facing angle.
SetCameraBehindPlayer(playerid); // set the camera..behind the player (looks better).
SendClientMessage(playerid,RED,"You teleported!"); // send him a red message.
return 1;
}
//-----------------------------------Call Car-----------------------------------
if (strcmp(cmdtext, "/callcar", true)==0)
{
new filename[256];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
tmpcar[playerid] = dini_Int(udb_encode(playername), "carowned");
format(filename, sizeof(filename), "%d", tmpcar[playerid]);
carname = dini_Get(filename, "carname");
carused[playerid] = dini_Int(filename, "used");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi essere loggato per fati trasportare il tuo veicolo !");
return 1;
}
carbuyable[playerid] = dini_Int(filename, "buybar");
if(carbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Questo veicolo non e comprabile -.- by server Diablo90!");
return 1;
}
if(PlayerInterior[playerid] > 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi denominare un veicolo o come si chiama xD -.-!");
return 1;
}
if(tmpcar[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi possedere un veicolo prima che usi questo comando testa di cazzo!");
return 1;
}
for(new i=0; i < MAX_PLAYERS; i++) {
if (IsPlayerConnected(i) == 1) {
if (IsPlayerInAnyVehicle(i) == 1) {
if (GetPlayerVehicleID(i) == tmpcar[playerid]) {
GetPlayerPos(i,g,h,l);
ejected[i] = 1;
tmpcar2[i] = tmpcar[playerid];
}
}
}
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
tmpcar[playerid] = dini_Int(udb_encode(playername), "carowned");
format(filename, sizeof(filename), "%d", tmpcar[playerid]);
carused[playerid] = dini_Int(filename, "used");
if(carused[playerid] == 1) {
new Float:x, Float:y, Float:z, Float:a;
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid, a);
x += (3 * floatsin(-a, degrees));
y += (3 * floatcos(-a, degrees));
SetVehiclePos(tmpcar[playerid],x,y,z-0.35);
SetVehicleZAngle(tmpcar[playerid],a+90);
format(carmess,sizeof(carmess),"Your %s has been successfully transported to your location!",carname);
SendClientMessage(playerid, COLOR_GREEN, carmess);
SendClientMessage(playerid, COLOR_BRIGHTRED, "-=(Se il veicolo non ti si e visualizzato metti /resetcar -.-)=-");
}
if(carused[playerid] == 0) {
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
new Float:a;
GetVehiclePos(tmpcar[playerid],t,u,o);
GetPlayerFacingAngle(playerid, a);
t = dini_Int(filename, "sx");
u = dini_Int(filename, "sy");
o = dini_Int(filename, "sz");
t += (3 * floatsin(-a, degrees));
u += (3 * floatcos(-a, degrees));
SetPlayerPos(playerid,t,u,o+3);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have been teleported to your vehicle, this has happened because nobody has used your");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "vehicle since the last gamemode initialization or it has run out of fuel. /callcar will now work");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "properly unless the server is once again reset before you next log on or the vehicle runs out of fuel.");
}
SetTimer("eject", 100, 0);
return 1;
}
//---------------------------------Reset Car------------------------------------
if (strcmp(cmdtext, "/resetcar", true)==0)
{
new filename[256];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
tmpcar[playerid] = dini_Int(udb_encode(playername), "carowned");
format(filename, sizeof(filename), "%d", tmpcar[playerid]);
carused[playerid] = dini_Int(filename, "used");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi essere registrato o loggato per effettuare questo comando!");
return 1;
}
carbuyable[playerid] = dini_Int(filename, "buybar");
if(carbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "questo veicolo non e in vendita by Snake95&Diablo90!");
return 1;
}
if(tmpcar[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Non puoi avere due veicoli, non fare il riccone e pensa a fare la vita normale stronzo riccone.!!!!!");
return 1;
}
for(new i=0; i < MAX_PLAYERS; i++) {
if (IsPlayerConnected(i) == 1) {
if (IsPlayerInAnyVehicle(i) == 1) {
if (GetPlayerVehicleID(i) == tmpcar[playerid]) {
SendClientMessage(i,COLOR_ORANGE,"Questo veicolo e stato resettato, mi spiace U_U!");
}
}
}
}
SetVehicleToRespawn(tmpcar[playerid]);
SetTimer("resetcar",100,0);
reset[playerid] = 1;
return 1;
}
//------------------------------------------------------------------------------
//-------------------------------------Slap-------------------------------------
if(strcmp(cmd, "/slap", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /slap [playerid] [object]");
return 1;
}
giveplayerid = strval(tmp);
tmp = strtok(cmdtext, idx, strlen(cmdtext));
if (!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /slap [playerid] [object]");
return 1;
}
if (IsPlayerConnected(giveplayerid))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s bitch slaps %s across the face with a %s", sendername, giveplayer, tmp);
SendClientMessageToAll(COLOR_INDIGO, string);
for(new i=0; i < MAX_PLAYERS; i++) {
new Float:fx, Float:fy, Float:fz;
GetPlayerPos(i, fx,fy,fz);
PlayerPlaySound(i, 1190, fx,fy,fz);
}
return 1;
}
else
{
format(string, sizeof(string), "ID:%d is not an active player ID number.", giveplayerid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
return 1;
}
//---------------------------------DashBoard----------------------------------
//----------------------------------Team Chat-----------------------------------
cmd(teamchatcmd);
//---------------------------------Admin List-----------------------------------
if(strcmp(cmd, "/admins", true) == 0)
{
new online;
new lColour;
SendClientMessage(playerid, COLOR_ORANGE, "L'admin online sono:");
for (new i = 0; i < MAX_PLAYERS; i++)
{
online = 0;
GetPlayerName(i, sendername, sizeof(sendername));
PlayerInfo[i][pAdmin] = dini_Int(udb_encode(sendername),"level");
if (IsPlayerConnected(i))
{
if (PlayerInfo[i][pAdmin] != 0 && logged[i] == 1)
{
GetPlayerName(i, sendername, sizeof(sendername));
PlayerInfo[i][pAdmin] = dini_Int(udb_encode(sendername),"level");
if (PlayerInfo[i][pAdmin] == 1)
{
format(string, sizeof(string), "%s - Server Moderatori", sendername);
lColour = COLOR_AQUA;
}
else if (PlayerInfo[i][pAdmin] == 2)
{
format(string, sizeof(string), "%s - Server Admin", sendername);
lColour = COLOR_AQUA;
}
online++;
}
if (online == 1)
{
SendClientMessage(playerid, lColour, string);
}
if (online == 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "NN ci sono administrator online!");
}
return 1;
}
}
}
//---------------------------------Admin List-----------------------------------
if(strcmp(cmd, "/admins", true) == 0)
{
new online;
new lColour;
SendClientMessage(playerid, COLOR_ORANGE, "Current Admins Online");
for (new i = 0; i < MAX_PLAYERS; i++)
{
online = 0;
GetPlayerName(i, sendername, sizeof(sendername));
PlayerInfo[i][pAdmin] = dini_Int(udb_encode(sendername),"level");
if (IsPlayerConnected(i))
{
if (PlayerInfo[i][pAdmin] != 0 && logged[i] == 1)
{
GetPlayerName(i, sendername, sizeof(sendername));
PlayerInfo[i][pAdmin] = dini_Int(udb_encode(sendername),"level");
if (PlayerInfo[i][pAdmin] == 1)
{
format(string, sizeof(string), "%s - Server Moderator", sendername);
lColour = COLOR_AQUA;
}
else if (PlayerInfo[i][pAdmin] == 2)
{
format(string, sizeof(string), "%s - Server Admin", sendername);
lColour = COLOR_AQUA;
}
online++;
}
if (online == 1)
{
SendClientMessage(playerid, lColour, string);
}
if (online == 0)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "There are currently no admins online!");
}
return 1;
}
}
}
//----------------------------------Give Admin----------------------------------
if(strcmp(cmd, "/agiveadmin", true) == 0) {
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use this command!");
return 1;
}
if(IsPlayerAdmin(playerid) == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged on to the server RCON to use this command!");
SendClientMessage(playerid, COLOR_BRIGHTRED, "Type /rcon login [rcon password] to login to the server rcon!");
SendClientMessage(playerid, COLOR_BRIGHTRED, "After you have given yourself admin, this will no longer be neccessary.");
return 1;
}
if(IsPlayerAdmin(playerid) == 1 && logged[playerid] == 1) {
GetPlayerName(playerid, playername, sizeof(playername));
dini_IntSet(udb_encode(playername),"level", 2);
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(playername),"level");
SendClientMessage(playerid,COLOR_ORANGE,"You are now a level 2 administrator (full admin rights) on this server!");
return 1;
}
return 1;
}
//-----------------------------------GoTo Biz-----------------------------------
if(strcmp(cmd, "/gotobiz", true) == 0) {
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
biznum[playerid] = dini_Int(udb_encode(playername), "bizowned");
format(cttmp,sizeof(cttmp),"BIZ%d",biznum[playerid]);
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be registered and logged in to use the business checkpoint teleport!");
return 1;
}
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "That business has been set as un-buyable by server administration and business commands will not work!");
return 1;
}
if(biznum[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not yet own a business, you must buy one before you can teleport to it's checkpoint!");
return 1;
}
if(PlayerInterior[playerid] > 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must move outside to teleport to your business!");
return 1;
}
if(biznum[playerid] > 0) {
new Float:tx,Float:ty,Float:tz;
format(string,sizeof(string),"BIZ%d",biznum[playerid]);
telemoney[playerid] = dini_Int(string,"profit");
if(GetPlayerMoney(playerid) >= telemoney[playerid]) {
biznum[playerid] = dini_Int(udb_encode(playername), "teleid");
tx = checkpoints[biznum[playerid]][0];
ty = checkpoints[biznum[playerid]][1];
tz = checkpoints[biznum[playerid]][2];
SetPlayerPos(playerid,tx,ty,tz);
GivePlayerMoney(playerid,-telemoney[playerid]);
format(string,sizeof(string),"You have been teleported to your business!! You were charged 5 minutes worth of profit ($%d), OUCH!",telemoney[playerid]);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
else {
format(string,sizeof(string),"You do not enough money on you to use that command!!! (cost = $%d)",telemoney[playerid]);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
return 1;
}
}
}
//-----------------------------------Buy Biz------------------------------------
if(strcmp(cmd, "/buybiz", true) == 0) {
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(cttmp,sizeof(cttmp),"BIZ%d",biznum[playerid]);
ownername = dini_Get(cttmp,"owner");
playerbiz[playerid] = dini_Int(udb_encode(playername), "bizowned");
bizid[playerid] = dini_Int(cttmp,"idnumber");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi essere registrato e aver effettuato il login per vendere la propietà!");
return 1;
}
if(propactive[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi essere nell checkpoint per poter vendere la propieta!");
return 1;
}
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Questa attivita nn è vendibile!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid) == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Dovete essere a piedi comprare un commercio!");
return 1;
}
if(strcmp(ownername,playername,false) == 0) {
format(propmess, sizeof(propmess), "Questa attività e della tua propieta, %s", playername);
SendClientMessage(playerid, COLOR_YELLOW, propmess);
return 1;
}
if(playerbiz[playerid] > 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Potete possedere soltanto 1 commercio alla volta! Dovete vendere il vostro altro commercio in primo luogo!");
return 1;
}
if(strcmp(ownername,server,false) == 0) {
new cash[MAX_PLAYERS];
cash[playerid] = GetPlayerMoney(playerid);
if(cash[playerid] >= propcost[playerid]) {
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
dini_IntSet(udb_encode(playername), "teleid", playerCheckpoint[playerid]);
dini_Set(cttmp,"owner", playername);
dini_IntSet(udb_encode(playername), "bizowned", bizid[playerid]);
dini_IntSet(cttmp, "bought", 1);
GivePlayerMoney(playerid, -propcost[playerid]);
allowprofit[playerid] = 1;
profit[playerid] = dini_Int(cttmp,"profit");
format(propmess, sizeof(propmess), "Questa attività e vendibile per $%d.Questa attività guadagna $%d ogni 5 minuti.", propcost[playerid],profit[playerid]);
SendClientMessage(playerid, COLOR_GREEN, propmess);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Potete rinviare in qualunque momento al punto di controllo per raccogliere i vostri guadagni da /getprofit di battitura a macchina e");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "I vostri lavori continueranno a fare soldi anke quando voi sarete offline!!!");
return 1;
}
if(cash[playerid] < propcost[playerid]) {
format(propmess, sizeof(propmess), "Non avete $%d e non potete permettervi questo commercio!", propcost[playerid]);
SendClientMessage(playerid, COLOR_BRIGHTRED, propmess);
return 1;
}
}
format(propmess, sizeof(propmess), "Questo commercio appartiene a %s e non può essere comprato!",ownername);
SendClientMessage(playerid, COLOR_BRIGHTRED, propmess);
return 1;
}
//-------------------------------------Sell Biz---------------------------------
if(strcmp(cmd, "/sellbiz", true) == 0) {
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(cttmp,sizeof(cttmp),"BIZ%d",biznum[playerid]);
playerbiz[playerid] = dini_Int(udb_encode(playername), "bizowned");
ownername = dini_Get(cttmp,"owner");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi registrarti e loggarti per poter vendere la tua attività!");
return 1;
}
if(propactive[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi essere nel checkpoint per poter vendere la tua attività!");
return 1;
}
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Questa attività è impostata come nn vendibile dall amministrazzione del server.!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid) == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Dovete essere a piedi per vendere un commercio!");
return 1;
}
if (strcmp(server,ownername,false) == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Nessuno ha comprato questo commercio tuttavia e siete proibiti dal venderlo!");
return 1;
}
if(playerbiz[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Ancora non possedete alcun commercio.!");
return 1;
}
if (strcmp(playername,ownername,false) == 0) {
new cash[MAX_PLAYERS];
cash[playerid] = GetPlayerMoney(playerid);
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
dini_IntSet(udb_encode(playername), "teleid", 0);
dini_Set(cttmp,"owner", "server");
dini_IntSet(udb_encode(playername), "bizowned", 0);
dini_IntSet(cttmp, "bought", 0);
dini_IntSet(cttmp, "totalprofit", 0);
GivePlayerMoney(playerid, propcost[playerid]);
format(propmess, sizeof(propmess), "Hai appena venduto il tuo commercio per $%d.", propcost[playerid]);
SendClientMessage(playerid, COLOR_GREEN, propmess);
return 1;
}
format(propmess, sizeof(propmess), "Non possedete questo commercio, %s lo possiede e soltanto lui può venderlo! ", ownername);
SendClientMessage(playerid, COLOR_BRIGHTRED, propmess);
return 1;
}
//---------------------------------Admin Sell Biz-------------------------------
if(strcmp(cmd, "/asellbiz", true) == 0)
{
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(cttmp,sizeof(cttmp),"BIZ%d",biznum[playerid]);
ownername = dini_Get(cttmp,"owner");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be registered and logged in to use this command!");
return 1;
}
if(propactive[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be in a property checkpoint in order to use this command!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid) == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be on foot to use this command!");
return 1;
}
if (strcmp(server,ownername,false) == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "Nobody has bought this business yet!");
return 1;
}
if (PlayerInfo[playerid][pAdmin] == 2) {
dini_Set(cttmp,"owner", "server");
dini_IntSet(cttmp, "bought", 0);
dini_IntSet(cttmp, "totalprofit", 0);
if(dini_Exists(udb_encode(ownername))) {
tempid[playerid] = IsPlayerNameOnline(ownername);
if(tempid[playerid] >= 0 || tempid[playerid] < 100) {
bank[tempid[playerid]] = bank[tempid[playerid]]+propcost[playerid];
dini_IntSet(udb_encode(ownername), "bizowned", 0);
dini_IntSet(udb_encode(ownername), "teleid", 0);
format(propmess, sizeof(propmess), "You just sold %s's business. The money ($%d) was sent to %s's online bank account.", ownername, propcost[playerid], ownername);
SendClientMessage(playerid, COLOR_ORANGE, propmess);
format(propmess, sizeof(propmess), "Admin (%s) has just sold your business! The sale money ($%d) was sent to your onlne bank account!", playername, propcost[playerid]);
SendClientMessage(tempid[playerid], COLOR_ORANGE, propmess);
return 1;
}
else {
bank[tempid[playerid]] = dini_Int(udb_encode(ownername), "bank");
bank[tempid[playerid]] = bank[tempid[playerid]]+propcost[playerid];
dini_IntSet(udb_encode(ownername), "bizowned", 0);
dini_IntSet(udb_encode(ownername), "teleid", 0);
dini_IntSet(udb_encode(ownername), "bank", bank[tempid[playerid]]);
format(propmess, sizeof(propmess), "You just sold %s's business. The money ($%d) was sent to %s's online bank account.", ownername, propcost[playerid], ownername);
SendClientMessage(playerid, COLOR_ORANGE, propmess);
return 1;
}
}
if(!dini_Exists(udb_encode(ownername))) {
format(propmess, sizeof(propmess), "You just sold %s's business. The player file is missing and could not be changed.", ownername);
SendClientMessage(playerid, COLOR_ORANGE, propmess);
return 1;
}
}
SendClientMessage(playerid, COLOR_BRIGHTRED, "You are not a server administrator and cannot use this command!");
return 1;
}
//----------------------------------Biz Buyable---------------------------------
if(strcmp(cmd, "/bbuy", true) == 0) {
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(cttmp,sizeof(cttmp),"BIZ%d",biznum[playerid]);
bizbuyable[playerid] = dini_Int(cttmp, "buybar");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be registered and logged in to use this command!");
return 1;
}
if(propactive[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be in a business checkpoint in order to use this command!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid) == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be on foot to use this command!");
return 1;
}
if (PlayerInfo[playerid][pAdmin] == 2) {
if (bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_ORANGE, "You have set this business to buyable!");
dini_IntSet(cttmp, "buybar", 0);
return 1;
}
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business is already buyable!");
return 1;
}
SendClientMessage(playerid, COLOR_BRIGHTRED, "You are not a server administrator and cannot use this command!");
return 1;
}
//----------------------------------Biz UnBuyable-------------------------------
if(strcmp(cmd, "/bunbuy", true) == 0) {
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(cttmp,sizeof(cttmp),"BIZ%d",biznum[playerid]);
ownername = dini_Get(cttmp,"owner");
bizbuyable[playerid] = dini_Int(cttmp, "buybar");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be registered and logged in to use this command!");
return 1;
}
if(propactive[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be in a business checkpoint in order to use this command!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid) == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be on foot to use this command!");
return 1;
}
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business is already set as un-buyable!");
return 1;
}
if (PlayerInfo[playerid][pAdmin] == 2) {
if (strcmp(server,ownername,false) == 0) {
SendClientMessage(playerid, COLOR_ORANGE, "You have set this business to non-buyable!");
dini_IntSet(cttmp, "buybar", 1);
return 1;
}
dini_Set(cttmp,"owner", "server");
dini_IntSet(cttmp, "bought", 0);
dini_IntSet(cttmp, "totalprofit", 0);
dini_IntSet(cttmp, "buybar", 1);
if(dini_Exists(udb_encode(ownername))) {
tempid[playerid] = IsPlayerNameOnline(ownername);
if(tempid[playerid] >= 0 || tempid[playerid] < 100) {
bank[tempid[playerid]] = bank[tempid[playerid]]+propcost[playerid];
dini_IntSet(udb_encode(ownername), "bizowned", 0);
dini_IntSet(udb_encode(ownername), "teleid", 0);
format(propmess, sizeof(propmess), "You just sold %s's business and set it to unbuyable. The money ($%d) was sent to %s's online bank account.", ownername, propcost[playerid], ownername);
SendClientMessage(playerid, COLOR_ORANGE, propmess);
format(propmess, sizeof(propmess), "Admin (%s) has just sold your business and set it to unbuyable! The sale money ($%d) was sent to your onlne bank account!", playername, propcost[playerid]);
SendClientMessage(tempid[playerid], COLOR_ORANGE, propmess);
return 1;
}
else {
bank[tempid[playerid]] = dini_Int(udb_encode(ownername), "bank");
bank[tempid[playerid]] = bank[tempid[playerid]]+propcost[playerid];
dini_IntSet(udb_encode(ownername), "bizowned", 0);
dini_IntSet(udb_encode(ownername), "teleid", 0);
dini_IntSet(udb_encode(ownername), "bank", bank[tempid[playerid]]);
format(propmess, sizeof(propmess), "You just sold %s's business and set it to unbuyable. The money ($%d) was sent to %s's online bank account.", ownername, propcost[playerid], ownername);
SendClientMessage(playerid, COLOR_ORANGE, propmess);
return 1;
}
}
if(!dini_Exists(udb_encode(ownername))) {
format(propmess, sizeof(propmess), "You just sold %s's business and set it to unbuyable. The player file is missing and could not be changed.", ownername);
SendClientMessage(playerid, COLOR_ORANGE, propmess);
return 1;
}
}
SendClientMessage(playerid, COLOR_BRIGHTRED, "You are not a server administrator and cannot use this command!");
return 1;
}
//---------------------------------Get Biz Profit-------------------------------
if(strcmp(cmd, "/getprofit", true) == 0) {
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(cttmp,sizeof(cttmp),"BIZ%d",biznum[playerid]);
ownername = dini_Get(cttmp,"owner");
playerbiz[playerid] = dini_Int(udb_encode(playername), "bizowned");
bizid[playerid] = dini_Int(cttmp,"idnumber");
if(logged[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be registered and logged in to collect your earnings!");
return 1;
}
if(propactive[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be in a business checkpoint in order to collect your earnings!");
return 1;
}
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration and business commands will not work!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid) == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be on foot to collect your earnings!");
return 1;
}
if(strcmp(ownername,server,false) == 0) {
format(propmess, sizeof(propmess), "Nobody has bought this business yet, what are you trying to pull punk!");
SendClientMessage(playerid, COLOR_BRIGHTRED, propmess);
return 1;
}
if(playerbiz[playerid] == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not yet own any business, nice try loser!");
return 1;
}
if(strcmp(ownername,playername,false) == 0) {
totalprofit[playerid] = dini_Int(cttmp, "totalprofit");
if(totalprofit[playerid] == 0) {
SendClientMessage(playerid,COLOR_BRIGHTRED,"Your business has not yet made any earnings since your last visit. Please wait for notification of updated earnings!");
return 1;
}
GivePlayerMoney(playerid,totalprofit[playerid]);
dini_IntSet(cttmp, "totalprofit", 0);
format(propmess, sizeof(propmess), "You have collected $%d of earnings from your current business, %s! Enjoy!", totalprofit[playerid],ownername);
SendClientMessage(playerid, COLOR_LIGHTBLUE, propmess);
return 1;
}
format(propmess, sizeof(propmess), "This business belongs to %s, nice try loser! Stop trying to steal other peoples business earnings!",ownername);
SendClientMessage(playerid, COLOR_BRIGHTRED, propmess);
return 1;
}
//---------------------------------Call on Phone--------------------------------
if(strcmp(cmd, "/call", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /call [playerid]");
return 1;
}
giveplayerid = strval(tmp);
if (logged[playerid] != 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Devi essere loggato per telefonare Idiota -.-!");
return 1;
}
if (GetPlayerMoney(playerid) < CallCost)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Non hai appastanza soldi per telefonara (Povero Vattene a lavora)!");
return 1;
}
if (giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Telefonata Terminata!");
return 1;
}
if (!(IsPlayerConnected(giveplayerid)))
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "il plater e inattivo idiota non vedi??? -.-!");
return 1;
}
if (Calling[playerid] > -1)
{
GetPlayerName(Calling[playerid], giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "stai telefonando a %s!", giveplayer);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
return 1;
}
if (Calling[giveplayerid] > -1)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "%s Riprova a chiamre piu tardi!!! idiota", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
else
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s is ringing you, type /answer to answer the call or /hangup to ignore it", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "You are ringing %s", giveplayer);
SendClientMessage(playerid, COLOR_GREEN, string);
Calling[playerid] = giveplayerid;
Calling[giveplayerid] = playerid;
Callerid[playerid] = 1;
return 1;
}
//---------------------------------Answer Phone---------------------------------
if(strcmp(cmd, "/answer", true) == 0)
{
if (logged[playerid] != 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to answer a phone call!");
return 1;
}
if (Calling[playerid] == -1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Nobody is calling you!");
return 1;
}
if (Answered[playerid] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You are already on the phone!");
return 1;
}
else
GetPlayerName(Calling[playerid], giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s has answered your call, talk away", sendername);
SendClientMessage(Calling[playerid], COLOR_GREEN, string);
format(string, sizeof(string), "You have answered %s's call, talk away", giveplayer);
SendClientMessage(playerid, COLOR_GREEN, string);
Answered[playerid] = 1;
Answered[Calling[playerid]] = 1;
Callerid[Calling[playerid]] = 1;
return 1;
}
//---------------------------------HangUp Phone---------------------------------
if(strcmp(cmd, "/hangup", true) == 0)
{
if (logged[playerid] != 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to hang up a phone call!");
return 1;
}
if (Calling[playerid] == -1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You are not on the phone!");
return 1;
}
else
{
GetPlayerName(Calling[playerid], giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s has hung up the phone on you", sendername);
SendClientMessage(Calling[playerid], COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "You have hung up on %s", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
new bCalling = Calling[playerid];
Calling[playerid] = -1;
Answered[playerid] = 0;
Callerid[playerid] = 0;
Calling[bCalling] = -1;
Answered[bCalling] = 0;
Callerid[bCalling] = 0;
}
return 1;
}
return 0;
}
//=========================On Player Leave Checkpoint=============================
public OnPlayerLeaveCheckpoint(playerid)
{
propactive[playerid] = 0;
allowprofit[playerid] = 0;
switch(getCheckpointType(playerid))
{
}
}
//==================================Settings====================================
public Settings()
{
if (!dini_Exists(FILE_SETTINGS)) {
dini_Create(FILE_SETTINGS);
dini_Set(FILE_SETTINGS, "servername", "server");
dini_IntSet(FILE_SETTINGS, "moneyscan", 1);
dini_IntSet(FILE_SETTINGS, "maxmoney", 9000000);
dini_IntSet(FILE_SETTINGS, "register", 1);
dini_IntSet(FILE_SETTINGS, "maxusers", 2000);
dini_IntSet(FILE_SETTINGS, "bank", 1);
dini_IntSet(FILE_SETTINGS, "manualsaving", 1);
}
}
//================================Save System===================================
public SaveData()
{
new playername[MAX_PLAYER_NAME];
for (new i=0;i<MAX_PLAYERS;i++) {
GetPlayerName(i, playername, MAX_PLAYER_NAME);
if (dini_Exists(udb_encode(playername)) && logged[i] == 1) {
dini_IntSet(udb_encode(playername), "money", GetPlayerMoney(i));
dini_IntSet(udb_encode(playername), "bank", bank[i]);
PlayerInterior[i] = GetPlayerInterior(i);
if(PlayerInterior[i] == 0) {
new Float:x, Float:y, Float:z;
GetPlayerPos(i,x,y,z);
new Float:a;
GetPlayerFacingAngle(i,a);
dini_IntSet(udb_encode(playername), "a", floatround(a));
dini_IntSet(udb_encode(playername), "x", floatround(x));
dini_IntSet(udb_encode(playername), "y", floatround(y));
dini_IntSet(udb_encode(playername), "z", floatround(z));
}
}
}
return 1;
}
//=============================On Enter Checkpoint==============================
public OnPlayerEnterCheckpoint(playerid)
{
switch(getCheckpointType(playerid))
{
case CP_BANK: {
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the tAxI Systems inc. ATM Banking service!");
SendClientMessage(playerid, COLOR_GREEN, "Type /bankhelp to see how to control your personal bank account!");
}
case CP_BANK_2: {
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the tAxI Systems inc. ATM Banking service!");
SendClientMessage(playerid, COLOR_GREEN, "Type /bankhelp to see how to control your personal bank account!");
}
case CP_BANK_3: {
SendClientMessage(playerid, COLOR_GREEN, "Welcome to the tAxI Systems inc. ATM Banking service!");
SendClientMessage(playerid, COLOR_GREEN, "Type /bankhelp to see how to control your personal bank account!");
}
case BIZ1: {
if(propactive[playerid] == 0) {
biznum[playerid] = 1;
format(cttmp, sizeof(cttmp), "%s","BIZ1");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ2: {
if(propactive[playerid] == 0) {
biznum[playerid] = 2;
format(cttmp, sizeof(cttmp), "%s","BIZ2");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ3: {
if(propactive[playerid] == 0) {
biznum[playerid] = 3;
format(cttmp, sizeof(cttmp), "%s","BIZ3");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ4: {
if(propactive[playerid] == 0) {
biznum[playerid] = 4;
format(cttmp, sizeof(cttmp), "%s","BIZ4");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ5: {
if(propactive[playerid] == 0) {
biznum[playerid] = 5;
format(cttmp, sizeof(cttmp), "%s","BIZ5");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ6: {
if(propactive[playerid] == 0) {
biznum[playerid] = 6;
format(cttmp, sizeof(cttmp), "%s","BIZ6");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ7: {
if(propactive[playerid] == 0) {
biznum[playerid] = 7;
format(cttmp, sizeof(cttmp), "%s","BIZ7");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ8: {
if(propactive[playerid] == 0) {
biznum[playerid] = 8;
format(cttmp, sizeof(cttmp), "%s","BIZ8");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ9: {
if(propactive[playerid] == 0) {
biznum[playerid] = 9;
format(cttmp, sizeof(cttmp), "%s","BIZ9");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ10: {
if(propactive[playerid] == 0) {
biznum[playerid] = 10;
format(cttmp, sizeof(cttmp), "%s","BIZ10");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ11: {
if(propactive[playerid] == 0) {
biznum[playerid] = 11;
format(cttmp, sizeof(cttmp), "%s","BIZ11");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ12: {
if(propactive[playerid] == 0) {
biznum[playerid] = 12;
format(cttmp, sizeof(cttmp), "%s","BIZ12");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ13: {
if(propactive[playerid] == 0) {
biznum[playerid] = 13;
format(cttmp, sizeof(cttmp), "%s","BIZ13");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ14: {
if(propactive[playerid] == 0) {
biznum[playerid] = 14;
format(cttmp, sizeof(cttmp), "%s","BIZ14");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ15: {
if(propactive[playerid] == 0) {
biznum[playerid] = 15;
format(cttmp, sizeof(cttmp), "%s","BIZ15");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ16: {
if(propactive[playerid] == 0) {
biznum[playerid] = 16;
format(cttmp, sizeof(cttmp), "%s","BIZ16");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ17: {
if(propactive[playerid] == 0) {
biznum[playerid] = 17;
format(cttmp, sizeof(cttmp), "%s","BIZ17");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ18: {
if(propactive[playerid] == 0) {
biznum[playerid] = 18;
format(cttmp, sizeof(cttmp), "%s","BIZ18");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ19: {
if(propactive[playerid] == 0) {
biznum[playerid] = 19;
format(cttmp, sizeof(cttmp), "%s","BIZ19");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ20: {
if(propactive[playerid] == 0) {
biznum[playerid] = 20;
format(cttmp, sizeof(cttmp), "%s","BIZ20");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}case BIZ21: {
if(propactive[playerid] == 0) {
biznum[playerid] = 21;
format(cttmp, sizeof(cttmp), "%s","BIZ21");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ22: {
if(propactive[playerid] == 0) {
biznum[playerid] = 22;
format(cttmp, sizeof(cttmp), "%s","BIZ22");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ23: {
if(propactive[playerid] == 0) {
biznum[playerid] = 23;
format(cttmp, sizeof(cttmp), "%s","BIZ23");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ24: {
if(propactive[playerid] == 0) {
biznum[playerid] = 24;
format(cttmp, sizeof(cttmp), "%s","BIZ24");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ25: {
if(propactive[playerid] == 0) {
biznum[playerid] = 25;
format(cttmp, sizeof(cttmp), "%s","BIZ25");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ26: {
if(propactive[playerid] == 0) {
biznum[playerid] = 26;
format(cttmp, sizeof(cttmp), "%s","BIZ26");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ27: {
if(propactive[playerid] == 0) {
biznum[playerid] = 27;
format(cttmp, sizeof(cttmp), "%s","BIZ27");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ28: {
if(propactive[playerid] == 0) {
biznum[playerid] = 28;
format(cttmp, sizeof(cttmp), "%s","BIZ28");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ29: {
if(propactive[playerid] == 0) {
biznum[playerid] = 29;
format(cttmp, sizeof(cttmp), "%s","BIZ29");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ30: {
if(propactive[playerid] == 0) {
biznum[playerid] = 30;
format(cttmp, sizeof(cttmp), "%s","BIZ30");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}case BIZ31: {
if(propactive[playerid] == 0) {
biznum[playerid] = 31;
format(cttmp, sizeof(cttmp), "%s","BIZ31");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ32: {
if(propactive[playerid] == 0) {
biznum[playerid] = 32;
format(cttmp, sizeof(cttmp), "%s","BIZ32");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ33: {
if(propactive[playerid] == 0) {
biznum[playerid] = 33;
format(cttmp, sizeof(cttmp), "%s","BIZ33");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ34: {
if(propactive[playerid] == 0) {
biznum[playerid] = 34;
format(cttmp, sizeof(cttmp), "%s","BIZ34");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ35: {
if(propactive[playerid] == 0) {
biznum[playerid] = 35;
format(cttmp, sizeof(cttmp), "%s","BIZ35");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ36: {
if(propactive[playerid] == 0) {
biznum[playerid] = 36;
format(cttmp, sizeof(cttmp), "%s","BIZ36");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ37: {
if(propactive[playerid] == 0) {
biznum[playerid] = 37;
format(cttmp, sizeof(cttmp), "%s","BIZ37");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ38: {
if(propactive[playerid] == 0) {
biznum[playerid] = 38;
format(cttmp, sizeof(cttmp), "%s","BIZ38");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ39: {
if(propactive[playerid] == 0) {
biznum[playerid] = 39;
format(cttmp, sizeof(cttmp), "%s","BIZ39");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ40: {
if(propactive[playerid] == 0) {
biznum[playerid] = 40;
format(cttmp, sizeof(cttmp), "%s","BIZ40");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}case BIZ41: {
if(propactive[playerid] == 0) {
biznum[playerid] = 41;
format(cttmp, sizeof(cttmp), "%s","BIZ41");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ42: {
if(propactive[playerid] == 0) {
biznum[playerid] = 42;
format(cttmp, sizeof(cttmp), "%s","BIZ42");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ43: {
if(propactive[playerid] == 0) {
biznum[playerid] = 43;
format(cttmp, sizeof(cttmp), "%s","BIZ43");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ44: {
if(propactive[playerid] == 0) {
biznum[playerid] = 44;
format(cttmp, sizeof(cttmp), "%s","BIZ44");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ45: {
if(propactive[playerid] == 0) {
biznum[playerid] = 45;
format(cttmp, sizeof(cttmp), "%s","BIZ45");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ46: {
if(propactive[playerid] == 0) {
biznum[playerid] = 46;
format(cttmp, sizeof(cttmp), "%s","BIZ46");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ47: {
if(propactive[playerid] == 0) {
biznum[playerid] = 47;
format(cttmp, sizeof(cttmp), "%s","BIZ47");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ48: {
if(propactive[playerid] == 0) {
biznum[playerid] = 48;
format(cttmp, sizeof(cttmp), "%s","BIZ48");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ49: {
if(propactive[playerid] == 0) {
biznum[playerid] = 49;
format(cttmp, sizeof(cttmp), "%s","BIZ49");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ50: {
if(propactive[playerid] == 0) {
biznum[playerid] = 50;
format(cttmp, sizeof(cttmp), "%s","BIZ50");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}case BIZ51: {
if(propactive[playerid] == 0) {
biznum[playerid] = 51;
format(cttmp, sizeof(cttmp), "%s","BIZ51");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ52: {
if(propactive[playerid] == 0) {
biznum[playerid] = 52;
format(cttmp, sizeof(cttmp), "%s","BIZ52");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ53: {
if(propactive[playerid] == 0) {
biznum[playerid] = 53;
format(cttmp, sizeof(cttmp), "%s","BIZ53");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ54: {
if(propactive[playerid] == 0) {
biznum[playerid] = 54;
format(cttmp, sizeof(cttmp), "%s","BIZ54");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ55: {
if(propactive[playerid] == 0) {
biznum[playerid] = 55;
format(cttmp, sizeof(cttmp), "%s","BIZ55");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ56: {
if(propactive[playerid] == 0) {
biznum[playerid] = 56;
format(cttmp, sizeof(cttmp), "%s","BIZ56");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ57: {
if(propactive[playerid] == 0) {
biznum[playerid] = 57;
format(cttmp, sizeof(cttmp), "%s","BIZ57");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ58:
{
if(propactive[playerid] == 0) {
biznum[playerid] = 58;
format(cttmp, sizeof(cttmp), "%s","BIZ58");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ59: {
if(propactive[playerid] == 0) {
biznum[playerid] = 59;
format(cttmp, sizeof(cttmp), "%s","BIZ59");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
case BIZ60: {
if(propactive[playerid] == 0) {
biznum[playerid] = 60;
format(cttmp, sizeof(cttmp), "%s","BIZ60");
ownername = dini_Get(cttmp,"owner");
GetPlayerName(playerid, playernameh, MAX_PLAYER_NAME);
propcost[playerid] = dini_Int(cttmp,"propcost");
propowned[playerid] = dini_Int(cttmp,"bought");
profit[playerid] = dini_Int(cttmp,"profit");
propactive[playerid] = 1;
if(strcmp(ownername,server,false) == 0)
{
bizbuyable[playerid] = dini_Int(cttmp,"buybar");
if(bizbuyable[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "This business has been set as un-buyable by server administration!");
return 1;
}
format(propmess,sizeof(propmess),"This business is currently vacant and can be purchased for $%d by typing /buybiz. This business earns $%d every 5 minutes", propcost[playerid],profit[playerid]);
buyable[playerid] = 1;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,propmess);
return 1;
}
if(strcmp(ownername,playernameh,false) == 0) {
format(propmess,sizeof(propmess),"Welcome back to your business, %s. Type /getprofit to collect the earnings your business has made since your last collection.", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,propmess);
return 1;
}
else {
format(propmess,sizeof(propmess),"This business belongs to %s, and is not for sale!", ownername);
buyable[playerid] = 0;
allowprofit[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,propmess);
return 1;
}
}
}
}
return 0;
}
//===============================On Enter Vehicle===============================
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
speedo[playerid] = 1;
for(new d=0; d<3; d++) {
if(gVehicleClass[playerid] == pbike[d][0]) {
speedo[playerid] = 2;
}
}
new filename[256];
format(filename, sizeof(filename), "%d", vehicleid);
carname = dini_Get(filename, "carname");
new val1[256];
new playername[MAX_PLAYER_NAME];
dini_IntSet(filename, "used", 1);
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
val1 = dini_Get(filename, "owner");
secure[playerid] = dini_Int(filename, "secure");
new tmp[256];
tmp[playerid] = ispassenger;
passenger[playerid] = ispassenger;
currentvehicle[playerid] = GetPlayerVehicleID(playerid);
if(tmp[playerid] == 0)
{
format(filename, sizeof(filename), "%d", vehicleid);
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
new tmp1[256];
tmp1 = dini_Get(filename, "owner");
carbuyable[playerid] = dini_Int(filename, "buybar");
if (strcmp(tmp1,playername,false) == 0)
{
new string[256];
carcost[playerid] = dini_Int(filename, "carcost");
format(string, sizeof(string), "Benvenuto sul tuo %s %s, fatti una bella guidata!", carname, tmp1);
SendClientMessage(playerid, COLOR_GREEN, string);
ignition[playerid] = 1;
return 1;
}
if (strcmp(tmp1,server,false) == 0 && logged[playerid] == 1) {
if(carbuyable[playerid] == 1)
{
new string[256];
format(string,sizeof(string),"Questo %s è impostato come nn vendibile dall admin del server!",carname);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
return 1;
}
new string[256];
carcost[playerid] = dini_Int(filename, "carcost");
format(string, sizeof(string), "Quest %s costa $%d, fai /buycar per comprare il veicolo (se hai soldi) NN SI FA CREDITO A NESSUNO!!!",carname, carcost[playerid]);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
if (strcmp(tmp1,server,false) == 0 && logged[playerid] == 0)
{
if(carbuyable[playerid] == 1)
{
new string[256];
format(string,sizeof(string),"Questo %s è impostato come nn vendibile dall amministratore del server!",carname);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
return 1;
}
new string[256];
carcost[playerid] = dini_Int(filename, "carcost");
format(string, sizeof(string), "Questo %s è in vendita, costa $%d, per comprarla ti devi loggare.", carname, carcost[playerid]);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
return 1;
}
else
{
new string[256];
carcost[playerid] = dini_Int(filename, "carcost");
format(string, sizeof(string), "Questo %s appartiene a %s, nn puo essere comprato idiota.", carname, tmp1);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
return 1;
}
}
return 1;
}
//==============================Checkpoint Update===============================
public checkpointUpdate()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) {
for(new j=0; j < MAX_POINTS; j++) {
if(isPlayerInArea(i, checkCoords[j])) {
if(playerCheckpoint[i]!= j) {
DisablePlayerCheckpoint(i);
SetPlayerCheckpoint(i, checkpoints[j][0],checkpoints[j][1],checkpoints[j][2],checkpoints[j][3]);
playerCheckpoint[i] = j;
}
} else {
if(playerCheckpoint[i]==j) {
DisablePlayerCheckpoint(i);
playerCheckpoint[i] = 999;
}
}
}
}
}
}
//==============================Is Player in Area===============================
public isPlayerInArea(playerID, Float:data[4])
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerID, X, Y, Z);
if(X >= data[0] && X <= data[2] && Y >= data[1] && Y <= data[3]) {
return 1;
}
return 0;
}
//=============================Gamemode Exit Stuff==============================
public GameModeExitFunc()
{
GameModeExit();
return 1;
}
public GetPlayers() //By rapidZ
{
new i;
new player;
player = 0;
for (i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
player++;
}
}
return player;
}