Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Most Wanted Cops&Robbers - Private Version
- Started scripting: 20 January 2012 - Dialogs used: 1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,23,25,26,27,28,30,31,32,33,34,35
- Max Wanted Level: 10.
- Max Players HP/Armour: 90.
- Max Vehicles Health: 970.
- Admin Level For CMDS:
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- }
- VIP check:
- if(PlayerInfo[playerid][pVip] == 1)
- {
- }
- IRC COLOR:
- 4
- */
- //------INCLUDES------//
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- #include <streamer>
- #include <gl_common>
- #include <irc>
- #define MODE_NAME "Most Wanted Cops&Robbers"
- #include <YSI\y_ini>
- #include <YSI\y_hooks>
- //------INCLUDES------//
- //------IRC INCLUDES------//
- #define BOT_1_NICKNAME "MostWantedBot1"
- #define BOT_1_REALNAME "mw1"
- #define BOT_1_USERNAME "boot1"
- #define BOT_2_NICKNAME "MostWantedBot2"
- #define BOT_2_REALNAME "mw2"
- #define BOT_2_USERNAME "boot2"
- #define BOT_3_NICKNAME "MostWantedBot3"
- #define BOT_3_REALNAME "mw3"
- #define BOT_3_USERNAME "boot3"
- #define BOT_4_NICKNAME "MostWantedBot4"
- #define BOT_4_REALNAME "mw4"
- #define BOT_4_USERNAME "boot4"
- #define BOT_5_NICKNAME "MostWantedBot5"
- #define BOT_5_REALNAME "mw5"
- #define BOT_5_USERNAME "boot5"
- #define IRC_SERVER "irc.tl"
- #define IRC_PORT (6667)
- #define IRC_CHANNEL "#mw.echo"
- #define IRC_CHATCHANNEL "#mw.chat"
- #define MAX_BOTS (5)
- #define PLUGIN_VERSION "1.4.2"
- //------IRC INCLUDES------//
- //DIALOGS//
- #define DIALOG_REGISTER 10
- #define DIALOG_LOGIN 11
- #define DIALOG_SUCCESS_1 12
- #define DIALOG_SUCCESS_2 13
- #define DIALOG_CHANGEPASS 33
- #define DIALOG_247 34
- #define RULES 35
- //DIALOGS//
- //HOOKS//
- Hook:damm_OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- if(newinteriorid == 1 || newinteriorid == 7 || newinteriorid == 4 || newinteriorid == 6) SetTimerEx("disable_shop", 1000, 0, "i", playerid);
- return 1;
- }
- //HOOKS//
- //------DEFINES------//
- #define PATH "/Users/%s.ini"
- #define IP_LIMIT 3
- #define SAME_IP_CONNECT 3
- #define Time_Limit 1000
- #define VEHICLE_DMG_DEFAULT 25.0
- #define VEHICLE_DMG_COLT45 50.0
- #define VEHICLE_DMG_SILENCED 50.0
- #define VEHICLE_DMG_DEAGLE 75.0
- #define VEHICLE_DMG_SHOTGUN 75.0
- #define VEHICLE_DMG_SAWEDOFF 78.0
- #define VEHICLE_DMG_SHOTGSPA 80.0
- #define VEHICLE_DMG_UZI 35.0
- #define VEHICLE_DMG_MP5 60.0
- #define VEHICLE_DMG_AK47 80.0
- #define VEHICLE_DMG_M4 80.0
- #define VEHICLE_DMG_TEC9 40.0
- #define VEHICLE_DMG_RIFLE 75.0
- #define VEHICLE_DMG_ROCKETLAUNCHER 150.0
- #define VEHICLE_DMG_HEATSEEKER 150.0
- #define VEHICLE_DMG_MINIGUN 200.0
- #define DecreaseVehHP(%1) if (vhp > %1) SetVehicleHealth(vehicleid, vhp - %1)
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- #define SpamLimit (3000)
- #undef MAX_PLAYERS
- #define MAX_PLAYERS (48)
- #define COLOR_GREEN 0x33AA3355
- #define brown 0x993300AA
- #define black 0x00000000
- #define nerotrasp 0x00000050
- #define grey 0xAFAFAFAA
- #define greywhite 0xEEEEFFC4
- #define COLOR_WHITE 0xFFFFFFAA
- #define yellow 0xFFFF00AA
- #define orange 0xFF9900AA
- #define red 0xFF0000AA
- #define darkred 0x660000AA
- #define lightred 0xFF99AADD
- #define pink 0xFF66FFAA
- #define violet 0x9955DEEE
- #define violet2 0x800080AA
- #define COLOR_BLUE 0x4169FFAA
- #define neutralblue 0xABCDEF01
- #define mediumblue 0x63AFF00A
- #define blue 0x0000BBAA
- #define darkblue 0x300FFAAB
- #define lightbluegreen 0x0FFDD349
- #define darkgreen 0x12900BBF
- #define green 0x33AA33AA
- #define neutralgreen 0x81CFAB00
- #define lightgreen 0x24FF0AB9
- #define COLOR_DARKGOLD 0x808000AA
- #define COLOR_RED 0xFF0000AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define ADMIN_RED 0xFB0000FF
- #define COLOR_ORANGE 0xFFA500AA
- #define COL_WHITE "{FFFFFF}"
- #define COL_RED "{F81414}"
- #define COL_GREEN "{00FF22}"
- #define COL_LIGHTBLUE "{00CED1}"
- #define PAY_SPRAY
- #define BARBER
- #define PIZZA
- #define BURGER
- #define CLUCKIN
- #define TATTOO
- #define CLOTHES
- #define AMMUNATION
- //------DEFINES------//
- //----TEAMS----//
- #define TEAM_COP 1
- #define TEAM_CIV 2
- //----TEAMS----//
- AntiDeAMX()
- {
- new a[][] =
- {
- "Unarmed (Fist)",
- "Brass K"
- };
- #pragma unused a
- }
- //---ROB FORWARDS---//
- forward pBankRobTimer(playerid);
- forward pRobTimer(playerid);
- forward pApRobTimer(playerid);
- //---ROB FORWARDS---//
- //---ROB NEWS---//
- new pRobCount[MAX_PLAYERS];
- new pRobTimerID[MAX_PLAYERS];
- new robmoney[MAX_PLAYERS];
- new pBankRobCount[MAX_PLAYERS];
- new pBankRobTimerID[MAX_PLAYERS];
- new bankrobmoney[MAX_PLAYERS];
- new pApRobCount[MAX_PLAYERS];
- new pApRobTimerID[MAX_PLAYERS];
- new aprobmoney[MAX_PLAYERS];
- //---ROB NEWS---//
- //---FORWARDS----//
- forward update_zones();
- forward UpdateTimeAndWeather();
- forward SaveAllStats();
- forward TimeU();
- forward pJailTimer(playerid);
- forward disable_shop(playerid);
- forward LoadUser_data(playerid,name[],value[]);
- forward LoadServer_data(value[]);
- forward WantedLevelReduce();
- forward GetClosePlayerToPlayer(playerid);
- forward MedFeesTimer(playerid);
- forward ResetCount(playerid);
- forward ResetCommandCount(playerid);
- forward WantedLvlSpeed();
- forward SendMessageToAdmins(color,const string[]);
- forward HealthWantedTimer();
- forward HideDescriptionText(playerid);
- forward RandomMsg();
- forward InfoUpdate(playerid);
- forward WantedColor(playerid);
- //----FORWARDS----//
- //----LOGS FORWARDS----//
- forward AcLog(string[]);
- forward RobberyLog(string[]);
- forward PmLog(string[]);
- forward BanLog(string[]);
- forward KickLog(string[]);
- forward GMLog(string[]);
- forward ReportLog(string[]);
- forward AdminChatLog(string[]);
- forward GetAllLog(string[]);
- forward ForceRecLog(string[]);
- forward JoinsLog(string[]);
- forward RconLog(string[]);
- forward BugLog(string[]);
- forward IrcChat(string[]);
- forward GDLog(string[]);
- forward FineLog(string[]);
- //----LOGS FORWARDS----//
- //-----ENUMS----//
- enum pInfo
- {
- pPass,
- pCash,
- pAdmin,
- pKills,
- pDeaths,
- pWantedLevel,
- pVip,
- pScore,
- pCondoms,
- pBanned,
- pJailed,
- pDrug,
- pNopm,
- pBank,
- pSausage,
- pPassChange,
- pMuted
- }
- enum specreturn
- {
- Float:retx,
- Float:rety,
- Float:retz,
- Float:retang,
- retint,
- retworld
- };
- enum zoneinfo {
- zone_name[27],
- Float:zone_minx,
- Float:zone_miny,
- Float:zone_minz,
- Float:zone_maxx,
- Float:zone_maxy,
- Float:zone_maxz
- }
- enum Chars
- {
- ID,
- Float:X,
- Float:Y,
- Float:Z
- }
- //----ENUMS----//
- //---TEXTDRAWS---//
- new Text:LocationTD[MAX_PLAYERS];
- new Text:WantedLvlTxd[MAX_PLAYERS];
- new Text:DrugTxd[MAX_PLAYERS];
- new Text:DollarTxd;
- new Text:CopsRules0;
- new Text:CopsRules1;
- new Text:CopsRules2;
- new Text:CopsRules3;
- new Text:CopsRules4;
- //---TEXTDRAWS---//
- //---PICKUPS---//
- new BankPickup;
- new PdEnter;
- new PdExit;
- new VentiQuattroSetteEnter;
- new SupaSaveEnter;
- new SupaSaveExit;
- new HippyShopEnter;
- new XoomerEnter;
- //---PICKUPS---//
- //---JOBS---//
- //---JOBS---//
- //---SERVER STATS---//
- //---SERVER STATS---//
- //---NEWS---//
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new Same_IP=0,Join_Stamp,ban_s[25],exceed=0;
- new s_pos[MAX_PLAYERS][specreturn];
- new zoneupdates[MAX_PLAYERS];
- new player_zone[MAX_PLAYERS];
- new zoneupdate;
- new Text:Servt; //Server Time Text draw Variable
- new Tsec; //stores the mins of time
- new THrs; //stores hours of time
- new pJailTimerID[MAX_PLAYERS];
- new gTeam[MAX_PLAYERS];
- new pJailCount[MAX_PLAYERS];
- new XDeaths[MAX_PLAYERS];
- new LastDeath[MAX_PLAYERS];
- new Text:DescriptionText[MAX_PLAYERS];
- new DescriptionTimer[MAX_PLAYERS];
- new cpcount=0;
- // Makabos zones script // ALWAYS ADD NEW ZONES TO THE END (YOULL MESS UP ALL ROBBERIES)
- new Float:zones[][zoneinfo] = {
- { "Supa Save (Int)", -11.0048, -31.3442, 1003.5494, 8.3204, -2.7050, 50.00},
- { "Army Base", -1546.4114, 260.0058, 7.1797, -1222.0865, 521.8784, 50.00},
- { "SFPD (Int)", 214.0158, 107.4454, 999.0156, 278.4889, 127.9651, 50.00},
- { "FBI HQ (Int)", 217.2494, 62.7068, 1001.0391, 270.0461, 92.4821, 50.00},
- { "CIA HQ", -1336.4915, 705.7386, 6.6299, -1182.2593, 823.7599, 200.00},
- { "CIA HQ (Int)", 188.1787, 138.6903, 1003.0234, 301.7826, 197.7743, 50.00},
- { "The Big Ear", -410.00, 1403.30, -3.00, -137.90, 1681.20, 200.00},
- { "Aldea Malvada", -1372.10, 2498.50, 0.00, -1277.50, 2615.30, 200.00},
- { "Angel Pine", -2324.90, -2584.20, -6.10, -1964.20, -2212.10, 200.00},
- { "Arco del Oeste", -901.10, 2221.80, 0.00, -592.00, 2571.90, 200.00},
- { "Avispa Country Club", -2646.40, -355.40, 0.00, -2270.00, -222.50, 200.00},
- { "Avispa Country Club", -2831.80, -430.20, -6.10, -2646.40, -222.50, 200.00},
- { "Avispa Country Club", -2361.50, -417.10, 0.00, -2270.00, -355.40, 200.00},
- { "Avispa Country Club", -2667.80, -302.10, -28.80, -2646.40, -262.30, 71.10},
- { "Avispa Country Club", -2470.00, -355.40, 0.00, -2270.00, -318.40, 46.10},
- { "Avispa Country Club", -2550.00, -355.40, 0.00, -2470.00, -318.40, 39.70},
- { "Back o Beyond", -1166.90, -2641.10, 0.00, -321.70, -1856.00, 200.00},
- { "Battery Point", -2741.00, 1268.40, -4.50, -2533.00, 1490.40, 200.00},
- { "Bayside", -2741.00, 2175.10, 0.00, -2353.10, 2722.70, 200.00},
- { "Bayside Marina", -2353.10, 2275.70, 0.00, -2153.10, 2475.70, 200.00},
- { "Beacon Hill", -399.60, -1075.50, -1.40, -319.00, -977.50, 198.50},
- { "Blackfield", 964.30, 1203.20, -89.00, 1197.30, 1403.20, 110.90},
- { "Blackfield", 964.30, 1403.20, -89.00, 1197.30, 1726.20, 110.90},
- { "Blackfield Chapel", 1375.60, 596.30, -89.00, 1558.00, 823.20, 110.90},
- { "Blackfield Chapel", 1325.60, 596.30, -89.00, 1375.60, 795.00, 110.90},
- { "Blackfield Intersection", 1197.30, 1044.60, -89.00, 1277.00, 1163.30, 110.90},
- { "Blackfield Intersection", 1166.50, 795.00, -89.00, 1375.60, 1044.60, 110.90},
- { "Blackfield Intersection", 1277.00, 1044.60, -89.00, 1315.30, 1087.60, 110.90},
- { "Blackfield Intersection", 1375.60, 823.20, -89.00, 1457.30, 919.40, 110.90},
- { "Blueberry", 104.50, -220.10, 2.30, 349.60, 152.20, 200.00},
- { "Blueberry", 19.60, -404.10, 3.80, 349.60, -220.10, 200.00},
- { "Blueberry Acres", -319.60, -220.10, 0.00, 104.50, 293.30, 200.00},
- { "Calton Heights", -2274.10, 744.10, -6.10, -1982.30, 1358.90, 200.00},
- { "Chinatown", -2274.10, 578.30, -7.60, -2078.60, 744.10, 200.00},
- { "Commerce", 1323.90, -1842.20, -89.00, 1701.90, -1722.20, 110.90},
- { "Commerce", 1323.90, -1722.20, -89.00, 1440.90, -1577.50, 110.90},
- { "Commerce", 1370.80, -1577.50, -89.00, 1463.90, -1384.90, 110.90},
- { "Commerce", 1463.90, -1577.50, -89.00, 1667.90, -1430.80, 110.90},
- { "Commerce", 1583.50, -1722.20, -89.00, 1758.90, -1577.50, 110.90},
- { "Commerce", 1667.90, -1577.50, -89.00, 1812.60, -1430.80, 110.90},
- { "Conference Center", 1046.10, -1804.20, -89.00, 1323.90, -1722.20, 110.90},
- { "Conference Center", 1073.20, -1842.20, -89.00, 1323.90, -1804.20, 110.90},
- { "Cranberry Station", -2007.80, 56.30, 0.00, -1922.00, 224.70, 100.00},
- { "Class Selection", 942.5793, 0.2095, 1000.9295, 947.4127, 4.8616, 1000.9299},
- { "Creek", 2749.90, 1937.20, -89.00, 2921.60, 2669.70, 110.90},
- { "Dillimore", 580.70, -674.80, -9.50, 861.00, -404.70, 200.00},
- { "Doherty", -2270.00, -324.10, -0.00, -1794.90, -222.50, 200.00},
- { "Doherty", -2173.00, -222.50, -0.00, -1794.90, 265.20, 200.00},
- { "Downtown", -1982.30, 744.10, -6.10, -1871.70, 1274.20, 200.00},
- { "Downtown", -1871.70, 1176.40, -4.50, -1620.30, 1274.20, 200.00},
- { "Downtown", -1700.00, 744.20, -6.10, -1580.00, 1176.50, 200.00},
- { "Downtown", -1580.00, 744.20, -6.10, -1499.80, 1025.90, 200.00},
- { "Downtown", -2078.60, 578.30, -7.60, -1499.80, 744.20, 200.00},
- { "Downtown", -1993.20, 265.20, -9.10, -1794.90, 578.30, 200.00},
- { "Downtown Los Santos", 1463.90, -1430.80, -89.00, 1724.70, -1290.80, 110.90},
- { "Downtown Los Santos", 1724.70, -1430.80, -89.00, 1812.60, -1250.90, 110.90},
- { "Downtown Los Santos", 1463.90, -1290.80, -89.00, 1724.70, -1150.80, 110.90},
- { "Downtown Los Santos", 1370.80, -1384.90, -89.00, 1463.90, -1170.80, 110.90},
- { "Downtown Los Santos", 1724.70, -1250.90, -89.00, 1812.60, -1150.80, 110.90},
- { "Downtown Los Santos", 1370.80, -1170.80, -89.00, 1463.90, -1130.80, 110.90},
- { "Downtown Los Santos", 1378.30, -1130.80, -89.00, 1463.90, -1026.30, 110.90},
- { "Downtown Los Santos", 1391.00, -1026.30, -89.00, 1463.90, -926.90, 110.90},
- { "Downtown Los Santos", 1507.50, -1385.20, 110.90, 1582.50, -1325.30, 335.90},
- { "East Beach", 2632.80, -1852.80, -89.00, 2959.30, -1668.10, 110.90},
- { "East Beach", 2632.80, -1668.10, -89.00, 2747.70, -1393.40, 110.90},
- { "East Beach", 2747.70, -1668.10, -89.00, 2959.30, -1498.60, 110.90},
- { "East Beach", 2747.70, -1498.60, -89.00, 2959.30, -1120.00, 110.90},
- { "East Los Santos", 2421.00, -1628.50, -89.00, 2632.80, -1454.30, 110.90},
- { "East Los Santos", 2222.50, -1628.50, -89.00, 2421.00, -1494.00, 110.90},
- { "East Los Santos", 2266.20, -1494.00, -89.00, 2381.60, -1372.00, 110.90},
- { "East Los Santos", 2381.60, -1494.00, -89.00, 2421.00, -1454.30, 110.90},
- { "East Los Santos", 2281.40, -1372.00, -89.00, 2381.60, -1135.00, 110.90},
- { "East Los Santos", 2381.60, -1454.30, -89.00, 2462.10, -1135.00, 110.90},
- { "East Los Santos", 2462.10, -1454.30, -89.00, 2581.70, -1135.00, 110.90},
- { "Easter Basin", -1794.90, 249.90, -9.10, -1242.90, 578.30, 200.00},
- { "Easter Basin", -1794.90, -50.00, -0.00, -1499.80, 249.90, 200.00},
- { "Easter Bay Airport", -1499.80, -50.00, -0.00, -1242.90, 249.90, 200.00},
- { "Easter Bay Airport", -1794.90, -730.10, -3.00, -1213.90, -50.00, 200.00},
- { "Easter Bay Airport", -1213.90, -730.10, 0.00, -1132.80, -50.00, 200.00},
- { "Easter Bay Airport", -1242.90, -50.00, 0.00, -1213.90, 578.30, 200.00},
- { "Easter Bay Airport", -1213.90, -50.00, -4.50, -947.90, 578.30, 200.00},
- { "Easter Bay Airport", -1315.40, -405.30, 15.40, -1264.40, -209.50, 25.40},
- { "Easter Bay Airport", -1354.30, -287.30, 15.40, -1315.40, -209.50, 25.40},
- { "Easter Bay Airport", -1490.30, -209.50, 15.40, -1264.40, -148.30, 25.40},
- { "Easter Bay Chemicals", -1132.80, -768.00, 0.00, -956.40, -578.10, 200.00},
- { "Easter Bay Chemicals", -1132.80, -787.30, 0.00, -956.40, -768.00, 200.00},
- { "El Castillo del Diablo", -464.50, 2217.60, 0.00, -208.50, 2580.30, 200.00},
- { "El Castillo del Diablo", -208.50, 2123.00, -7.60, 114.00, 2337.10, 200.00},
- { "El Castillo del Diablo", -208.50, 2337.10, 0.00, 8.40, 2487.10, 200.00},
- { "El Corona", 1812.60, -2179.20, -89.00, 1970.60, -1852.80, 110.90},
- { "El Corona", 1692.60, -2179.20, -89.00, 1812.60, -1842.20, 110.90},
- { "El Quebrados", -1645.20, 2498.50, 0.00, -1372.10, 2777.80, 200.00},
- { "Esplanade East", -1620.30, 1176.50, -4.50, -1580.00, 1274.20, 200.00},
- { "Esplanade East", -1580.00, 1025.90, -6.10, -1499.80, 1274.20, 200.00},
- { "Esplanade East", -1499.80, 578.30, -79.60, -1339.80, 1274.20, 20.30},
- { "Esplanade North", -2533.00, 1358.90, -4.50, -1996.60, 1501.20, 200.00},
- { "Esplanade North", -1996.60, 1358.90, -4.50, -1524.20, 1592.50, 200.00},
- { "Esplanade North", -1982.30, 1274.20, -4.50, -1524.20, 1358.90, 200.00},
- { "Fallen Tree", -792.20, -698.50, -5.30, -452.40, -380.00, 200.00},
- { "Fallow Bridge", 434.30, 366.50, 0.00, 603.00, 555.60, 200.00},
- { "Fern Ridge", 508.10, -139.20, 0.00, 1306.60, 119.50, 200.00},
- { "Financial", -1871.70, 744.10, -6.10, -1701.30, 1176.40, 300.00},
- { "Fisher's Lagoon", 1916.90, -233.30, -100.00, 2131.70, 13.80, 200.00},
- { "Flint Intersection", -187.70, -1596.70, -89.00, 17.00, -1276.60, 110.90},
- { "Flint Range", -594.10, -1648.50, 0.00, -187.70, -1276.60, 200.00},
- { "Fort Carson", -376.20, 826.30, -3.00, 123.70, 1220.40, 200.00},
- { "Foster Valley", -2270.00, -430.20, -0.00, -2178.60, -324.10, 200.00},
- { "Foster Valley", -2178.60, -599.80, -0.00, -1794.90, -324.10, 200.00},
- { "Foster Valley", -2178.60, -1115.50, 0.00, -1794.90, -599.80, 200.00},
- { "Foster Valley", -2178.60, -1250.90, 0.00, -1794.90, -1115.50, 200.00},
- { "Frederick Bridge", 2759.20, 296.50, 0.00, 2774.20, 594.70, 200.00},
- { "Gant Bridge", -2741.40, 1659.60, -6.10, -2616.40, 2175.10, 200.00},
- { "Gant Bridge", -2741.00, 1490.40, -6.10, -2616.40, 1659.60, 200.00},
- { "Ganton", 2222.50, -1852.80, -89.00, 2632.80, -1722.30, 110.90},
- { "Ganton", 2222.50, -1722.30, -89.00, 2632.80, -1628.50, 110.90},
- { "Garcia", -2411.20, -222.50, -0.00, -2173.00, 265.20, 200.00},
- { "Garcia", -2395.10, -222.50, -5.30, -2354.00, -204.70, 200.00},
- { "Garver Bridge", -1339.80, 828.10, -89.00, -1213.90, 1057.00, 110.90},
- { "Garver Bridge", -1213.90, 950.00, -89.00, -1087.90, 1178.90, 110.90},
- { "Garver Bridge", -1499.80, 696.40, -179.60, -1339.80, 925.30, 20.30},
- { "Glen Park", 1812.60, -1449.60, -89.00, 1996.90, -1350.70, 110.90},
- { "Glen Park", 1812.60, -1100.80, -89.00, 1994.30, -973.30, 110.90},
- { "Glen Park", 1812.60, -1350.70, -89.00, 2056.80, -1100.80, 110.90},
- { "Green Palms", 176.50, 1305.40, -3.00, 338.60, 1520.70, 200.00},
- { "Greenglass College", 964.30, 1044.60, -89.00, 1197.30, 1203.20, 110.90},
- { "Greenglass College", 964.30, 930.80, -89.00, 1166.50, 1044.60, 110.90},
- { "Hampton Barns", 603.00, 264.30, 0.00, 761.90, 366.50, 200.00},
- { "Hankypanky Point", 2576.90, 62.10, 0.00, 2759.20, 385.50, 200.00},
- { "Harry Gold Parkway", 1777.30, 863.20, -89.00, 1817.30, 2342.80, 110.90},
- { "Hashbury", -2593.40, -222.50, -0.00, -2411.20, 54.70, 200.00},
- { "Hilltop Farm", 967.30, -450.30, -3.00, 1176.70, -217.90, 200.00},
- { "Hunter Quarry", 337.20, 710.80, -115.20, 860.50, 1031.70, 203.70},
- { "Idlewood", 1812.60, -1852.80, -89.00, 1971.60, -1742.30, 110.90},
- { "Idlewood", 1812.60, -1742.30, -89.00, 1951.60, -1602.30, 110.90},
- { "Idlewood", 1951.60, -1742.30, -89.00, 2124.60, -1602.30, 110.90},
- { "Idlewood", 1812.60, -1602.30, -89.00, 2124.60, -1449.60, 110.90},
- { "Idlewood", 2124.60, -1742.30, -89.00, 2222.50, -1494.00, 110.90},
- { "Idlewood", 1971.60, -1852.80, -89.00, 2222.50, -1742.30, 110.90},
- { "Jefferson", 1996.90, -1449.60, -89.00, 2056.80, -1350.70, 110.90},
- { "Jefferson", 2124.60, -1494.00, -89.00, 2266.20, -1449.60, 110.90},
- { "Jefferson", 2056.80, -1372.00, -89.00, 2281.40, -1210.70, 110.90},
- { "Jefferson", 2056.80, -1210.70, -89.00, 2185.30, -1126.30, 110.90},
- { "Jefferson", 2185.30, -1210.70, -89.00, 2281.40, -1154.50, 110.90},
- { "Jefferson", 2056.80, -1449.60, -89.00, 2266.20, -1372.00, 110.90},
- { "Julius Thruway East", 2623.10, 943.20, -89.00, 2749.90, 1055.90, 110.90},
- { "Julius Thruway East", 2685.10, 1055.90, -89.00, 2749.90, 2626.50, 110.90},
- { "Julius Thruway East", 2536.40, 2442.50, -89.00, 2685.10, 2542.50, 110.90},
- { "Julius Thruway East", 2625.10, 2202.70, -89.00, 2685.10, 2442.50, 110.90},
- { "Julius Thruway North", 2498.20, 2542.50, -89.00, 2685.10, 2626.50, 110.90},
- { "Julius Thruway North", 2237.40, 2542.50, -89.00, 2498.20, 2663.10, 110.90},
- { "Julius Thruway North", 2121.40, 2508.20, -89.00, 2237.40, 2663.10, 110.90},
- { "Julius Thruway North", 1938.80, 2508.20, -89.00, 2121.40, 2624.20, 110.90},
- { "Julius Thruway North", 1534.50, 2433.20, -89.00, 1848.40, 2583.20, 110.90},
- { "Julius Thruway North", 1848.40, 2478.40, -89.00, 1938.80, 2553.40, 110.90},
- { "Julius Thruway North", 1704.50, 2342.80, -89.00, 1848.40, 2433.20, 110.90},
- { "Julius Thruway North", 1377.30, 2433.20, -89.00, 1534.50, 2507.20, 110.90},
- { "Julius Thruway South", 1457.30, 823.20, -89.00, 2377.30, 863.20, 110.90},
- { "Julius Thruway South", 2377.30, 788.80, -89.00, 2537.30, 897.90, 110.90},
- { "Julius Thruway West", 1197.30, 1163.30, -89.00, 1236.60, 2243.20, 110.90},
- { "Julius Thruway West", 1236.60, 2142.80, -89.00, 1297.40, 2243.20, 110.90},
- { "Juniper Hill", -2533.00, 578.30, -7.60, -2274.10, 968.30, 200.00},
- { "Juniper Hollow", -2533.00, 968.30, -6.10, -2274.10, 1358.90, 200.00},
- { "K.A.C.C. Military Fuels", 2498.20, 2626.50, -89.00, 2749.90, 2861.50, 110.90},
- { "Kincaid Bridge", -1339.80, 599.20, -89.00, -1213.90, 828.10, 110.90},
- { "Kincaid Bridge", -1213.90, 721.10, -89.00, -1087.90, 950.00, 110.90},
- { "Kincaid Bridge", -1087.90, 855.30, -89.00, -961.90, 986.20, 110.90},
- { "King's", -2329.30, 458.40, -7.60, -1993.20, 578.30, 200.00},
- { "King's", -2411.20, 265.20, -9.10, -1993.20, 373.50, 200.00},
- { "King's", -2253.50, 373.50, -9.10, -1993.20, 458.40, 200.00},
- { "LVA Freight Depot", 1457.30, 863.20, -89.00, 1777.40, 1143.20, 110.90},
- { "LVA Freight Depot", 1375.60, 919.40, -89.00, 1457.30, 1203.20, 110.90},
- { "LVA Freight Depot", 1277.00, 1087.60, -89.00, 1375.60, 1203.20, 110.90},
- { "LVA Freight Depot", 1315.30, 1044.60, -89.00, 1375.60, 1087.60, 110.90},
- { "LVA Freight Depot", 1236.60, 1163.40, -89.00, 1277.00, 1203.20, 110.90},
- { "Las Barrancas", -926.10, 1398.70, -3.00, -719.20, 1634.60, 200.00},
- { "Las Brujas", -365.10, 2123.00, -3.00, -208.50, 2217.60, 200.00},
- { "Las Colinas", 1994.30, -1100.80, -89.00, 2056.80, -920.80, 110.90},
- { "Las Colinas", 2056.80, -1126.30, -89.00, 2126.80, -920.80, 110.90},
- { "Las Colinas", 2185.30, -1154.50, -89.00, 2281.40, -934.40, 110.90},
- { "Las Colinas", 2126.80, -1126.30, -89.00, 2185.30, -934.40, 110.90},
- { "Las Colinas", 2747.70, -1120.00, -89.00, 2959.30, -945.00, 110.90},
- { "Las Colinas", 2632.70, -1135.00, -89.00, 2747.70, -945.00, 110.90},
- { "Las Colinas", 2281.40, -1135.00, -89.00, 2632.70, -945.00, 110.90},
- { "Las Payasadas", -354.30, 2580.30, 2.00, -133.60, 2816.80, 200.00},
- { "Las Venturas Airport", 1236.60, 1203.20, -89.00, 1457.30, 1883.10, 110.90},
- { "Las Venturas Airport", 1457.30, 1203.20, -89.00, 1777.30, 1883.10, 110.90},
- { "Las Venturas Airport", 1457.30, 1143.20, -89.00, 1777.40, 1203.20, 110.90},
- { "Las Venturas Airport", 1515.80, 1586.40, -12.50, 1729.90, 1714.50, 87.50},
- { "Last Dime Motel", 1823.00, 596.30, -89.00, 1997.20, 823.20, 110.90},
- { "Leafy Hollow", -1166.90, -1856.00, 0.00, -815.60, -1602.00, 200.00},
- { "Lil' Probe Inn", -90.20, 1286.80, -3.00, 153.80, 1554.10, 200.00},
- { "Linden Side", 2749.90, 943.20, -89.00, 2923.30, 1198.90, 110.90},
- { "Linden Station", 2749.90, 1198.90, -89.00, 2923.30, 1548.90, 110.90},
- { "Linden Station", 2811.20, 1229.50, -39.50, 2861.20, 1407.50, 60.40},
- { "Little Mexico", 1701.90, -1842.20, -89.00, 1812.60, -1722.20, 110.90},
- { "Little Mexico", 1758.90, -1722.20, -89.00, 1812.60, -1577.50, 110.90},
- { "Los Flores", 2581.70, -1454.30, -89.00, 2632.80, -1393.40, 110.90},
- { "Los Flores", 2581.70, -1393.40, -89.00, 2747.70, -1135.00, 110.90},
- { "Los Santos International", 1249.60, -2394.30, -89.00, 1852.00, -2179.20, 110.90},
- { "Los Santos International", 1852.00, -2394.30, -89.00, 2089.00, -2179.20, 110.90},
- { "Los Santos International", 1382.70, -2730.80, -89.00, 2201.80, -2394.30, 110.90},
- { "Los Santos International", 1974.60, -2394.30, -39.00, 2089.00, -2256.50, 60.90},
- { "Los Santos International", 1400.90, -2669.20, -39.00, 2189.80, -2597.20, 60.90},
- { "Los Santos International", 2051.60, -2597.20, -39.00, 2152.40, -2394.30, 60.90},
- { "Marina", 647.70, -1804.20, -89.00, 851.40, -1577.50, 110.90},
- { "Marina", 647.70, -1577.50, -89.00, 807.90, -1416.20, 110.90},
- { "Marina", 807.90, -1577.50, -89.00, 926.90, -1416.20, 110.90},
- { "Market", 787.40, -1416.20, -89.00, 1072.60, -1310.20, 110.90},
- { "Market", 952.60, -1310.20, -89.00, 1072.60, -1130.80, 110.90},
- { "Market", 1072.60, -1416.20, -89.00, 1370.80, -1130.80, 110.90},
- { "Market", 926.90, -1577.50, -89.00, 1370.80, -1416.20, 110.90},
- { "Market Station", 787.40, -1410.90, -34.10, 866.00, -1310.20, 65.80},
- { "Martin Bridge", -222.10, 293.30, 0.00, -122.10, 476.40, 200.00},
- { "Missionary Hill", -2994.40, -811.20, 0.00, -2178.60, -430.20, 200.00},
- { "Montgomery", 1119.50, 119.50, -3.00, 1451.40, 493.30, 200.00},
- { "Montgomery", 1451.40, 347.40, -6.10, 1582.40, 420.80, 200.00},
- { "Montgomery Intersection", 1546.60, 208.10, 0.00, 1745.80, 347.40, 200.00},
- { "Montgomery Intersection", 1582.40, 347.40, 0.00, 1664.60, 401.70, 200.00},
- { "Mulholland", 1414.00, -768.00, -89.00, 1667.60, -452.40, 110.90},
- { "Mulholland", 1281.10, -452.40, -89.00, 1641.10, -290.90, 110.90},
- { "Mulholland", 1269.10, -768.00, -89.00, 1414.00, -452.40, 110.90},
- { "Mulholland", 1357.00, -926.90, -89.00, 1463.90, -768.00, 110.90},
- { "Mulholland", 1318.10, -910.10, -89.00, 1357.00, -768.00, 110.90},
- { "Mulholland", 1169.10, -910.10, -89.00, 1318.10, -768.00, 110.90},
- { "Mulholland", 768.60, -954.60, -89.00, 952.60, -860.60, 110.90},
- { "Mulholland", 687.80, -860.60, -89.00, 911.80, -768.00, 110.90},
- { "Mulholland", 737.50, -768.00, -89.00, 1142.20, -674.80, 110.90},
- { "Mulholland", 1096.40, -910.10, -89.00, 1169.10, -768.00, 110.90},
- { "Mulholland", 952.60, -937.10, -89.00, 1096.40, -860.60, 110.90},
- { "Mulholland", 911.80, -860.60, -89.00, 1096.40, -768.00, 110.90},
- { "Mulholland", 861.00, -674.80, -89.00, 1156.50, -600.80, 110.90},
- { "Mulholland Intersection", 1463.90, -1150.80, -89.00, 1812.60, -768.00, 110.90},
- { "North Rock", 2285.30, -768.00, 0.00, 2770.50, -269.70, 200.00},
- { "Ocean Docks", 2373.70, -2697.00, -89.00, 2809.20, -2330.40, 110.90},
- { "Ocean Docks", 2201.80, -2418.30, -89.00, 2324.00, -2095.00, 110.90},
- { "Ocean Docks", 2324.00, -2302.30, -89.00, 2703.50, -2145.10, 110.90},
- { "Ocean Docks", 2089.00, -2394.30, -89.00, 2201.80, -2235.80, 110.90},
- { "Ocean Docks", 2201.80, -2730.80, -89.00, 2324.00, -2418.30, 110.90},
- { "Ocean Docks", 2703.50, -2302.30, -89.00, 2959.30, -2126.90, 110.90},
- { "Ocean Docks", 2324.00, -2145.10, -89.00, 2703.50, -2059.20, 110.90},
- { "Ocean Flats", -2994.40, 277.40, -9.10, -2867.80, 458.40, 200.00},
- { "Ocean Flats", -2994.40, -222.50, -0.00, -2593.40, 277.40, 200.00},
- { "Ocean Flats", -2994.40, -430.20, -0.00, -2831.80, -222.50, 200.00},
- { "Octane Springs", 338.60, 1228.50, 0.00, 664.30, 1655.00, 200.00},
- { "Old Venturas Strip", 2162.30, 2012.10, -89.00, 2685.10, 2202.70, 110.90},
- { "Palisades", -2994.40, 458.40, -6.10, -2741.00, 1339.60, 200.00},
- { "Paradiso", -2741.00, 793.40, -6.10, -2533.00, 1268.40, 200.00},
- { "Pershing Square", 1440.90, -1722.20, -89.00, 1583.50, -1577.50, 110.90},
- { "Pilgrim", 2437.30, 1383.20, -89.00, 2624.40, 1783.20, 110.90},
- { "Pilgrim", 2624.40, 1383.20, -89.00, 2685.10, 1783.20, 110.90},
- { "Pilson Intersection", 1098.30, 2243.20, -89.00, 1377.30, 2507.20, 110.90},
- { "Pirates in Men's Pants", 1817.30, 1469.20, -89.00, 2027.40, 1703.20, 110.90},
- { "Playa del Seville", 2703.50, -2126.90, -89.00, 2959.30, -1852.80, 110.90},
- { "Prickle Pine", 1534.50, 2583.20, -89.00, 1848.40, 2863.20, 110.90},
- { "Prickle Pine", 1117.40, 2507.20, -89.00, 1534.50, 2723.20, 110.90},
- { "Prickle Pine", 1848.40, 2553.40, -89.00, 1938.80, 2863.20, 110.90},
- { "Prickle Pine", 1938.80, 2624.20, -89.00, 2121.40, 2861.50, 110.90},
- { "Queens", -2533.00, 458.40, 0.00, -2329.30, 578.30, 200.00},
- { "Queens", -2593.40, 54.70, 0.00, -2411.20, 458.40, 200.00},
- { "Queens", -2411.20, 373.50, 0.00, -2253.50, 458.40, 200.00},
- { "Randolph Industrial Estate", 1558.00, 596.30, -89.00, 1823.00, 823.20, 110.90},
- { "Redsands East", 1817.30, 2011.80, -89.00, 2106.70, 2202.70, 110.90},
- { "Redsands East", 1817.30, 2202.70, -89.00, 2011.90, 2342.80, 110.90},
- { "Redsands East", 1848.40, 2342.80, -89.00, 2011.90, 2478.40, 110.90},
- { "Redsands West", 1236.60, 1883.10, -89.00, 1777.30, 2142.80, 110.90},
- { "Redsands West", 1297.40, 2142.80, -89.00, 1777.30, 2243.20, 110.90},
- { "Redsands West", 1377.30, 2243.20, -89.00, 1704.50, 2433.20, 110.90},
- { "Redsands West", 1704.50, 2243.20, -89.00, 1777.30, 2342.80, 110.90},
- { "Regular Tom", -405.70, 1712.80, -3.00, -276.70, 1892.70, 200.00},
- { "Richman", 647.50, -1118.20, -89.00, 787.40, -954.60, 110.90},
- { "Richman", 647.50, -954.60, -89.00, 768.60, -860.60, 110.90},
- { "Richman", 225.10, -1369.60, -89.00, 334.50, -1292.00, 110.90},
- { "Richman", 225.10, -1292.00, -89.00, 466.20, -1235.00, 110.90},
- { "Richman", 72.60, -1404.90, -89.00, 225.10, -1235.00, 110.90},
- { "Richman", 72.60, -1235.00, -89.00, 321.30, -1008.10, 110.90},
- { "Richman", 321.30, -1235.00, -89.00, 647.50, -1044.00, 110.90},
- { "Richman", 321.30, -1044.00, -89.00, 647.50, -860.60, 110.90},
- { "Richman", 321.30, -860.60, -89.00, 687.80, -768.00, 110.90},
- { "Richman", 321.30, -768.00, -89.00, 700.70, -674.80, 110.90},
- { "Robada Intersection", -1119.00, 1178.90, -89.00, -862.00, 1351.40, 110.90},
- { "Roca Escalante", 2237.40, 2202.70, -89.00, 2536.40, 2542.50, 110.90},
- { "Roca Escalante", 2536.40, 2202.70, -89.00, 2625.10, 2442.50, 110.90},
- { "Rockshore East", 2537.30, 676.50, -89.00, 2902.30, 943.20, 110.90},
- { "Rockshore West", 1997.20, 596.30, -89.00, 2377.30, 823.20, 110.90},
- { "Rockshore West", 2377.30, 596.30, -89.00, 2537.30, 788.80, 110.90},
- { "Rodeo", 72.60, -1684.60, -89.00, 225.10, -1544.10, 110.90},
- { "Rodeo", 72.60, -1544.10, -89.00, 225.10, -1404.90, 110.90},
- { "Rodeo", 225.10, -1684.60, -89.00, 312.80, -1501.90, 110.90},
- { "Rodeo", 225.10, -1501.90, -89.00, 334.50, -1369.60, 110.90},
- { "Rodeo", 334.50, -1501.90, -89.00, 422.60, -1406.00, 110.90},
- { "Rodeo", 312.80, -1684.60, -89.00, 422.60, -1501.90, 110.90},
- { "Rodeo", 422.60, -1684.60, -89.00, 558.00, -1570.20, 110.90},
- { "Rodeo", 558.00, -1684.60, -89.00, 647.50, -1384.90, 110.90},
- { "Rodeo", 466.20, -1570.20, -89.00, 558.00, -1385.00, 110.90},
- { "Rodeo", 422.60, -1570.20, -89.00, 466.20, -1406.00, 110.90},
- { "Rodeo", 466.20, -1385.00, -89.00, 647.50, -1235.00, 110.90},
- { "Rodeo", 334.50, -1406.00, -89.00, 466.20, -1292.00, 110.90},
- { "San Andreas Sound", 2450.30, 385.50, -100.00, 2759.20, 562.30, 200.00},
- { "Santa Flora", -2741.00, 458.40, -7.60, -2533.00, 793.40, 200.00},
- { "Santa Maria Beach", 342.60, -2173.20, -89.00, 647.70, -1684.60, 110.90},
- { "Santa Maria Beach", 72.60, -2173.20, -89.00, 342.60, -1684.60, 110.90},
- { "Shady Cabin", -1632.80, -2263.40, -3.00, -1601.30, -2231.70, 200.00},
- { "Shady Creeks", -1820.60, -2643.60, -8.00, -1226.70, -1771.60, 200.00},
- { "Shady Creeks", -2030.10, -2174.80, -6.10, -1820.60, -1771.60, 200.00},
- { "Sobell Rail Yards", 2749.90, 1548.90, -89.00, 2923.30, 1937.20, 110.90},
- { "Temple", 1252.30, -1130.80, -89.00, 1378.30, -1026.30, 110.90},
- { "Temple", 1252.30, -1026.30, -89.00, 1391.00, -926.90, 110.90},
- { "Temple", 1252.30, -926.90, -89.00, 1357.00, -910.10, 110.90},
- { "Temple", 952.60, -1130.80, -89.00, 1096.40, -937.10, 110.90},
- { "Temple", 1096.40, -1130.80, -89.00, 1252.30, -1026.30, 110.90},
- { "Temple", 1096.40, -1026.30, -89.00, 1252.30, -910.10, 110.90},
- { "The Emerald Isle", 2011.90, 2202.70, -89.00, 2237.40, 2508.20, 110.90},
- { "The Farm", -1209.60, -1317.10, 114.90, -908.10, -787.30, 251.90},
- { "The Mako Span", 1664.60, 401.70, 0.00, 1785.10, 567.20, 200.00},
- { "The Panopticon", -947.90, -304.30, -1.10, -319.60, 327.00, 200.00},
- { "The Sherman Dam", -968.70, 1929.40, -3.00, -481.10, 2155.20, 200.00},
- { "The Visage", 1817.30, 1863.20, -89.00, 2106.70, 2011.80, 110.90},
- { "The Visage", 1817.30, 1703.20, -89.00, 2027.40, 1863.20, 110.90},
- { "Unity Station", 1692.60, -1971.80, -20.40, 1812.60, -1932.80, 79.50},
- { "Valle Ocultado", -936.60, 2611.40, 2.00, -715.90, 2847.90, 200.00},
- { "Verdant Bluffs", 930.20, -2488.40, -89.00, 1249.60, -2006.70, 110.90},
- { "Verdant Bluffs", 1073.20, -2006.70, -89.00, 1249.60, -1842.20, 110.90},
- { "Verdant Bluffs", 1249.60, -2179.20, -89.00, 1692.60, -1842.20, 110.90},
- { "Verdant Meadows", 37.00, 2337.10, -3.00, 435.90, 2677.90, 200.00},
- { "Verona Beach", 647.70, -2173.20, -89.00, 930.20, -1804.20, 110.90},
- { "Verona Beach", 930.20, -2006.70, -89.00, 1073.20, -1804.20, 110.90},
- { "Verona Beach", 851.40, -1804.20, -89.00, 1046.10, -1577.50, 110.90},
- { "Verona Beach", 1161.50, -1722.20, -89.00, 1323.90, -1577.50, 110.90},
- { "Verona Beach", 1046.10, -1722.20, -89.00, 1161.50, -1577.50, 110.90},
- { "Vinewood", 787.40, -1310.20, -89.00, 952.60, -1130.80, 110.90},
- { "Vinewood", 787.40, -1130.80, -89.00, 952.60, -954.60, 110.90},
- { "Vinewood", 647.50, -1227.20, -89.00, 787.40, -1118.20, 110.90},
- { "Vinewood", 647.70, -1416.20, -89.00, 787.40, -1227.20, 110.90},
- { "Whitewood Estates", 883.30, 1726.20, -89.00, 1098.30, 2507.20, 110.90},
- { "Whitewood Estates", 1098.30, 1726.20, -89.00, 1197.30, 2243.20, 110.90},
- { "Willowfield", 1970.60, -2179.20, -89.00, 2089.00, -1852.80, 110.90},
- { "Willowfield", 2089.00, -2235.80, -89.00, 2201.80, -1989.90, 110.90},
- { "Willowfield", 2089.00, -1989.90, -89.00, 2324.00, -1852.80, 110.90},
- { "Willowfield", 2201.80, -2095.00, -89.00, 2324.00, -1989.90, 110.90},
- { "Willowfield", 2541.70, -1941.40, -89.00, 2703.50, -1852.80, 110.90},
- { "Willowfield", 2324.00, -2059.20, -89.00, 2541.70, -1852.80, 110.90},
- { "Willowfield", 2541.70, -2059.20, -89.00, 2703.50, -1941.40, 110.90},
- { "Yellow Bell Station", 1377.40, 2600.40, -21.90, 1492.40, 2687.30, 78.00},
- { "Los Santos", 44.60, -2892.90, -242.90, 2997.00, -768.00, 900.00},
- { "Bone County", -480.50, 596.30, -242.90, 869.40, 2993.80, 900.00},
- { "Tierra Robada", -2997.40, 1659.60, -242.90, -480.50, 2993.80, 900.00},
- { "Tierra Robada", -1213.90, 596.30, -242.90, -480.50, 1659.60, 900.00},
- { "Flint County", -1213.90, -2892.90, -242.90, 44.60, -768.00, 900.00},
- { "Whetstone", -2997.40, -2892.90, -242.90, -1213.90, -1115.50, 900.00}
- };
- new const stock Float:robberyPlaces[][10] = {
- {-1955.7682, 306.0241, 41.0471},
- {-2051.8413, 86.1440, 28.3977},
- {-2141.5591, -256.7738, 40.7195},
- {379.6270,-8.7878,1001.8516},
- {216.6623,-100.1878,1005.2578},
- {379.7124,-59.6829,1001.5078},
- {-2031.0654,-117.4350,1035.1719},
- {365.1240,-6.7055,1001.8516},
- {-201.7283,-7.8537,1002.2734},
- {296.7915,-35.3443,1001.5156},
- {203.6611,-40.2956,1001.8047}
- };
- new const stock Float:bankrobberyPlaces[][10] =
- {
- {-1955.7682, 306.0241, 41.0471}
- };
- new Float:RandomJailSpawns[4][4] = {
- {215.0879,110.2830,999.0156},
- {219.1756,109.4038,999.0156},
- {222.9073,110.0211,999.0156},
- {226.7357,110.1853,999.0156}
- };
- new IsRobbing[MAX_PLAYERS];
- new IsBankRobbing[MAX_PLAYERS];
- new IsApRobbing[MAX_PLAYERS];
- new CPs[12];
- new total_vehicles_from_files=0;
- new gBotID[MAX_BOTS], gGroupID;
- new bool:NoPm[MAX_PLAYERS];
- new bool:VipSet[MAX_PLAYERS];
- new bool:LockVeh[MAX_PLAYERS];
- new ireconnect[MAX_PLAYERS];
- new const Coords[][ Chars ] = {
- #if defined PAY_SPRAY
- {63,2067.4,-1831.2,13.5},
- {63,488.0,-1734.0,34.4},
- {63,720.016,-454.625,15.328},
- {63,-1420.547,2583.945,58.031},
- {63,1966.532,2162.65,10.995},
- {63,-2425.46,1020.83,49.39},
- {63,1021.8,-1018.7,30.9},
- {63,-1908.9,292.3,40.0},
- {63,-103.6,1112.4,18.7},
- {55,-1957.6978,290.5472,35.4688}, //Wang Cars
- {20,-2058.1631,79.5957,28.3906}, //Fire Dept
- {24,-2119.8987,-99.6119,35.3203}, //Drug Factory
- #endif
- #if defined BARBER
- {7,822.6,-1590.3,13.5},
- {7,-2570.1,245.4,10.3},
- {7,2726.6,-2026.4,17.5},
- {7,2080.3,2119.0,10.8},
- {7,675.7,-496.6,16.8},
- #endif
- #if defined PIZZA
- {29,-1805.7,943.2,24.8},
- {29,2750.9,2470.9,11.0},
- {29,2351.8,2529.0,10.8},
- {29,2635.5,1847.4,11.0},
- {29,2083.4,2221.0,11.0},
- {29,-1719.1,1359.4,8.6},
- {29,2330.2,75.2,31.0},
- {29,203.2,-200.4,6.5},
- #endif
- #if defined BURGER
- {10,812.9,-1616.1,13.6},
- {10,1199.1,-924.0,43.3},
- {10,2362.2,2069.9,10.8},
- {10,2469.5,2033.8,10.8},
- {10,2172.9,2795.7,10.8},
- {10,1875.3,2072.0,10.8},
- {10,1161.5,2072.0,10.8},
- {10,-2356.0,1009.0,49.0},
- {10,-1913.3,826.2,36.9},
- {10,-2335.6,-165.6,39.5},
- #endif
- #if defined CLUCKIN
- {14,2397.8,-1895.6,13.7},
- {14,2421.6,-1509.6,24.1},
- {14,-2671.6,257.4,4.6},
- {14,2392.4,2046.5,10.8},
- {14,2844.5,2401.1,11.0},
- {14,2635.5,1674.3,11.0},
- {14,2105.7,2228.7,11.0},
- {14,-2154.0,-2461.2,30.8},
- {14,-1816.2,620.8,37.5},
- {14,-1216.0,1831.4,45.3},
- {14,172.73,1176.76,13.7},
- {14,932.0,-1353.0,14.0},
- #endif
- #if defined TATTOO
- {39,1971.7,-2036.6,13.5},
- {39,2071.6,-1779.9,13.5},
- {39,2094.6,2119.0,10.8},
- {39,-2490.5,-40.1,39.3},
- #endif
- #if defined CLOTHES
- {45,-2376.4,909.2,45.4},
- {45,1654.0,1733.4,11.0},
- {45,2105.7,2257.4,11.0},
- {45,-2371.1,910.2,47.2},
- {45,501.7,-1358.5,16.4},
- {45,2818.6,2401.5,11.0},
- {45,2112.8,-1214.7,23.9},
- {45,2772.0,2447.6,11.0},
- {45,-2489.0,-26.9,32.6},
- #endif
- #if defined TUNE
- {27,2644.252,-2028.246,12.5547},
- {27,1043.4,-1025.3,34.4},
- #endif
- #if defined AMMUNATION
- {6,1372.9,-1278.8,12.5},
- {6,-2626.6,209.4,4.9},
- {6,2535.9,2083.5,10.8},
- {6,2156.5,943.2,10.8},
- {6,779.7,1874.3,4.9},
- {6,-2092.7,-2463.8,30.6},
- {6,240.0,-178.2,2.0},
- {6,-1509.4,2611.8,58.5},
- {6,-315.67,829.87,13.43},
- {6,2332.9,63.6,31.0}
- #endif
- };
- //---NEWS---//
- IsPlayerInZone(playerid, zoneid)
- {
- if(zoneid == -1) return 0;
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid,x,y,z);
- if(x >= zones[zoneid][zone_minx] && x < zones[zoneid][zone_maxx]
- && y >= zones[zoneid][zone_miny] && y < zones[zoneid][zone_maxy]
- && z >= zones[zoneid][zone_minz] && z < zones[zoneid][zone_maxz]
- && z < 1200.0000) return 1;
- return 0;
- }
- //---STOCKS---//
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- stock Rules(playerid)
- {
- new dt[1500];
- strcat(dt,"{53C506}NOT A DM SERVER!\n");
- strcat(dt,"{FFFFFF}Remember: This is NOT a deathmatch server,so DONT random attack/shoot/kill people.\n");
- strcat(dt,"{53C506}Cheating / Modding\n");
- strcat(dt,"{FFFFFF}Cheating or using mods which gives an advantage over other players is NOT allowed.\n");
- strcat(dt,"{53C506}Team-killing / Team Jacking\n");
- strcat(dt,"{FFFFFF}Damaging or destroying friendly vehicles,car-jacking teammates,burning teammates and everything that could damage your teammates is NOT allowed.\n");
- strcat(dt,"{53C506}Evading Ban\n");
- strcat(dt,"{FFFFFF}If you have been banned,never attempt to enter the server without getting an approved ban appeal.\nAlways post a ban appeal on the forums and await an admins response.\n");
- strcat(dt,"{53C506}Evading Death\n");
- strcat(dt,"{FFFFFF}Never pause,leave the server,spectate,or /kill while under attack to avoid being killed.\n");
- strcat(dt,"{53C506}Racism/Impersonation\n");
- strcat(dt,"{FFFFFF}Impersonating other players,especially admins is NOT allowed.Racism towards any other player is NOT allowed.\n");
- strcat(dt,"{53C506}Spamming/Flaming\n");
- strcat(dt,"{FFFFFF}Using excessive insults towards other players is NOT allowed.Flooding the chat-box for any reason is NOT allowed.\n");
- strcat(dt,"{FFFFFF}Advertising other servers is NOT allowed.\n");
- strcat(dt,"{53C506}Glitching\n");
- strcat(dt,"{FFFFFF}The crouch bug aka C-bug is allowed.2-shooting is allowed.The slide-bug is allowed.No-reload bug is NOT allowed.\n");
- strcat(dt,"{53C506}Admins\n");
- strcat(dt,"{FFFFFF}DONT ASK TO BE AN ADMIN! Our admins will look the players and choose who really deserves it.Asking to become an administrator will only decrease your chances to ever become an admin.\n");
- ShowPlayerDialog(playerid,RULES,DIALOG_STYLE_MSGBOX, "{FFFFFF}Server Rules",dt,"Ok","");
- }
- stock GetStampIP(playerid){
- new S_IP[16];
- Join_Stamp=GetTickCount();
- GetPlayerIp(playerid,S_IP,16);
- format(ban_s, 16, "%s", S_IP);
- }
- stock SavePlayer(playerid)
- {
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
- INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
- INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
- INI_WriteInt(File,"WantedLevel",GetPlayerWantedLevel(playerid));
- INI_WriteInt(File,"Vip",PlayerInfo[playerid][pVip]);
- INI_WriteInt(File,"Score",GetPlayerScore(playerid));
- INI_WriteInt(File,"Condoms",PlayerInfo[playerid][pCondoms]);
- INI_WriteInt(File,"Banned",PlayerInfo[playerid][pBanned]);
- INI_WriteInt(File,"Jailed",PlayerInfo[playerid][pJailed]);
- INI_WriteInt(File,"Drugs",PlayerInfo[playerid][pDrug]);
- INI_WriteInt(File,"Nopm",PlayerInfo[playerid][pNopm]);
- INI_WriteInt(File,"Bank",PlayerInfo[playerid][pBank]);
- INI_WriteInt(File,"Sausages",PlayerInfo[playerid][pSausage]);
- INI_WriteInt(File,"PassChange",PlayerInfo[playerid][pPassChange]);
- INI_WriteInt(File,"Mute",PlayerInfo[playerid][pMuted]);
- INI_Close(File);
- }
- stock isNumeric(const string[])
- {
- for (new i = 0, j = strlen(string); i < j; i++)
- if (string[i] > '9' || string[i] < '0')
- return 0;
- return 1;
- }
- stock ShowChangePassScreen(playerid)
- {
- new string[128];
- format(string, sizeof(string), "Please make sure you enter your new password correctly.\nEnter your desired password below then click Confirm.\n");
- ShowPlayerDialog(playerid,DIALOG_CHANGEPASS,DIALOG_STYLE_INPUT,"Enter your new password...",string,"Confirm","Cancel");
- }
- stock UpdateWorldWeather()
- {
- new next_weather_prob = random(100);
- if(next_weather_prob < 70) SetWeather(fine_weather_ids[random(sizeof(fine_weather_ids))]);
- else if(next_weather_prob < 95) SetWeather(foggy_weather_ids[random(sizeof(foggy_weather_ids))]);
- else SetWeather(wet_weather_ids[random(sizeof(wet_weather_ids))]);
- }
- stock IsPlayerInRangeOfVehicle(playerid, Float: range, vehicleid) {
- new Float: X, Float: Y, Float: Z;
- return (GetVehiclePos(vehicleid, X, Y, Z) && IsPlayerInRangeOfPoint(playerid, range, X, Y, Z));
- }
- stock IsATruck(vehicleid) {
- switch(GetVehicleModel(vehicleid)) {
- case 499,456,403,414,443,514,515,524,525,578,582: return 1;
- }
- return 0;
- }
- stock ClearKillFeed()
- {
- for (new i = 0; i < 5; i++)
- {
- SendDeathMessage(MAX_PLAYERS, MAX_PLAYERS, 202);
- }
- }
- stock DebugKeys(playerid, newkeys, oldkeys)
- {
- // Debug keys
- if ((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_FIRE key");
- if ((newkeys & KEY_ACTION) && !(oldkeys & KEY_ACTION))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_ACTION key");
- if ((newkeys & KEY_CROUCH) && !(oldkeys & KEY_CROUCH))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_CROUCH key");
- if ((newkeys & KEY_SPRINT) && !(oldkeys & KEY_SPRINT))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_SPRINT key");
- if ((newkeys & KEY_SECONDARY_ATTACK) && !(oldkeys & KEY_SECONDARY_ATTACK))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_SECONDARY_ATTACK key");
- if ((newkeys & KEY_JUMP) && !(oldkeys & KEY_JUMP))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_JUMP key");
- if ((newkeys & KEY_LOOK_RIGHT) && !(oldkeys & KEY_LOOK_RIGHT))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_LOOK_RIGHT key");
- if ((newkeys & KEY_HANDBRAKE) && !(oldkeys & KEY_HANDBRAKE))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_HANDBRAKE key");
- if ((newkeys & KEY_LOOK_LEFT) && !(oldkeys & KEY_LOOK_LEFT))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_LOOK_LEFT key");
- if ((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_SUBMISSION key");
- if ((newkeys & KEY_LOOK_BEHIND) && !(oldkeys & KEY_LOOK_BEHIND))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_LOOK_BEHIND key");
- if ((newkeys & KEY_WALK) && !(oldkeys & KEY_WALK))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_WALK key");
- if ((newkeys & KEY_ANALOG_UP) && !(oldkeys & KEY_ANALOG_UP))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_ANALOG_UP key");
- if ((newkeys & KEY_ANALOG_DOWN) && !(oldkeys & KEY_ANALOG_DOWN))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_ANALOG_DOWN key");
- if ((newkeys & KEY_ANALOG_LEFT) && !(oldkeys & KEY_ANALOG_LEFT))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_ANALOG_LEFT key");
- if ((newkeys & KEY_ANALOG_RIGHT) && !(oldkeys & KEY_ANALOG_RIGHT))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_ANALOG_RIGHT key");
- if ((newkeys & KEY_UP) && !(oldkeys & KEY_UP))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_UP key");
- if ((newkeys & KEY_DOWN) && !(oldkeys & KEY_DOWN))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_DOWN key");
- if ((newkeys & KEY_LEFT) && !(oldkeys & KEY_LEFT))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_LEFT key");
- if ((newkeys & KEY_RIGHT) && !(oldkeys & KEY_RIGHT))
- SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_RIGHT key");
- return 1;
- }
- stock ShowDescriptionText(playerid, string[])
- {
- KillTimer(DescriptionTimer[playerid]);
- TextDrawSetString(DescriptionText[playerid], string);
- TextDrawShowForPlayer(playerid, DescriptionText[playerid]);
- DescriptionTimer[playerid] = SetTimerEx("HideDescriptionText", 5000, 0, "i", playerid);
- return 1;
- }
- stock GetDistanceToCar(playerid, veh, Float: posX = 0.0, Float: posY = 0.0, Float: posZ = 0.0) {
- new Float: Floats[2][3];
- if(posX == 0.0 && posY == 0.0 && posZ == 0.0) {
- if(!IsPlayerInAnyVehicle(playerid)) GetPlayerPos(playerid, Floats[0][0], Floats[0][1], Floats[0][2]);
- else GetVehiclePos(GetPlayerVehicleID(playerid), Floats[0][0], Floats[0][1], Floats[0][2]);
- }
- else {
- Floats[0][0] = posX;
- Floats[0][1] = posY;
- Floats[0][2] = posZ;
- }
- GetVehiclePos(veh, Floats[1][0], Floats[1][1], Floats[1][2]);
- return floatround(floatsqroot((Floats[1][0] - Floats[0][0]) * (Floats[1][0] - Floats[0][0]) + (Floats[1][1] - Floats[0][1]) * (Floats[1][1] - Floats[0][1]) + (Floats[1][2] - Floats[0][2]) * (Floats[1][2] - Floats[0][2])));
- }
- stock GetClosestCar(playerid, exception = INVALID_VEHICLE_ID) {
- new Float: Distance,target = -1,Float: vPos[3];
- if(!IsPlayerInAnyVehicle(playerid)) GetPlayerPos(playerid, vPos[0], vPos[1], vPos[2]);
- else GetVehiclePos(GetPlayerVehicleID(playerid), vPos[0], vPos[1], vPos[2]);
- for(new v; v < MAX_VEHICLES; v++) if(GetVehicleModel(v) >= 400) {
- if(v != exception && (target < 0 || Distance > GetDistanceToCar(playerid, v, vPos[0], vPos[1], vPos[2]))) {
- target = v;
- Distance = GetDistanceToCar(playerid, v, vPos[0], vPos[1], vPos[2]); // Before the rewrite, we'd be running GetPlayerPos 2000 times...
- }
- }
- return target;
- }
- stock pNick(playerid)
- {
- new nick[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nick, MAX_PLAYER_NAME);
- return nick;
- }
- stock IsPlayerInsideInterior(playerid)
- {
- new Float:playerpos[3];
- GetPlayerPos(playerid, playerpos[0], playerpos[1], playerpos[2]);
- if(playerpos[2] > 500) return 1;
- return 0;
- }
- stock GetPlayerSpeed(playerid,bool:kmh)
- {
- new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
- if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
- rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
- return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
- }
- stock IsPlayerInInvalidNosVehicle(playerid)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- #define MAX_INVALID_NOS_VEHICLES 52
- new InvalidNosVehicles[MAX_INVALID_NOS_VEHICLES] =
- {
- 581,523,462,521,463,522,461,448,468,586,417,425,469,487,512,520,563,593,
- 509,481,510,472,473,493,520,595,484,430,453,432,476,497,513,533,577,
- 452,446,447,454,590,569,537,538,570,449,519,460,488,511,519,548,592
- };
- if(IsPlayerInAnyVehicle(playerid))
- {
- for(new i = 0; i < MAX_INVALID_NOS_VEHICLES; i++)
- {
- if(GetVehicleModel(vehicleid) == InvalidNosVehicles[i]) return true;
- }
- }
- return false;
- }
- stock IsComponentidCompatible(modelid, componentid)
- {
- if(componentid == 1025 || componentid == 1073 || componentid == 1074 || componentid == 1075 || componentid == 1076 ||
- componentid == 1077 || componentid == 1078 || componentid == 1079 || componentid == 1080 || componentid == 1081 ||
- componentid == 1082 || componentid == 1083 || componentid == 1084 || componentid == 1085 || componentid == 1096 ||
- componentid == 1097 || componentid == 1098 || componentid == 1087 || componentid == 1086)
- return true;
- switch (modelid)
- {
- case 400: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 401: return (componentid == 1005 || componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 114 || componentid == 1020 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 402: return (componentid == 1009 || componentid == 1009 || componentid == 1010);
- case 404: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1002 || componentid == 1016 || componentid == 1000 || componentid == 1017 || componentid == 1007);
- case 405: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1014 || componentid == 1023 || componentid == 1000);
- case 409: return (componentid == 1009);
- case 410: return (componentid == 1019 || componentid == 1021 || componentid == 1020 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 411: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 412: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 415: return (componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 418: return (componentid == 1020 || componentid == 1021 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1016);
- case 419: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 420: return (componentid == 1005 || componentid == 1004 || componentid == 1021 || componentid == 1019 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1003);
- case 421: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1014 || componentid == 1023 || componentid == 1016 || componentid == 1000);
- case 422: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1017 || componentid == 1007);
- case 426: return (componentid == 1005 || componentid == 1004 || componentid == 1021 || componentid == 1019 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1003);
- case 429: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 436: return (componentid == 1020 || componentid == 1021 || componentid == 1022 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 438: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 439: return (componentid == 1003 || componentid == 1023 || componentid == 1001 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1017 || componentid == 1007 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1013);
- case 442: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 445: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 451: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 458: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 466: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 467: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 474: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 475: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 477: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1017 || componentid == 1007);
- case 478: return (componentid == 1005 || componentid == 1004 || componentid == 1012 || componentid == 1020 || componentid == 1021 || componentid == 1022 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 479: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 480: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 489: return (componentid == 1005 || componentid == 1004 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1016 || componentid == 1000);
- case 491: return (componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1014 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 492: return (componentid == 1005 || componentid == 1004 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1016 || componentid == 1000);
- case 496: return (componentid == 1006 || componentid == 1017 || componentid == 1007 || componentid == 1011 || componentid == 1019 || componentid == 1023 || componentid == 1001 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1003 || componentid == 1002 || componentid == 1142 || componentid == 1143 || componentid == 1020);
- case 500: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 506: return (componentid == 1009);
- case 507: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 516: return (componentid == 1004 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1002 || componentid == 1015 || componentid == 1016 || componentid == 1000 || componentid == 1017 || componentid == 1007);
- case 517: return (componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1002 || componentid == 1023 || componentid == 1016 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 518: return (componentid == 1005 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1018 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 526: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 527: return (componentid == 1021 || componentid == 1020 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1014 || componentid == 1015 || componentid == 1017 || componentid == 1007);
- case 529: return (componentid == 1012 || componentid == 1011 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 533: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 534: return (componentid == 1126 || componentid == 1127 || componentid == 1179 || componentid == 1185 || componentid == 1100 || componentid == 1123 || componentid == 1125 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1180 || componentid == 1178 || componentid == 1101 || componentid == 1122 || componentid == 1124 || componentid == 1106);
- case 535: return (componentid == 1109 || componentid == 1110 || componentid == 1113 || componentid == 1114 || componentid == 1115 || componentid == 1116 || componentid == 1117 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1120 || componentid == 1118 || componentid == 1121 || componentid == 1119);
- case 536: return (componentid == 1104 || componentid == 1105 || componentid == 1182 || componentid == 1181 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1184 || componentid == 1183 || componentid == 1128 || componentid == 1103 || componentid == 1107 || componentid == 1108);
- case 540: return (componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007);
- case 541: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 542: return (componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1014 || componentid == 1015);
- case 545: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 546: return (componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1019 || componentid == 1018 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007);
- case 547: return (componentid == 1142 || componentid == 1143 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1016 || componentid == 1003 || componentid == 1000);
- case 549: return (componentid == 1012 || componentid == 1011 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 550: return (componentid == 1005 || componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003);
- case 551: return (componentid == 1005 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1023 || componentid == 1016 || componentid == 1003);
- case 555: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 558: return (componentid == 1092 || componentid == 1089 || componentid == 1166 || componentid == 1165 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1168 || componentid == 1167 || componentid == 1088 || componentid == 1091 || componentid == 1164 || componentid == 1163 || componentid == 1094 || componentid == 1090 || componentid == 1095 || componentid == 1093);
- case 559: return (componentid == 1065 || componentid == 1066 || componentid == 1160 || componentid == 1173 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1159 || componentid == 1161 || componentid == 1162 || componentid == 1158 || componentid == 1067 || componentid == 1068 || componentid == 1071 || componentid == 1069 || componentid == 1072 || componentid == 1070 || componentid == 1009);
- case 560: return (componentid == 1028 || componentid == 1029 || componentid == 1169 || componentid == 1170 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1141 || componentid == 1140 || componentid == 1032 || componentid == 1033 || componentid == 1138 || componentid == 1139 || componentid == 1027 || componentid == 1026 || componentid == 1030 || componentid == 1031);
- case 561: return (componentid == 1064 || componentid == 1059 || componentid == 1155 || componentid == 1157 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1154 || componentid == 1156 || componentid == 1055 || componentid == 1061 || componentid == 1058 || componentid == 1060 || componentid == 1062 || componentid == 1056 || componentid == 1063 || componentid == 1057);
- case 562: return (componentid == 1034 || componentid == 1037 || componentid == 1171 || componentid == 1172 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1149 || componentid == 1148 || componentid == 1038 || componentid == 1035 || componentid == 1147 || componentid == 1146 || componentid == 1040 || componentid == 1036 || componentid == 1041 || componentid == 1039);
- case 565: return (componentid == 1046 || componentid == 1045 || componentid == 1153 || componentid == 1152 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1150 || componentid == 1151 || componentid == 1054 || componentid == 1053 || componentid == 1049 || componentid == 1050 || componentid == 1051 || componentid == 1047 || componentid == 1052 || componentid == 1048);
- case 566: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 567: return (componentid == 1129 || componentid == 1132 || componentid == 1189 || componentid == 1188 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1187 || componentid == 1186 || componentid == 1130 || componentid == 1131 || componentid == 1102 || componentid == 1133);
- case 575: return (componentid == 1044 || componentid == 1043 || componentid == 1174 || componentid == 1175 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1176 || componentid == 1177 || componentid == 1099 || componentid == 1042);
- case 576: return (componentid == 1136 || componentid == 1135 || componentid == 1191 || componentid == 1190 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1192 || componentid == 1193 || componentid == 1137 || componentid == 1134);
- case 579: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 580: return (componentid == 1020 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007);
- case 585: return (componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 587: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 589: return (componentid == 1005 || componentid == 1004 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1024 || componentid == 1013 || componentid == 1006 || componentid == 1016 || componentid == 1000 || componentid == 1017 || componentid == 1007);
- case 600: return (componentid == 1005 || componentid == 1004 || componentid == 1020 || componentid == 1022 || componentid == 1018 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1017 || componentid == 1007);
- case 602: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 603: return (componentid == 1144 || componentid == 1145 || componentid == 1142 || componentid == 1143 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007);
- }
- return false;
- }
- stock ForbiddenWeap(playerid)
- {
- new weap = GetPlayerWeapon(playerid);
- if( weap == 36 || weap == 37 || weap == 38 || weap == 41 || weap == 42 || weap == 43 || weap == 44 || weap == 45)
- {
- return true;
- }
- return false;
- }
- stock udb_hash(buf[]) {
- new length=strlen(buf);
- new s1 = 1;
- new s2 = 0;
- new n;
- for (n=0; n<length; n++)
- {
- s1 = (s1 + buf[n]) % 65521;
- s2 = (s2 + s1) % 65521;
- }
- return (s2 << 16) + s1;
- }
- stock GetDistanceBetweenPlayers(playerid, playerid2)
- {
- new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
- new Float:tmpdis;
- GetPlayerPos(playerid,x1,y1,z1);
- GetPlayerPos(playerid2,x2,y2,z2);
- tmpdis = floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
- return floatround(tmpdis);
- }
- stock lowercase( text[ ] )
- {
- for( new i; i < strlen( text ); i++ )
- {
- if( text[ i ] != 0x20 && ( text[ i ] > 0x40 || text[ i ] < 0x5B ) ) text[ i ] += 0x20;
- }
- return text;
- }
- //---STOCKS---//
- main()
- {
- print("\n----------------------------------");
- print(" Most Wanted Cops&Robbers Initialized.");
- print("----------------------------------\n");
- }
- #pragma tabsize 0
- //CUSTOM IRC PUBLICS//
- public IRC_OnConnect(botid, ip[], port)
- {
- printf("*** IRC_OnConnect: Bot ID %d connected to %s:%d", botid, ip, port);
- IRC_JoinChannel(botid, IRC_CHANNEL);
- IRC_JoinChannel(botid, IRC_CHATCHANNEL);
- IRC_AddToGroup(gGroupID, botid);
- return 1;
- }
- public IRC_OnDisconnect(botid, ip[], port, reason[])
- {
- printf("*** IRC_OnDisconnect: Bot ID %d disconnected from %s:%d (%s)", botid, ip, port, reason);
- IRC_RemoveFromGroup(gGroupID, botid);
- return 1;
- }
- public IRC_OnConnectAttempt(botid, ip[], port)
- {
- printf("*** IRC_OnConnectAttempt: Bot ID %d attempting to connect to %s:%d...", botid, ip, port);
- return 1;
- }
- public IRC_OnConnectAttemptFail(botid, ip[], port, reason[])
- {
- printf("*** IRC_OnConnectAttemptFail: Bot ID %d failed to connect to %s:%d (%s)", botid, ip, port, reason);
- return 1;
- }
- public IRC_OnJoinChannel(botid, channel[])
- {
- printf("*** IRC_OnJoinChannel: Bot ID %d joined channel %s", botid, channel);
- return 1;
- }
- public IRC_OnLeaveChannel(botid, channel[], message[])
- {
- printf("*** IRC_OnLeaveChannel: Bot ID %d left channel %s (%s)", botid, channel, message);
- IRC_JoinChannel(botid, channel);
- return 1;
- }
- public IRC_OnKickedFromChannel(botid, channel[], oppeduser[], oppedhost[], message[])
- {
- printf("*** IRC_OnKickedFromChannel: Bot ID %d kicked by %s (%s) from channel %s (%s)", botid, oppeduser, oppedhost, channel, message);
- IRC_JoinChannel(botid, channel);
- return 1;
- }
- public IRC_OnUserDisconnect(botid, user[], host[], message[])
- {
- printf("*** IRC_OnUserDisconnect (Bot ID %d): User %s (%s) disconnected (%s)", botid, user, host, message);
- return 1;
- }
- public IRC_OnUserJoinChannel(botid, channel[], user[], host[])
- {
- printf("*** IRC_OnUserJoinChannel (Bot ID %d): User %s (%s) joined channel %s", botid, user, host, channel);
- return 1;
- }
- public IRC_OnUserLeaveChannel(botid, channel[], user[], host[], message[])
- {
- printf("*** IRC_OnUserLeaveChannel (Bot ID %d): User %s (%s) left channel %s (%s)", botid, user, host, channel, message);
- return 1;
- }
- public IRC_OnUserKickedFromChannel(botid, channel[], kickeduser[], oppeduser[], oppedhost[], message[])
- {
- printf("*** IRC_OnUserKickedFromChannel (Bot ID %d): User %s kicked by %s (%s) from channel %s (%s)", botid, kickeduser, oppeduser, oppedhost, channel, message);
- }
- public IRC_OnUserNickChange(botid, oldnick[], newnick[], host[])
- {
- printf("*** IRC_OnUserNickChange (Bot ID %d): User %s (%s) changed his/her nick to %s", botid, oldnick, host, newnick);
- return 1;
- }
- public IRC_OnUserSetChannelMode(botid, channel[], user[], host[], mode[])
- {
- printf("*** IRC_OnUserSetChannelMode (Bot ID %d): User %s (%s) on %s set mode: %s", botid, user, host, channel, mode);
- return 1;
- }
- public IRC_OnUserSetChannelTopic(botid, channel[], user[], host[], topic[])
- {
- printf("*** IRC_OnUserSetChannelTopic (Bot ID %d): User %s (%s) on %s set topic: %s", botid, user, host, channel, topic);
- return 1;
- }
- public IRC_OnUserSay(botid, recipient[], user[], host[], message[])
- {
- printf("*** IRC_OnUserSay (Bot ID %d): User %s (%s) sent message to %s: %s", botid, user, host, recipient, message);
- if (!strcmp(recipient, BOT_1_NICKNAME))
- {
- IRC_Say(botid, user, "You sent me a PM!");
- }
- return 1;
- }
- public IRC_OnUserNotice(botid, recipient[], user[], host[], message[])
- {
- printf("*** IRC_OnUserNotice (Bot ID %d): User %s (%s) sent notice to %s: %s", botid, user, host, recipient, message);
- if (!strcmp(recipient, BOT_2_NICKNAME))
- {
- IRC_Notice(botid, user, "You sent me a notice!");
- }
- return 1;
- }
- public IRC_OnUserRequestCTCP(botid, user[], host[], message[])
- {
- printf("*** IRC_OnUserRequestCTCP (Bot ID %d): User %s (%s) sent CTCP request: %s", botid, user, host, message);
- if (!strcmp(message, "VERSION"))
- {
- IRC_ReplyCTCP(botid, user, "VERSION SA-MP IRC Plugin v" #PLUGIN_VERSION "");
- }
- return 1;
- }
- public IRC_OnUserReplyCTCP(botid, user[], host[], message[])
- {
- printf("*** IRC_OnUserReplyCTCP (Bot ID %d): User %s (%s) sent CTCP reply: %s", botid, user, host, message);
- return 1;
- }
- public IRC_OnReceiveRaw(botid, message[])
- {
- new File:file;
- if (!fexist("irc_log.txt"))
- {
- file = fopen("irc_log.txt", io_write);
- }
- else
- {
- file = fopen("irc_log.txt", io_append);
- }
- if (file)
- {
- fwrite(file, message);
- fwrite(file, "\r\n");
- fclose(file);
- }
- return 1;
- }
- //CUSTOM IRC PUBLICS//
- //CUSTOM LOG PUBLICS//
- public AcLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/ac.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public RobberyLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/rb.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public PmLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/pm.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public BanLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/bans.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public KickLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/kicks.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public GMLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/givemoney.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public ReportLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/reports.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public AdminChatLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/achat.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public GetAllLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/gall.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public ForceRecLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/forcerec.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public JoinsLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/joins.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public RconLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/rcon.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public BugLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/bug.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public IrcChat(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/ircchat.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public GDLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/givedrug.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public FineLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("/Logs/fine.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- //CUSTOM LOG PUBLICS//
- //CUSTOM PUBLICS//
- public update_zones()
- {
- new line1[10];
- new line2[10];
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && zoneupdates[i] == 1)
- {
- if(IsPlayerInZone(i,player_zone[i]))
- {
- }
- else {
- new player_zone_before;
- player_zone_before = player_zone[i];
- player_zone[i] = -1;
- for(new j=0; j<sizeof(zones);j++)
- {
- if(IsPlayerInZone(i,j) && player_zone[i] == -1)
- {
- if(player_zone_before == -1)
- {
- new string[128];
- format(string,sizeof(string),"%s",zones[j][zone_name]);
- TextDrawSetString(LocationTD[i],string);
- }
- else
- {
- if(strcmp(zones[j][zone_name],zones[player_zone_before][zone_name],true) != 0)
- {
- new string[128];
- format(string,sizeof(string),"%s",zones[j][zone_name]);
- TextDrawSetString(LocationTD[i],string);
- }
- }
- player_zone[i] = j;
- format(line1,10,"p%dzone",i);
- format(line2,10,"%d",j);
- }
- }
- if(player_zone[i] == -1) player_zone[i] = player_zone_before;
- }
- }
- }
- }
- public SaveAllStats()
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- new INI:File = INI_Open(UserPath(i));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Cash",GetPlayerMoney(i));
- INI_WriteInt(File,"Admin",PlayerInfo[i][pAdmin]);
- INI_WriteInt(File,"Kills",PlayerInfo[i][pKills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[i][pDeaths]);
- INI_WriteInt(File,"WantedLevel",GetPlayerWantedLevel(i));
- INI_WriteInt(File,"Vip",PlayerInfo[i][pVip]);
- INI_WriteInt(File,"Score",GetPlayerScore(i));
- INI_WriteInt(File,"Condoms",PlayerInfo[i][pCondoms]);
- INI_WriteInt(File,"Banned",PlayerInfo[i][pBanned]);
- INI_WriteInt(File,"Jailed",PlayerInfo[i][pJailed]);
- INI_WriteInt(File,"Drugs",PlayerInfo[i][pDrug]);
- INI_WriteInt(File,"Nopm",PlayerInfo[i][pNopm]);
- INI_WriteInt(File,"Bank",PlayerInfo[i][pBank]);
- INI_WriteInt(File,"Sausages",PlayerInfo[i][pSausage]);
- INI_WriteInt(File,"PassChange",PlayerInfo[i][pPassChange]);
- INI_WriteInt(File,"Mute",PlayerInfo[i][pMuted]);
- INI_Close(File);
- }
- SendClientMessageToAll(-1,"Players data have been {F70505}auto saved.");
- }
- public TimeU()
- {
- new string[7];
- Tsec+=1;
- if(Tsec==60) {
- Tsec=00;
- THrs+=1;
- }
- if(THrs==24) {
- Tsec=00;
- THrs=0;
- }
- if(Tsec<10) {
- format(string,sizeof(string),"%02d:%02d",THrs,Tsec);
- }
- if(Tsec>10) {
- format(string,sizeof(string),"%02d:%02d",THrs,Tsec);
- }
- if(THrs<10) {
- format(string,sizeof(string),"%02d:%02d",THrs,Tsec);
- }
- for(new i; i<MAX_PLAYERS; i++) {
- if(IsPlayerConnected(i)) {
- SetPlayerTime(i,THrs,Tsec);
- }
- }
- TextDrawSetString(Servt,string);
- }
- public WantedColor()
- {
- for (new i; i < MAX_PLAYERS; i++ && gTeam[i] == TEAM_CIV)
- {
- switch(GetPlayerWantedLevel(i))
- {
- case 0:
- {
- SetPlayerColor(i,COLOR_WHITE);
- }
- case 1 .. 3:
- {
- SetPlayerColor(i,yellow);
- }
- case 4 .. 10:
- {
- SetPlayerColor(i,red);
- }
- }
- }
- }
- public InfoUpdate()
- {
- new string[128];
- new dstring[128];
- for( new u; u < MAX_PLAYERS; u ++)
- {
- format(string, sizeof(string), "Wanted Level: %i", GetPlayerWantedLevel(u));
- TextDrawSetString(WantedLvlTxd[u], string);
- format(dstring, sizeof(dstring), "Drugs: %d gr", PlayerInfo[u][pDrug]);
- TextDrawSetString(DrugTxd[u], dstring);
- }
- }
- public OnPlayerRequestSpawn(playerid)
- {
- if(GetPlayerWantedLevel(playerid) >= 1 && gTeam[playerid] == TEAM_COP)
- {
- GameTextForPlayer(playerid, "~w~~h~You can't choose cops team because you're wanted.Choose civilians", 5000, 5);
- return 0;
- }
- return 1;
- }
- public pJailTimer(playerid)
- {
- RemovePlayerAttachedObject(playerid, 9);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
- PlayerInfo[playerid][pJailed] = 1;
- pJailCount[playerid]--;
- new string[128];
- format(string, sizeof(string), "- Jail Time Left: %i - Enjoy! -", pJailCount[playerid]);
- GameTextForPlayer(playerid, string, 1000, 5);
- if(pJailCount[playerid] == 0)
- {
- KillTimer(pJailTimerID[playerid]);
- SendClientMessage(playerid, 0xFF99AADD, "Released from jail. Don't forget to come back!");
- SetPlayerInterior(playerid, 10);
- PlayerInfo[playerid][pJailed] = 0;
- SetPlayerPos(playerid, 246.8365,115.4712,1003.2188);
- new pname[MAX_PLAYER_NAME];
- new stringk[100];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(stringk, sizeof(stringk), "%s (%d) has been released from jail.", pname,playerid);
- SendClientMessageToAll(green,stringk);
- }
- }
- public RandomMsg()
- {
- new message = random(7);
- switch(message)
- {
- case 1:SendClientMessageToAll(pink, "REMEMBER: THIS ISN'T A DM SERVER,DON'T RANDOM KILL.");
- case 2:SendClientMessageToAll(pink, "You're new? See the /rules and type /help if you need some help.");
- case 3:SendClientMessageToAll(pink, "Check /cmds for the list of commands.");
- case 4:SendClientMessageToAll(pink, "The server saves your stats automatically,so dont bother asking if your stats are saved.");
- case 5:SendClientMessageToAll(pink, "You are a cop?Be sure to read /crules.");
- case 6:SendClientMessageToAll(pink, "Wanna be a VIP player and get access to special features?Check /vinfo");
- case 7:SendClientMessageToAll(pink, "Be a VIP player! Tons fo extra features are waiting you! Check it with /vinfo");
- }
- return 1;
- }
- public HideDescriptionText(playerid)
- {
- TextDrawHideForPlayer(playerid, DescriptionText[playerid]);
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- if(!success)
- {
- new pip[16];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- new nameee[MAX_PLAYER_NAME];
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- GetPlayerName(i, nameee, 16);
- GetPlayerIp(i, pip, sizeof(pip));
- if(!strcmp(ip, pip, true))
- {
- new stri[220];
- format(stri,sizeof stri,"Failed RCON Login attempt by %s. ID: %i IP: %s - Password: %s - %02d/%02d/%d - %02d:%02d:%02d -",nameee,ip,password,Day,Month,Year,Hour,Minute,Second);
- RconLog(stri);
- }
- }
- }
- else
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- new str[220];
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- new nameee[MAX_PLAYER_NAME];
- GetPlayerName(i, nameee, 16);
- format(str,sizeof str,"%s logged in RCON with Password: %s - IP %s - %02d/%02d/%d - %02d:%02d:%02d -",nameee,password,ip,Day,Month,Year,Hour,Minute,Second);
- RconLog(str);
- }
- }
- return 1;
- }
- public disable_shop(playerid)
- {
- if(!IsPlayerInsideInterior(playerid)) SetTimerEx("disable_shop", 1000, 0, "i", playerid);
- else SetPlayerShopName(playerid, "FDPIZZA");
- return 1;
- }
- public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat)
- {
- if (passenger_seat != 0) return;
- new cm = GetPlayerCameraMode(playerid);
- if (cm != 53 && cm != 51) return;
- new keys, tmp;
- GetPlayerKeys(playerid, keys, tmp, tmp);
- if (!(keys & KEY_FIRE)) return;
- new Float:vhp; GetVehicleHealth(vehicleid, vhp);
- switch (GetPlayerWeapon(playerid))
- {
- case WEAPON_COLT45: DecreaseVehHP(VEHICLE_DMG_COLT45);
- case WEAPON_SILENCED: DecreaseVehHP(VEHICLE_DMG_SILENCED);
- case WEAPON_DEAGLE: DecreaseVehHP(VEHICLE_DMG_DEAGLE);
- case WEAPON_SHOTGUN: DecreaseVehHP(VEHICLE_DMG_SHOTGUN);
- case WEAPON_SAWEDOFF: DecreaseVehHP(VEHICLE_DMG_SAWEDOFF);
- case WEAPON_SHOTGSPA: DecreaseVehHP(VEHICLE_DMG_SHOTGSPA);
- case WEAPON_UZI: DecreaseVehHP(VEHICLE_DMG_UZI);
- case WEAPON_MP5: DecreaseVehHP(VEHICLE_DMG_MP5);
- case WEAPON_AK47: DecreaseVehHP(VEHICLE_DMG_AK47);
- case WEAPON_M4: DecreaseVehHP(VEHICLE_DMG_M4);
- case WEAPON_TEC9: DecreaseVehHP(VEHICLE_DMG_TEC9);
- case WEAPON_RIFLE: DecreaseVehHP(VEHICLE_DMG_RIFLE);
- case WEAPON_ROCKETLAUNCHER: DecreaseVehHP(VEHICLE_DMG_ROCKETLAUNCHER);
- case WEAPON_HEATSEEKER: DecreaseVehHP(VEHICLE_DMG_HEATSEEKER);
- case WEAPON_MINIGUN: DecreaseVehHP(VEHICLE_DMG_MINIGUN);
- default: DecreaseVehHP(VEHICLE_DMG_DEFAULT);
- }
- }
- public HealthWantedTimer()
- {
- for (new i=0;i<MAX_PLAYERS;i++)
- {
- if (IsPlayerConnected(i))
- {
- new Float:health, Float:armour;
- GetPlayerWantedLevel(i);
- GetPlayerHealth(i, health);
- GetPlayerArmour(i, armour);
- if (health > 90) SetPlayerHealth(i, 90);
- if (armour > 90) SetPlayerArmour(i, 90);
- if(GetPlayerWantedLevel(i) >= 10) SetPlayerWantedLevel(i,10);
- }
- }
- }
- public ResetCount(playerid)
- {
- SetPVarInt(playerid, "TextSpamCount", 0);
- }
- public SendMessageToAdmins(color,const string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- if (PlayerInfo[i][pAdmin] >= 1)
- SendClientMessage(i, color, string);
- }
- return 1;
- }
- public WantedLvlSpeed()
- {
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(GetPlayerSpeed(i, true) > 180.0 && gTeam[i] == TEAM_CIV)
- {
- new str[150];
- new plwl = GetPlayerWantedLevel(i);
- plwl = GetPlayerWantedLevel(i);
- SetPlayerWantedLevel(i,plwl +1);
- format(str,150,"- CRIME - Speed Limit Passed! (180 km/h) - You're going at %d km/h - Wanted Level: %d",GetPlayerSpeed(i,true),plwl);
- SendClientMessage(i,red,str);
- return 1;
- }
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys & KEY_FIRE && ForbiddenWeap(playerid))
- {
- new weap, ammo;
- GetPlayerWeaponData(playerid, 7, weap, ammo);
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- new pname[MAX_PLAYER_NAME];
- new string[170];
- new string2[170];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string, sizeof(string), "AC: %s has been banned - Forbidden weapon (%d) with %d ammo. - %02d/%02d/%d - %02d:%02d:%02d", pname,weap,ammo,Day,Month,Year,Hour,Minute,Second);
- SendClientMessageToAll(red,string);
- format(string2, sizeof(string2), "4AC: %s has been banned - Forbidden weapon (%d) with %d ammo. - %02d/%02d/%d - %02d:%02d:%02d", pname,weap,ammo,Day,Month,Year,Hour,Minute,Second);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, string2);
- new msg[170];
- format(msg,sizeof(msg),"You have been banned by AC - Forbidden weapon (%d) with %d ammo. - %02d/%02d/%d - %02d:%02d:%02d",weap,ammo,Day,Month,Year,Hour,Minute,Second);
- SendClientMessage(playerid,red,msg);
- PlayerInfo[playerid][pBanned] = 1;
- BanEx(playerid,string);
- BanLog(string);
- ApplyAnimation(playerid, "FAT", "FatWalk", 4.1,1,1,1,1,1,0);
- SetPlayerAttachedObject(playerid, 0, 321, 1, -0.25,-0.33,-0.06 ,90,180,0);
- GameTextForPlayer(playerid, "~p~Oh shit! That dildo in your ass hurts!!", 9000, 6);
- SetPlayerDrunkLevel(playerid, 9000);
- GameTextForPlayer(playerid, "~r~Surprise!!!!!", 4000, 4);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- return 1;
- }
- if(newkeys & KEY_YES)
- {
- if(gTeam[playerid] == TEAM_COP)
- {
- CallLocalFunction( "cmd_ar", "d", playerid);
- return 1;
- }
- }
- if(newkeys & KEY_NO)
- {
- if(gTeam[playerid] == TEAM_COP)
- {
- CallLocalFunction( "cmd_tk", "d", playerid);
- return 1;
- }
- }
- if(newkeys & KEY_FIRE)
- {
- TextDrawHideForPlayer(playerid, CopsRules0);
- TextDrawHideForPlayer(playerid, CopsRules1);
- TextDrawHideForPlayer(playerid, CopsRules2);
- TextDrawHideForPlayer(playerid, CopsRules3);
- TextDrawHideForPlayer(playerid, CopsRules4);
- return 1;
- }
- if(newkeys & KEY_JUMP && !(oldkeys & KEY_JUMP) && GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED) ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff",4.1,0,1,1,0,0);
- return 0;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == BankPickup)
- {
- SendClientMessage(playerid, red, "Test");
- }
- if(pickupid == PdEnter)
- {
- SetPlayerPos(playerid,246.8365,115.4712,1003.2188);
- SetPlayerInterior(playerid, 10);
- }
- if(pickupid == PdExit)
- {
- SetPlayerPos(playerid,-1605.5582,726.7878,11.8198);
- SetPlayerInterior(playerid, 0);
- }
- if(pickupid == VentiQuattroSetteEnter)
- {
- SetPlayerPos(playerid,-29.660936355591,-22.400444030762,1004.3742675781);
- SetPlayerInterior(playerid, 4);
- }
- if(pickupid == SupaSaveEnter)
- {
- SetPlayerPos(playerid,-29.660936355591,-22.400444030762,1004.3742675781);
- SetPlayerInterior(playerid, 4);
- }
- if(pickupid == SupaSaveExit)
- {
- SetPlayerPos(playerid,-2442.4670,742.7119,35.0156);
- SetPlayerInterior(playerid, 0);
- }
- if(pickupid == HippyShopEnter)
- {
- SetPlayerPos(playerid,-29.660936355591,-22.400444030762,1004.3742675781);
- SetPlayerInterior(playerid, 4);
- }
- if(pickupid == XoomerEnter)
- {
- SetPlayerPos(playerid,-29.660936355591,-22.400444030762,1004.3742675781);
- SetPlayerInterior(playerid, 4);
- }
- return 1;
- }
- public LoadUser_data(playerid,name[],value[])
- {
- INI_Int("Password",PlayerInfo[playerid][pPass]);
- INI_Int("Cash",PlayerInfo[playerid][pCash]);
- INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
- INI_Int("Kills",PlayerInfo[playerid][pKills]);
- INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
- INI_Int("WantedLevel",PlayerInfo[playerid][pWantedLevel]);
- INI_Int("Vip",PlayerInfo[playerid][pVip]);
- INI_Int("Score",PlayerInfo[playerid][pScore]);
- INI_Int("Condoms",PlayerInfo[playerid][pCondoms]);
- INI_Int("Banned",PlayerInfo[playerid][pBanned]);
- INI_Int("Jailed",PlayerInfo[playerid][pJailed]);
- INI_Int("Drugs",PlayerInfo[playerid][pDrug]);
- INI_Int("Nopm",PlayerInfo[playerid][pNopm]);
- INI_Int("Bank",PlayerInfo[playerid][pBank]);
- INI_Int("Sausages",PlayerInfo[playerid][pSausage]);
- INI_Int("PassChange",PlayerInfo[playerid][pPassChange]);
- INI_Int("Mute",PlayerInfo[playerid][pMuted]);
- return 1;
- }
- public MedFeesTimer(playerid)
- {
- new mrand =random(75000);
- new string[128];
- format(string,sizeof(string),"The hospital has charged you $%d for their medical services.",mrand);
- ShowDescriptionText(playerid, string);
- GivePlayerMoney(playerid,-mrand);
- }
- public GetClosePlayerToPlayer(playerid)
- {
- new Float:dist = 1000.0;
- new targetid = INVALID_PLAYER_ID;
- new Float:x1,Float:y1,Float:z1;
- new Float:x2,Float:y2,Float:z2;
- new Float:tmpdis;
- GetPlayerPos(playerid,x1,y1,z1);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(i == playerid) continue;
- GetPlayerPos(i,x2,y2,z2);
- tmpdis = floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
- if(tmpdis < dist)
- {
- dist = tmpdis;
- targetid = i;
- }
- }
- return targetid;
- }
- public WantedLevelReduce()
- {
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(GetPlayerWantedLevel(i) > 1)
- {
- new plwl = GetPlayerWantedLevel(i);
- SetPlayerWantedLevel(i,plwl -1);
- new string[60];
- plwl = GetPlayerWantedLevel(i);
- format(string, sizeof(string), "Wanted Level: %d",plwl);
- SendClientMessage(i, 0xA9A9A9AA, string);
- }
- }
- }
- }
- public pRobTimer(playerid)
- {
- new pl = GetPlayerWantedLevel(playerid);
- pl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid,pl +3);
- robmoney[playerid] += random(2600);
- pRobCount[playerid]--;
- IsRobbing[playerid] =1;
- new rbgt[128];
- format(rbgt, sizeof(rbgt), "Robbery ~g~in progress.~r~Do NOT leave the checkpoint.~y~Money stolen: ~g~%i$", robmoney[playerid]);
- GameTextForPlayer(playerid, rbgt, 30000, 5);
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- new copmsg[170];
- format(copmsg, sizeof(copmsg), "- WARNING ALL COPS: Robbery in progress by %s (%d)",name,playerid);
- switch(pRobCount[playerid])
- {
- case 29:
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(!IsPlayerConnected(i))continue;
- if(gTeam[i] == TEAM_COP)
- {
- SendClientMessage(i, COLOR_BLUE, copmsg);
- }
- }
- }
- case 0:
- {
- KillTimer(pRobTimerID[playerid]);
- GivePlayerMoney(playerid,robmoney[playerid]);
- new string2[128];
- new current_zone = player_zone[playerid];
- new plwl = GetPlayerWantedLevel(playerid);
- plwl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid,plwl +4);
- format(string2, sizeof(string2), "- SUCCESS ROBBERY - Wanted Level %d - Robbed %i$ from %s",plwl,robmoney[playerid],zones[current_zone][zone_name]);
- SendClientMessage(playerid,red,string2);
- ShowDescriptionText(playerid, string2);
- GameTextForPlayer(playerid, "Robbery ~r~COMPLETE.", 3000, 5);
- SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
- IsRobbing[playerid] =0;
- new string3[128];
- GetPlayerName(playerid, name, sizeof(name));
- format(string3, sizeof(string3), "- ROBBERY - %s (%d) has robbed %i$ from %s",name,playerid,robmoney[playerid],zones[current_zone][zone_name]);
- SendClientMessageToAll(COLOR_WHITE,string3);
- new RobMsg[128];
- format(RobMsg, sizeof(RobMsg), "10%s (%d) has robbed %i$ from %s", name,playerid,robmoney[playerid],zones[current_zone][zone_name]);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, RobMsg);
- RobberyLog(string3);
- robmoney[playerid] = 0;
- }
- }
- return 1;
- }
- public pBankRobTimer(playerid)
- {
- new pl = GetPlayerWantedLevel(playerid);
- pl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid,pl +10);
- bankrobmoney[playerid] += random(10253);
- pBankRobCount[playerid]--;
- IsBankRobbing[playerid] =1;
- new rbgt[128];
- format(rbgt, sizeof(rbgt), "Bank robbery ~g~in progress.~r~Do NOT leave the checkpoint.~y~Money stolen: ~g~%i$", bankrobmoney[playerid]);
- GameTextForPlayer(playerid, rbgt, 60000, 5);
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- new copmsg[170];
- format(copmsg, sizeof(copmsg), "- WARNING ALL COPS: Bank Robbery in progress by %s (%d)",name,playerid);
- switch(pBankRobCount[playerid])
- {
- case 59:
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(!IsPlayerConnected(i))continue;
- if(gTeam[i] == TEAM_COP)
- {
- SendClientMessage(i, COLOR_BLUE, copmsg);
- }
- }
- }
- case 0:
- {
- KillTimer(pBankRobTimerID[playerid]);
- GivePlayerMoney(playerid,bankrobmoney[playerid]);
- new string2[128];
- new plwl = GetPlayerWantedLevel(playerid);
- plwl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid,plwl +10);
- format(string2, sizeof(string2), "- SUCCESS BANK ROBBERY - Wanted Level %d - Robbed from bank %i$",plwl,bankrobmoney[playerid]);
- SendClientMessage(playerid,red,string2);
- ShowDescriptionText(playerid, string2);
- GameTextForPlayer(playerid, "Bank Robbery ~r~COMPLETE.", 3000, 5);
- SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
- IsBankRobbing[playerid] =0;
- new string3[128];
- GetPlayerName(playerid, name, sizeof(name));
- format(string3, sizeof(string3), "- BANK ROBBERY - %s (%d) has robbed %i$ from the bank.",name,playerid,bankrobmoney[playerid]);
- SendClientMessageToAll(COLOR_WHITE,string3);
- new RobMsg[130];
- format(RobMsg, sizeof(RobMsg), "10- BANK ROBBERY - %s (%d) has robbed %i$ from the bank.", name,playerid,bankrobmoney[playerid]);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, RobMsg);
- RobberyLog(string3);
- bankrobmoney[playerid] = 0;
- }
- }
- return 1;
- }
- public pApRobTimer(playerid)
- {
- new pl = GetPlayerWantedLevel(playerid);
- pl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid,pl +10);
- aprobmoney[playerid] += random(15167);
- pApRobCount[playerid]--;
- IsApRobbing[playerid] =1;
- new rbgt[128];
- format(rbgt, sizeof(rbgt), "Airport Robbery ~r~in progress.~y~Do NOT leave the checkpoint.~g~Money stolen: ~g~%i$", aprobmoney[playerid]);
- GameTextForPlayer(playerid, rbgt, 60000, 5);
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- new copmsg[170];
- format(copmsg, sizeof(copmsg), "- WARNING ALL COPS: EASTER BAY AIPORT ROBBERY IN PROGRESS BY %s (%d)",name,playerid);
- switch(pApRobCount[playerid])
- {
- case 59:
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(!IsPlayerConnected(i))continue;
- if(gTeam[i] == TEAM_COP)
- {
- SendClientMessage(i, COLOR_BLUE, copmsg);
- }
- }
- }
- case 0:
- {
- KillTimer(pApRobTimerID[playerid]);
- GivePlayerMoney(playerid,aprobmoney[playerid]);
- new string2[128];
- new plwl = GetPlayerWantedLevel(playerid);
- plwl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid,plwl +10);
- format(string2, sizeof(string2), "- SUCCESS AIRPORT ROBBERY - Wanted Level %d - Robbed %i$",plwl,aprobmoney[playerid]);
- SendClientMessage(playerid,red,string2);
- ShowDescriptionText(playerid, string2);
- GameTextForPlayer(playerid, "Airport Robbery ~r~COMPLETE.", 3000, 5);
- SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
- IsApRobbing[playerid] =0;
- new string3[128];
- GetPlayerName(playerid, name, sizeof(name));
- format(string3, sizeof(string3), "- ROBBERY - %s (%d) has robbed %i$ from Easter Bay Airport.",name,playerid,aprobmoney[playerid]);
- SendClientMessageToAll(COLOR_WHITE,string3);
- new RobMsg[128];
- format(RobMsg, sizeof(RobMsg), "010- ROBBERY - %s (%d) has robbed %i$ from Easter Bay Airport.", name,playerid,aprobmoney[playerid]);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, RobMsg);
- RobberyLog(string3);
- aprobmoney[playerid] = 0;
- }
- }
- return 1;
- }
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == CPs[0])
- {
- cpcount++;
- GameTextForPlayer(playerid,"Type ~r~/rob to ~y~rob this place.",4000,5);
- }
- if(checkpointid == CPs[1])
- {
- cpcount++;
- GameTextForPlayer(playerid,"Type ~r~/rob to ~y~rob this place.",4000,5);
- }
- if(checkpointid == CPs[2])
- {
- cpcount++;
- GameTextForPlayer(playerid,"Type ~r~/rob to ~y~rob this place.",4000,5);
- }
- if(checkpointid == CPs[4])
- {
- cpcount++;
- GameTextForPlayer(playerid,"Type ~r~/rob to ~y~rob this place.",4000,5);
- }
- if(checkpointid == CPs[5])
- {
- cpcount++;
- GameTextForPlayer(playerid,"Type ~r~/rob to ~y~rob this place.",4000,5);
- }
- if(checkpointid == CPs[6])
- {
- cpcount++;
- GameTextForPlayer(playerid,"Type ~r~/rob to ~y~rob this place.",4000,5);
- }
- if(checkpointid == CPs[7])
- {
- cpcount++;
- GameTextForPlayer(playerid,"Type ~r~/rob to ~y~rob this place.",4000,5);
- }
- if(checkpointid == CPs[8])
- {
- cpcount++;
- GameTextForPlayer(playerid,"Type ~r~/rob to ~y~rob this place.",4000,5);
- }
- if(checkpointid == CPs[9])
- {
- cpcount++;
- GameTextForPlayer(playerid,"Type ~r~/rob to ~y~rob this place.",4000,5);
- }
- if(checkpointid == CPs[10])
- {
- cpcount++;
- GameTextForPlayer(playerid,"Type ~r~/rob to ~y~rob this place.",4000,5);
- }
- if(checkpointid == CPs[11])
- {
- cpcount++;
- GameTextForPlayer(playerid,"Type ~r~/robap ~w~to ~r~rob ~w~the airport.",4000,5);
- }
- return 1;
- }
- public OnPlayerLeaveDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == CPs[0])
- {
- cpcount --;
- if(IsRobbing[playerid] == 1)
- {
- SendClientMessage(playerid,0xFF0000FF,"You left the checkpoint and your robbery is failed.");
- GameTextForPlayer(playerid, "Robbery ~r~FAILED.", 3000, 5);
- IsRobbing[playerid] =0;
- pRobCount[playerid] = 0;
- KillTimer(pRobTimerID[playerid]);
- robmoney[playerid] = 0;
- }
- }
- if(checkpointid == CPs[1])
- {
- cpcount --;
- if(IsRobbing[playerid] == 1)
- {
- SendClientMessage(playerid,0xFF0000FF,"You left the checkpoint and your robbery is failed.");
- GameTextForPlayer(playerid, "Robbery ~r~FAILED.", 3000, 5);
- IsRobbing[playerid] =0;
- pRobCount[playerid] = 0;
- KillTimer(pRobTimerID[playerid]);
- robmoney[playerid] = 0;
- }
- }
- if(checkpointid == CPs[2])
- {
- cpcount --;
- if(IsRobbing[playerid] == 1)
- {
- SendClientMessage(playerid,0xFF0000FF,"You left the checkpoint and your robbery is failed.");
- GameTextForPlayer(playerid, "Robbery ~r~FAILED.", 3000, 5);
- IsRobbing[playerid] =0;
- pRobCount[playerid] = 0;
- KillTimer(pRobTimerID[playerid]);
- robmoney[playerid] = 0;
- }
- }
- if(checkpointid == CPs[4])
- {
- cpcount --;
- if(IsRobbing[playerid] == 1)
- {
- SendClientMessage(playerid,0xFF0000FF,"You left the checkpoint and your robbery is failed.");
- GameTextForPlayer(playerid, "Robbery ~r~FAILED.", 3000, 5);
- IsRobbing[playerid] =0;
- pRobCount[playerid] = 0;
- KillTimer(pRobTimerID[playerid]);
- robmoney[playerid] = 0;
- }
- }
- if(checkpointid == CPs[5])
- {
- cpcount --;
- if(IsRobbing[playerid] == 1)
- {
- SendClientMessage(playerid,0xFF0000FF,"You left the checkpoint and your robbery is failed.");
- GameTextForPlayer(playerid, "Robbery ~r~FAILED.", 3000, 5);
- IsRobbing[playerid] =0;
- pRobCount[playerid] = 0;
- KillTimer(pRobTimerID[playerid]);
- robmoney[playerid] = 0;
- }
- }
- if(checkpointid == CPs[6])
- {
- cpcount --;
- if(IsRobbing[playerid] == 1)
- {
- SendClientMessage(playerid,0xFF0000FF,"You left the checkpoint and your robbery is failed.");
- GameTextForPlayer(playerid, "Robbery ~r~FAILED.", 3000, 5);
- IsRobbing[playerid] =0;
- pRobCount[playerid] = 0;
- KillTimer(pRobTimerID[playerid]);
- robmoney[playerid] = 0;
- }
- }
- if(checkpointid == CPs[7])
- {
- cpcount --;
- if(IsRobbing[playerid] == 1)
- {
- SendClientMessage(playerid,0xFF0000FF,"You left the checkpoint and your robbery is failed.");
- GameTextForPlayer(playerid, "Robbery ~r~FAILED.", 3000, 5);
- IsRobbing[playerid] =0;
- pRobCount[playerid] = 0;
- KillTimer(pRobTimerID[playerid]);
- robmoney[playerid] = 0;
- }
- }
- if(checkpointid == CPs[8])
- {
- cpcount --;
- if(IsRobbing[playerid] == 1)
- {
- SendClientMessage(playerid,0xFF0000FF,"You left the checkpoint and your robbery is failed.");
- GameTextForPlayer(playerid, "Robbery ~r~FAILED.", 3000, 5);
- IsRobbing[playerid] =0;
- pRobCount[playerid] = 0;
- KillTimer(pRobTimerID[playerid]);
- robmoney[playerid] = 0;
- }
- }
- if(checkpointid == CPs[9])
- {
- cpcount --;
- if(IsRobbing[playerid] == 1)
- {
- SendClientMessage(playerid,0xFF0000FF,"You left the checkpoint and your robbery is failed.");
- GameTextForPlayer(playerid, "Robbery ~r~FAILED.", 3000, 5);
- IsRobbing[playerid] =0;
- pRobCount[playerid] = 0;
- KillTimer(pRobTimerID[playerid]);
- robmoney[playerid] = 0;
- }
- }
- if(checkpointid == CPs[10])
- {
- cpcount --;
- if(IsRobbing[playerid] == 1)
- {
- SendClientMessage(playerid,0xFF0000FF,"You left the checkpoint and your robbery is failed.");
- GameTextForPlayer(playerid, "Robbery ~r~FAILED.", 3000, 5);
- IsRobbing[playerid] =0;
- pRobCount[playerid] = 0;
- KillTimer(pRobTimerID[playerid]);
- robmoney[playerid] = 0;
- }
- }
- if(checkpointid == CPs[11])
- {
- cpcount --;
- if(IsApRobbing[playerid] == 1)
- {
- SendClientMessage(playerid,0xFF0000FF,"You left the checkpoint and your robbery is failed.");
- GameTextForPlayer(playerid, "Airport Robbery ~r~FAILED.", 3000, 5);
- IsApRobbing[playerid] =0;
- pApRobCount[playerid] = 0;
- KillTimer(pApRobTimerID[playerid]);
- aprobmoney[playerid] = 0;
- }
- }
- return 1;
- }
- //////////////////
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- switch(componentid)
- {
- case 1008..1010: if(IsPlayerInInvalidNosVehicle(playerid)) RemoveVehicleComponent(vehicleid, componentid);
- }
- if(!IsComponentidCompatible(GetVehicleModel(vehicleid), componentid)) RemoveVehicleComponent(vehicleid, componentid);
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER && gTeam[playerid] != TEAM_COP)
- {
- switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
- {
- case 497, 447, 523, 416, 433, 427, 490, 528, 407, 544, 596, 597, 598, 599, 432, 601, 470, 472, 430, 428:
- {
- SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+4);
- SendClientMessage(playerid, yellow, "** - VEHICLE CMDS: /lock (Lock the vehicle) - /cw (Send a message to the passengers in your car) - /ej (Eject a player from your vehicle) - /ejall (Eject all passengers from your vehicle)**");
- new string[64];
- format(string, sizeof(string), "- CRIME - Law Enforcement Vehicle Theft - Wanted Level %d ", GetPlayerWantedLevel(playerid));
- SendClientMessage(playerid, red, string);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(!IsPlayerConnected(i))continue;
- if(gTeam[i] == TEAM_COP)
- {
- new copmsg[170];
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(copmsg, sizeof(copmsg), "- WARNING ALL COPS: Law Enforcement Vehicle Theft By %s (%d)",name,playerid);
- SendClientMessage(i, COLOR_BLUE, copmsg);
- }
- }
- }
- default:
- {
- SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+1);
- SendClientMessage(playerid, yellow, "** - VEHICLE CMDS: /lock (Lock the vehicle) - /cw (Send a message to the passengers in your car) - /ej (Eject a player from your vehicle) - /ejall (Eject all passengers from your vehicle)**");
- new string[64];
- format(string, sizeof(string), "*CRIME* Vehicle Theft - Wanted Level %d", GetPlayerWantedLevel(playerid));
- SendClientMessage(playerid, red, string);
- }
- }
- }
- if(newstate == 2)
- {
- if(LockVeh[playerid] == true)
- {
- GameTextForPlayer(playerid, "~g~Vehicle Unlocked. Use /lock to lock it.", 5000, 5);
- SendClientMessage(playerid,yellow,"Vehicle unlocked.Use /lock to lock it.");
- LockVeh[playerid] = false;
- }
- }
- return 1;
- }
- public OnGameModeInit()
- {
- CreateDynamicObject(10828,-11.69999981,-32.40000153,1003.90002441,0.00000000,0.00000000,0.00000000); //object(drydock1_sfse) (3)
- CreateDynamicObject(10828,-11.69999981,-32.09999847,1003.90002441,0.00000000,0.00000000,0.00000000); //object(drydock1_sfse) (4)
- BankPickup = CreatePickup(1559,23, -2055.7046,455.5927,35.1719, 0);
- PdEnter = CreatePickup(1559,23, -1605.5038,711.3857,13.8672, 0);
- PdExit = CreatePickup(1559,23, 246.2863,108.7611,1003.2188, 0);
- VentiQuattroSetteEnter = CreatePickup(1559,14,-2766.2039,788.3242,52.7813, 0);
- SupaSaveEnter = CreatePickup(1559,23, -2442.1296,752.2203,35.1786, 0);
- SupaSaveExit = CreatePickup(1559,23, -27.3176,-28.6873,1003.5573, 0);
- HippyShopEnter = CreatePickup(1559,23, -2507.7576,-49.3189,25.6880, 0);
- XoomerEnter = CreatePickup(1559,23, -2417.7581,969.4247,45.2969, 0);
- Servt = TextDrawCreate(551.000000, 21.000000, "Loading...");
- TextDrawBackgroundColor(Servt, 255);
- TextDrawFont(Servt, 3);
- TextDrawLetterSize(Servt, 0.509999, 2.300000);
- TextDrawColor(Servt, COLOR_WHITE);
- TextDrawSetOutline(Servt, 1);
- TextDrawSetProportional(Servt, 1);
- Tsec= 0;
- THrs= 0;
- SetTimer("TimeU",1000,true);
- //Timers//
- SetTimer("WantedLevelReduce",60000,1);
- SetTimer("HealthWantedTimer", 500, 1);
- SetTimer("RandomMsg", 60000, 1);
- SetTimer("WantedColor", 250, 1);
- SetTimer("InfoUpdate", 1000, 1);
- SetTimer("UpdateTimeAndWeather",1000 * 60,1);
- SetTimer("SaveAllStats", 600000, true);
- if(!zoneupdate) zoneupdate = SetTimer("update_zones",1000,4);
- //Timers//
- //Labels//
- Create3DTextLabel("San Fierro Police Department",0x03B8FCFF,-1696.856445, 683.807678, 23.920885,40,0);
- Create3DTextLabel("San Fierro Police Department",0x03B8FCFF,-1575.309692, 662.124145, 7.187500,40,0);
- Create3DTextLabel("WangCars Shop",0x03B8FCFF,-1966.775878, 293.800231, 35.468750,40,0);
- Create3DTextLabel("Cops Spawn",0x03B8FCFF,-1614.045898, 677.333251, -4.906250,40,0);
- Create3DTextLabel("Wang Cars Robbery",0x03B8FCFF,-1955.852783, 307.635253, 41.047080,40,0);
- Create3DTextLabel("Fire Dept Robbery",0x03B8FCFF,-2049.581542, 86.088500, 28.397680,40,0);
- Create3DTextLabel("Drug Factory Robbery",0x03B8FCFF,-2140.137695, -256.802703, 40.719505,40,0);
- Create3DTextLabel("Ammunation Robbery",0x03B8FCFF,296.667388, -35.391712, 1001.515625,40,0);
- //Labels//
- AntiDeAMX();
- AddStaticVehicle(531,-1371.0148,-96.2348,5.9636,89.4387,1,1); // tractor
- AddStaticVehicle(534,-1370.5197,-88.0032,5.7231,269.7726,1,1); // remington
- AddStaticVehicle(415,-1384.7444,-120.9769,5.7715,268.2145,1,1); // cheetah
- AddStaticVehicle(530,-1385.5354,-59.0471,5.7651,92.1237,1,1); // forklift
- AddStaticVehicle(514,-1338.3792,-140.4709,6.5865,272.7024,1,1); // tanker
- AddStaticVehicle(411,-2031.5251,459.8979,34.8993,1.1593,1,1); // infernus 1
- AddStaticVehicle(576,-2052.4709,487.7914,34.7824,90.1205,1,1); // tornado 1
- AddStaticVehicle(597,-1729.1639,-146.5731,3.3211,74.6309,1,0); // police sf
- AddStaticVehicle(448,2122.1677,-1784.2250,12.9837,180.4585,0,0); // Pizza 1
- AddStaticVehicle(448,2121.9895,-1784.7623,12.9867,181.5936,0,0); // Pizza 1
- AddStaticVehicle(448,2118.8469,-1784.5692,12.9880,181.5090,0,0); // Pizza 2
- AddStaticVehicle(448,2115.7837,-1784.6464,12.9860,181.6605,0,0); // Pizza 3
- AddStaticVehicleEx(537,-1943.6974,152.6217,25.7109,357.4802,1,1,30000); // SF Train
- AddStaticVehicleEx(449,2864.8074,1300.4865,10.8203,359.8550,1,1,30000); // LV Train
- AddStaticVehicleEx(538,1700.7551,-1953.6531,14.8756,200.0,-1,-1,900); // LS Train
- AddStaticVehicle(448,-2344.7319,-126.4812,34.9120,180.0935,3,6); //
- AddStaticVehicle(448,-2340.5674,-127.7800,34.9134,359.0777,3,6); //
- AddStaticVehicle(448,-2336.7522,-125.3024,34.9120,178.5847,3,6); //
- AddStaticVehicle(448,-2333.5371,-124.7747,34.9116,1.0960,3,6); //
- AddStaticVehicle(448,-2329.2415,-126.7518,34.9121,182.3031,3,6); //
- AddStaticVehicle(581,-2325.8794,-126.5727,34.9111,358.8097,72,1); //
- AddStaticVehicle(534,-2318.3142,-125.4287,35.0348,269.8866,53,53); //
- AddStaticVehicle(448,-2321.6216,-143.7533,35.1560,178.9219,3,6); //
- AddStaticVehicle(448,-2331.3416,-173.8700,34.9184,94.1097,3,6); //
- AddStaticVehicle(560,-2147.2500,-102.1559,35.0251,89.0822,56,29); //
- AddStaticVehicle(400,-1926.2506,585.9864,35.1987,181.4324,40,1); //
- AddStaticVehicle(401,-1934.6063,584.4495,34.9143,42.9636,74,74); //
- AddStaticVehicle(404,-1947.6801,585.4507,34.8543,0.0361,119,50); //
- AddStaticVehicle(448,-1823.0538,615.8429,34.7712,87.5997,3,6); //
- AddStaticVehicle(448,-1812.4846,615.8424,34.7689,270.7038,3,6); //
- AddStaticVehicle(448,-1800.8177,615.6901,34.0006,267.9461,3,6); //
- AddStaticVehicle(448,-1790.6464,615.3405,32.1558,268.1036,3,6); //
- AddStaticVehicle(448,-1830.8092,615.1036,34.7698,91.5953,3,6); //
- AddStaticVehicle(436,-1732.7036,589.4048,24.6386,359.8257,95,1); //
- AddStaticVehicle(401,-1739.9882,589.7590,24.6465,181.3205,87,87); //
- AddStaticVehicle(487,-1602.4985,683.2431,17.3392,91.2297,26,3); //
- AddStaticVehicle(461,-2172.3792,-221.3272,34.9165,274.2125,88,1); // pcj600 drug factory
- EnableStuntBonusForAll(0);
- //BOTS//
- //gBotID[0] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_1_NICKNAME, BOT_1_REALNAME, BOT_1_USERNAME);
- //IRC_SetIntData(gBotID[0], E_IRC_CONNECT_DELAY, 5);
- // gBotID[1] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_2_NICKNAME, BOT_2_REALNAME, BOT_2_USERNAME);
- // IRC_SetIntData(gBotID[1], E_IRC_CONNECT_DELAY, 5);
- // gBotID[2] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_3_NICKNAME, BOT_3_REALNAME, BOT_3_USERNAME);
- // IRC_SetIntData(gBotID[2], E_IRC_CONNECT_DELAY, 5);
- // gBotID[3] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_4_NICKNAME, BOT_4_REALNAME, BOT_4_USERNAME);
- // IRC_SetIntData(gBotID[3], E_IRC_CONNECT_DELAY, 5);
- // gBotID[4] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_5_NICKNAME, BOT_5_REALNAME, BOT_5_USERNAME);
- // IRC_SetIntData(gBotID[4], E_IRC_CONNECT_DELAY, 5);
- // gGroupID = IRC_CreateGroup();
- //BOTS//
- CopsRules0 = TextDrawCreate(273.000000, 139.000000, "Cops Rules");
- TextDrawBackgroundColor(CopsRules0, 255);
- TextDrawFont(CopsRules0, 3);
- TextDrawLetterSize(CopsRules0, 0.500000, 2.000000);
- TextDrawColor(CopsRules0, -1);
- TextDrawSetOutline(CopsRules0, 1);
- TextDrawSetProportional(CopsRules0, 1);
- TextDrawUseBox(CopsRules0, 1);
- TextDrawBoxColor(CopsRules0, 80);
- TextDrawTextSize(CopsRules0, 371.000000, 30.000000);
- CopsRules1 = TextDrawCreate(144.000000, 162.000000, "Cops are NOT allowed to shoot WHITE and YELLOW players. (Innocents and Ticketables).");
- TextDrawBackgroundColor(CopsRules1, 255);
- TextDrawFont(CopsRules1, 1);
- TextDrawLetterSize(CopsRules1, 0.490000, 1.600000);
- TextDrawColor(CopsRules1, -16776961);
- TextDrawSetOutline(CopsRules1, 1);
- TextDrawSetProportional(CopsRules1, 1);
- TextDrawUseBox(CopsRules1, 1);
- TextDrawBoxColor(CopsRules1, 80);
- TextDrawTextSize(CopsRules1, 525.000000, 30.000000);
- CopsRules2 = TextDrawCreate(144.000000, 190.000000, "You can ONLY kill RED players (Most Wanted).You can't also kill your own team mate! Watch out.");
- TextDrawBackgroundColor(CopsRules2, 255);
- TextDrawFont(CopsRules2, 1);
- TextDrawLetterSize(CopsRules2, 0.490000, 1.700000);
- TextDrawColor(CopsRules2, -1);
- TextDrawSetOutline(CopsRules2, 1);
- TextDrawSetProportional(CopsRules2, 1);
- TextDrawUseBox(CopsRules2, 1);
- TextDrawBoxColor(CopsRules2, 80);
- TextDrawTextSize(CopsRules2, 476.000000, 30.000000);
- CopsRules3 = TextDrawCreate(144.000000, 239.000000, "Read /cmds for your commands!");
- TextDrawBackgroundColor(CopsRules3, 255);
- TextDrawFont(CopsRules3, 1);
- TextDrawLetterSize(CopsRules3, 0.490000, 1.700000);
- TextDrawColor(CopsRules3, 16777215);
- TextDrawSetOutline(CopsRules3, 1);
- TextDrawSetProportional(CopsRules3, 1);
- TextDrawUseBox(CopsRules3, 1);
- TextDrawBoxColor(CopsRules3, 80);
- TextDrawTextSize(CopsRules3, 476.000000, 30.000000);
- CopsRules4 = TextDrawCreate(244.000000, 259.000000, "Click Left mouse button to close this textdraw.");
- TextDrawBackgroundColor(CopsRules4, 80);
- TextDrawFont(CopsRules4, 2);
- TextDrawLetterSize(CopsRules4, 0.310000, 1.500000);
- TextDrawColor(CopsRules4, -1);
- TextDrawSetOutline(CopsRules4, 1);
- TextDrawSetProportional(CopsRules4, 1);
- TextDrawUseBox(CopsRules4, 1);
- TextDrawBoxColor(CopsRules4, 80);
- TextDrawTextSize(CopsRules4, 422.000000, 30.000000);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- RemoveBuildingForPlayer(i, 8229, 0.0, 0.0, 0.0, 6000.0);
- RemoveBuildingForPlayer(i, 11014, 0.0, 0.0, 0.0, 6000.0);
- RemoveBuildingForPlayer(i, 11372, 0, 0, 0, 6000.0);
- WantedLvlTxd[i] = TextDrawCreate(458.000000, 430.000000, "Wanted Level:");
- TextDrawBackgroundColor(WantedLvlTxd[i], 255);
- TextDrawFont(WantedLvlTxd[i], 2);
- TextDrawLetterSize(WantedLvlTxd[i], 0.400000, 1.000000);
- TextDrawColor(WantedLvlTxd[i], -1);
- TextDrawSetOutline(WantedLvlTxd[i], 1);
- TextDrawSetProportional(WantedLvlTxd[i], 1);
- TextDrawUseBox(WantedLvlTxd[i], 1);
- TextDrawBoxColor(WantedLvlTxd[i], 80);
- TextDrawTextSize(WantedLvlTxd[i], 638.000000, 18.000000);
- DrugTxd[i] = TextDrawCreate(292.000000, 430.000000, "Drugs:");
- TextDrawBackgroundColor(DrugTxd[i], 255);
- TextDrawFont(DrugTxd[i], 2);
- TextDrawLetterSize(DrugTxd[i], 0.400000, 1.000000);
- TextDrawColor(DrugTxd[i], -1);
- TextDrawSetOutline(DrugTxd[i], 1);
- TextDrawSetProportional(DrugTxd[i], 1);
- TextDrawUseBox(DrugTxd[i], 1);
- TextDrawBoxColor(DrugTxd[i], 80);
- TextDrawTextSize(DrugTxd[i], 437.000000, 18.000000);
- }
- DollarTxd = TextDrawCreate(498.000000, 78.000000, "$");
- TextDrawBackgroundColor(DollarTxd, 255);
- TextDrawFont(DollarTxd, 2);
- TextDrawLetterSize(DollarTxd, 0.480000, 1.900000);
- TextDrawColor(DollarTxd, -16776961);
- TextDrawSetOutline(DollarTxd, 1);
- TextDrawSetProportional(DollarTxd, 1);
- //ROB CHECKPOINTS//
- CPs[0] = CreateDynamicCP(-2141.4019,-256.8884,40.7195, 1.0, -1,-1, -1, 15.0); // Drugfactory rob CP
- CPs[1] = CreateDynamicCP(-1955.7079,306.0107,41.0471,1.0, -1,-1, -1, 15.0); // WangCarsRobberyCPDoherty
- CPs[2] = CreateDynamicCP(-2051.8376,86.0918,28.3977,1.0, -1,-1, -1, 15.0); // SanFierroFireDeptRobberyCP
- CPs[4] = CreateDynamicCP(365.1240,-6.7055,1001.8516,1.0, -1,-1, -1, 15.0); // CluckinBellDowntownRobberyCP
- CPs[5] = CreateDynamicCP(-201.7283,-7.8537,1002.2734,1.0, -1,-1, -1, 15.0); // HemLockTatooRobberyCP
- CPs[6] = CreateDynamicCP(296.7915,-35.3443,1001.5156,1.0, -1,-1, -1, 15.0); // AmmunationOceanFlatsRobberyCP
- CPs[7] = CreateDynamicCP(379.6270,-8.7878,1001.8516,1.0, -1,-1, -1, 15.0); // CluckinBellOceanFlatsRobberyCP
- CPs[8] = CreateDynamicCP(216.6623,-100.1878,1005.2578,1.0, -1,-1, -1, 15.0); // BincoJuniperHillRobberyCP
- CPs[9] = CreateDynamicCP(379.7124,-59.6829,1001.5078,1.0, -1,-1, -1, 15.0); // BurgerShotJuniperHollowRobberyCP
- CPs[10] = CreateDynamicCP(203.6611,-40.2956,1001.8047,1.0, -1,-1, -1, 15.0); // SubUrbanHashBuryRobberyCP
- CPs[11] = CreateDynamicCP(-1366.1598,-102.6746,6.0000,1.0, -1,-1, -1, 15.0); // SubUrbanHashBuryRobberyCP
- //////////////////
- SetGameModeText("Cops And Robbers");
- AddPlayerClass(267,-1624.7889,661.7517,-5.2422,15.6977,0,0,0,0,0,0); // cops spawns 1
- AddPlayerClass(280,-1575.8567,683.4586,7.1875,162.8213,0,0,0,0,0,0); // cops spawn 2
- AddPlayerClass(281,-1312.9390,449.5147,7.1875,2.5779,0,0,0,0,0,0); // cops spawn 3
- AddPlayerClass(282,-1533.8368,443.2560,7.1875,350.5003,0,0,0,0,0,0); // cops spawn 4
- AddPlayerClass(283,-1672.0995,695.1385,30.6016,78.8497,0,0,0,0,0,0); // cops spawn 5
- AddPlayerClass(7,-2051.7437,478.5006,35.1723,261.2405,0,0,0,0,0,0); // civilians spawn 1
- AddPlayerClass(2,-1978.5852,518.4033,32.4273,2.2664,0,0,0,0,0,0); // civilians spawn 2
- AddPlayerClass(11,-2208.7888,613.0753,39.9439,192.4596,0,0,0,0,0,0); // civilians spawn 3
- AddPlayerClass(45,-2662.7798,631.2329,14.4531,194.1294,0,0,0,0,0,0); // civilians spawn 4
- AddPlayerClass(61,-2615.2019,831.7502,49.9844,274.0673,0,0,0,0,0,0); // civilians spawn 5
- AddPlayerClass(60,-2594.7808,837.5500,51.7820,84.6672,0,0,0,0,0,0); // civilians spawn 6
- AddPlayerClass(66,-2630.8120,923.6958,70.1452,189.1202,0,0,0,0,0,0); // civilians spawn 7
- AddPlayerClass(87,-2603.6016,2257.1514,8.2109,50.0149,0,0,0,0,0,0); // civilians spawn 8
- AddPlayerClass(123,-2624.0911,2331.8257,8.3298,282.1367,0,0,0,0,0,0); // civilians spawn 9
- AddPlayerClass(127,-2436.3953,2450.2117,13.7866,179.8086,0,0,0,0,0,0); // civilians spawn 10
- // SPECIAL
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/pilots.txt");
- // LAS VENTURAS
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");
- // SAN FIERRO
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_law.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_airport.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_gen.txt");
- // LOS SANTOS
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_law.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_airport.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");
- // OTHER AREAS
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/bone.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/tierra.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");
- UsePlayerPedAnims();
- return 1;
- }
- public OnGameModeExit()
- {
- IRC_Quit(gBotID[0], "Bot exiting");
- IRC_Quit(gBotID[1], "Bot exiting");
- IRC_Quit(gBotID[2], "Bot exiting");
- IRC_Quit(gBotID[3], "Bot exiting");
- IRC_Quit(gBotID[4], "Bot exiting");
- IRC_DestroyGroup(gGroupID);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- new INI:File = INI_Open(UserPath(i));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Cash",GetPlayerMoney(i));
- INI_WriteInt(File,"Admin",PlayerInfo[i][pAdmin]);
- INI_WriteInt(File,"Kills",PlayerInfo[i][pKills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[i][pDeaths]);
- INI_WriteInt(File,"WantedLevel",GetPlayerWantedLevel(i));
- INI_WriteInt(File,"Vip",PlayerInfo[i][pVip]);
- INI_WriteInt(File,"Score",GetPlayerScore(i));
- INI_WriteInt(File,"Condoms",PlayerInfo[i][pCondoms]);
- INI_WriteInt(File,"Banned",PlayerInfo[i][pBanned]);
- INI_WriteInt(File,"Jailed",PlayerInfo[i][pJailed]);
- INI_WriteInt(File,"Drugs",PlayerInfo[i][pDrug]);
- INI_WriteInt(File,"Nopm",PlayerInfo[i][pNopm]);
- INI_WriteInt(File,"Bank",PlayerInfo[i][pBank]);
- INI_WriteInt(File,"Sausages",PlayerInfo[i][pSausage]);
- INI_WriteInt(File,"PassChange",PlayerInfo[i][pPassChange]);
- INI_WriteInt(File,"Mute",PlayerInfo[i][pMuted]);
- INI_Close(File);
- TextDrawHideForPlayer(i,WantedLvlTxd[i]);
- TextDrawHideForPlayer(i,DollarTxd);
- TextDrawHideForPlayer(i,DrugTxd[i]);
- }
- TextDrawHideForAll(CopsRules0);
- TextDrawDestroy(CopsRules0);
- TextDrawHideForAll(CopsRules1);
- TextDrawDestroy(CopsRules1);
- TextDrawHideForAll(CopsRules2);
- TextDrawDestroy(CopsRules2);
- TextDrawHideForAll(CopsRules3);
- TextDrawDestroy(CopsRules3);
- TextDrawHideForAll(CopsRules4);
- TextDrawDestroy(CopsRules4);
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 268.4988,1884.0615,-30.0938);
- SetPlayerFacingAngle(playerid, 184.2539);
- SetPlayerCameraPos(playerid, 268.5090,1880.9513,-30.3906);
- SetPlayerCameraLookAt(playerid, 268.4988,1884.0615,-30.0938);
- SetPlayerTeamFromClass(playerid, classid);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- SendDeathMessage(killerid, playerid, reason);
- TextDrawHideForPlayer(playerid,LocationTD[playerid]);
- if(gTeam[killerid] == TEAM_CIV && gTeam[playerid] == TEAM_COP)
- {
- new plwl = GetPlayerWantedLevel(killerid);
- SetPlayerWantedLevel(killerid,plwl +6);
- new string2[128];
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string2, sizeof(string2), "- MURDER - You have murdered %s (%d) - Wanted Level: %d",pname,playerid,plwl);
- SendClientMessage(killerid,red,string2);
- plwl = GetPlayerWantedLevel(killerid);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(gTeam[i] == TEAM_COP)
- {
- new copmsg[170];
- new kname[MAX_PLAYER_NAME];
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(kname));
- GetPlayerName(killerid, kname, sizeof(kname));
- format(copmsg, sizeof(copmsg), "- WARNING ALL COPS: %s (%d) murdered %s (%d)",kname,killerid,name,playerid);
- SendClientMessage(i, COLOR_BLUE, copmsg);
- }
- }
- }
- if(gTeam[killerid] == TEAM_COP && gTeam[playerid] == TEAM_CIV)
- {
- switch(GetPlayerWantedLevel(playerid))
- {
- case 0 .. 3:
- {
- new string2[170];
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string2, sizeof(string2), "INNOCENT KILL! You killed an innocent player and 10.000$ have been fined.Read /crules next time! - Murdered: %s (%d) -",pname,playerid);
- SendClientMessage(killerid,red,string2);
- GivePlayerMoney(killerid,-10000);
- SetPlayerScore(killerid, GetPlayerScore(killerid) -1);
- }
- }
- }
- if(gTeam[killerid] == TEAM_CIV && gTeam[playerid] == TEAM_CIV)
- {
- new plwl = GetPlayerWantedLevel(killerid);
- SetPlayerWantedLevel(killerid,plwl +6);
- new string2[128];
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string2, sizeof(string2), "- MURDER - You have murdered %s (%d) - Wanted Level: %d",pname,playerid,plwl);
- SendClientMessage(killerid,red,string2);
- plwl = GetPlayerWantedLevel(killerid);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(gTeam[i] == TEAM_COP)
- {
- new copmsg[170];
- new kname[MAX_PLAYER_NAME];
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(kname));
- GetPlayerName(killerid, kname, sizeof(kname));
- format(copmsg, sizeof(copmsg), "- WARNING ALL COPS: %s (%d) murdered %s (%d)",kname,killerid,name,playerid);
- SendClientMessage(i, COLOR_BLUE, copmsg);
- }
- }
- }
- if(gTeam[killerid] == TEAM_COP && gTeam[playerid] == TEAM_COP)
- {
- new string2[170];
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string2, sizeof(string2), "COP TEAM KILL! You killed a COP,it's in your team you dumbass! Read /crules next time! 15.000$ fined. - Murdered: %s (%d) -",pname,playerid);
- SendClientMessage(killerid,red,string2);
- GivePlayerMoney(killerid,-15000);
- SetPlayerScore(killerid, GetPlayerScore(killerid) -1);
- }
- if(IsRobbing[playerid] == 1)
- {
- SendClientMessage(killerid,0xFF0000FF,"You have been killed and your robbery is failed.");
- GameTextForPlayer(playerid, "Robbery ~r~FAILED.", 3000, 5);
- IsRobbing[playerid] =0;
- pRobCount[playerid] = 0;
- KillTimer(pRobTimerID[playerid]);
- }
- if(IsBankRobbing[playerid] == 1)
- {
- SendClientMessage(killerid,0xFF0000FF,"You have been killed and your bank robbery is failed.");
- GameTextForPlayer(playerid, "Bank Robbery ~r~FAILED.", 3000, 5);
- IsBankRobbing[playerid] =0;
- pBankRobCount[playerid] = 0;
- KillTimer(pBankRobTimerID[playerid]);
- }
- if(IsApRobbing[playerid] == 1)
- {
- SendClientMessage(killerid,0xFF0000FF,"You have been killed and your airport robbery is failed.");
- GameTextForPlayer(playerid, "Airport Robbery ~r~FAILED.", 3000, 5);
- IsApRobbing[playerid] =0;
- pApRobCount[playerid] = 0;
- KillTimer(pApRobTimerID[playerid]);
- }
- if(PlayerInfo[playerid][pVip] == 0)
- {
- SetTimerEx("MedFeesTimer", 5000, 0, "i", playerid);
- }
- if(PlayerInfo[playerid][pJailed] == 1)
- {
- pJailTimerID[killerid] = SetTimerEx("pJailTimer", 1000, true, "i", killerid);
- SendClientMessage(killerid,0xFF0000FF,"You have been caught by the security guards in a jail fight. You have recieved an extra jail sentence.");
- new Random = random(sizeof(RandomJailSpawns));
- SetPlayerPos(killerid, RandomJailSpawns[Random][0], RandomJailSpawns[Random][1], RandomJailSpawns[Random][2]);
- SetPlayerFacingAngle(killerid, RandomJailSpawns[Random][3]);
- pJailCount[killerid] +=180;
- ResetPlayerWeapons(killerid);
- SetPlayerInterior(killerid, 10);
- SetPlayerWantedLevel(killerid,0);
- }
- PlayerInfo[killerid][pKills]++;
- PlayerInfo[playerid][pDeaths]++;
- if(XDeaths[playerid] == 0)
- {
- LastDeath[playerid] = gettime();
- }
- XDeaths[playerid]++;
- if(XDeaths[playerid] == 5)
- {
- if((gettime() - LastDeath[playerid]) <= 5)
- {
- new name[MAX_PLAYER_NAME],string[190],string2[190],msg[190];
- GetPlayerName(playerid, name, sizeof(name));
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- format(string,sizeof(string),"You have been banned by AntiCheat for Fake Kills. - %02d/%02d/%d - %02d:%02d:%02d",Day,Month,Year,Hour,Minute,Second);
- SendClientMessage(playerid,red,string);
- ApplyAnimation(playerid, "FAT", "FatWalk", 4.1,1,1,1,1,1,0);
- SetPlayerAttachedObject(playerid, 0, 321, 1, -0.25,-0.33,-0.06 ,90,180,0);
- GameTextForPlayer(playerid, "~p~Oh shit! That dildo in your ass hurts!!", 9000, 6);
- SetPlayerDrunkLevel(playerid, 9000);
- GameTextForPlayer(playerid, "~r~Surprise!!!!!", 4000, 4);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- SetPlayerAttachedObject(playerid, 1, 1, 0);
- PlayerInfo[playerid][pBanned] = 1;
- format(string2, sizeof(string), "AC: %s has been banned for Fake Kills. - %02d/%02d/%d - %02d:%02d:%02d",name,reason,Day,Month,Year,Hour,Minute,Second);
- SendClientMessageToAll(red,string2);
- format(msg, sizeof(msg), "4AC: %s has been banned for Fake Kills. - %02d/%02d/%d - %02d:%02d:%02d",name,reason,Day,Month,Year,Hour,Minute,Second);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
- BanLog(string2);
- BanEx(playerid,string2);
- }else
- if((gettime() - LastDeath[playerid]) > 5)
- {
- XDeaths[playerid]=0;
- }
- }
- new msg[128], killerName[MAX_PLAYER_NAME], reasonMsg[32], playerName[MAX_PLAYER_NAME];
- GetPlayerName(killerid, killerName, sizeof(killerName));
- GetPlayerName(playerid, playerName, sizeof(playerName));
- if (killerid != INVALID_PLAYER_ID)
- {
- switch (reason)
- {
- case 0: reasonMsg = "Unarmed";
- case 1: reasonMsg = "Brass Knuckles";
- case 2: reasonMsg = "Golf Club";
- case 3: reasonMsg = "Night Stick";
- case 4: reasonMsg = "Knife";
- case 5: reasonMsg = "Baseball Bat";
- case 6: reasonMsg = "Shovel";
- case 7: reasonMsg = "Pool Cue";
- case 8: reasonMsg = "Katana";
- case 9: reasonMsg = "Chainsaw";
- case 10: reasonMsg = "Dildo";
- case 11: reasonMsg = "Dildo";
- case 12: reasonMsg = "Vibrator";
- case 13: reasonMsg = "Vibrator";
- case 14: reasonMsg = "Flowers";
- case 15: reasonMsg = "Cane";
- case 22: reasonMsg = "Pistol";
- case 23: reasonMsg = "Silenced Pistol";
- case 24: reasonMsg = "Desert Eagle";
- case 25: reasonMsg = "Shotgun";
- case 26: reasonMsg = "Sawn-off Shotgun";
- case 27: reasonMsg = "Combat Shotgun";
- case 28: reasonMsg = "MAC-10";
- case 29: reasonMsg = "MP5";
- case 30: reasonMsg = "AK-47";
- case 31: reasonMsg = "M4";
- case 32: reasonMsg = "TEC-9";
- case 33: reasonMsg = "Country Rifle";
- case 34: reasonMsg = "Sniper Rifle";
- case 37: reasonMsg = "Fire";
- case 38: reasonMsg = "Minigun";
- case 41: reasonMsg = "Spray Can";
- case 42: reasonMsg = "Fire Extinguisher";
- case 49: reasonMsg = "Vehicle Collision";
- case 50: reasonMsg = "Vehicle Collision";
- case 51: reasonMsg = "Explosion";
- default: reasonMsg = "Unknown";
- }
- format(msg, sizeof(msg), "7*** %s killed %s. (%s)", killerName, playerName, reasonMsg);
- }
- else
- {
- switch (reason)
- {
- case 53: format(msg, sizeof(msg), "4*** %s died. (Drowned)", playerName);
- case 54: format(msg, sizeof(msg), "4*** %s died. (Collision)", playerName);
- default: format(msg, sizeof(msg), "4*** %s died.", playerName);
- }
- }
- IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
- IsRobbing[playerid] =0;
- IsBankRobbing[playerid] =0;
- IsApRobbing[playerid] =0;
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SetPlayerToTeamColour(playerid);
- if(gTeam[playerid] == TEAM_CIV)
- {
- GivePlayerWeapon(playerid,23,100);
- GivePlayerWeapon(playerid,32,50);
- }
- if(gTeam[playerid] == TEAM_COP)
- {
- GivePlayerWeapon(playerid,3,1);
- GivePlayerWeapon(playerid,22,50);
- GivePlayerWeapon(playerid,30,75);
- }
- SetPlayerInterior(playerid,0);
- SetPlayerMapIcon(playerid, 12, -2050.9399,461.4982,35.1719, 52, 0, MAPICON_LOCAL);
- SetPlayerMapIcon(playerid, 57, -1366.1598,-102.6746,6.0000, 52, 0, MAPICON_LOCAL);
- SetPlayerMapIcon(playerid, 57, -2766.2039,788.3242,52.7813, 17, 0, MAPICON_LOCAL);
- SetPlayerMapIcon(playerid, 57, -2440.0798,742.6775,35.0156, 17, 0, MAPICON_LOCAL);
- SetPlayerMapIcon(playerid, 57, -2507.7576,-49.3189,25.6880, 17, 0, MAPICON_LOCAL);
- SetPlayerMapIcon(playerid, 57, -2417.7581,969.4247,45.2969, 17, 0, MAPICON_LOCAL);
- TextDrawShowForPlayer(playerid, DollarTxd);
- TextDrawShowForPlayer(playerid,Servt);
- TextDrawShowForPlayer(playerid, LocationTD[playerid]);
- if(PlayerInfo[playerid][pJailed] == 1)
- {
- pJailTimerID[playerid] = SetTimerEx("pJailTimer", 1000, true, "i", playerid);
- pJailCount[playerid] = 20 + random(41);
- SendClientMessage(playerid,0xFF0000FF,"Welcome,go back in the jail and pay for your crimes.");
- new Random = random(sizeof(RandomJailSpawns));
- SetPlayerPos(playerid, RandomJailSpawns[Random][0], RandomJailSpawns[Random][1], RandomJailSpawns[Random][2]);
- SetPlayerFacingAngle(playerid, RandomJailSpawns[Random][3]);
- ResetPlayerWeapons(playerid);
- SetPlayerInterior(playerid, 10);
- SetPlayerWantedLevel(playerid,0);
- }
- return 1;
- }
- /*---------------------------------------------------------------------------------------------*/
- //VIP COMMANDS//
- CMD:skin(playerid, params[])
- {
- if(PlayerInfo[playerid][pVip] == 0) return SendClientMessage(playerid,0xFF0000FF,"This command is allowed only for VIP players.");
- ShowPlayerDialog(playerid, 18, DIALOG_STYLE_INPUT, "Skin ID Selection", "Please type the Skin ID [0-299]", "Select", "Cancel");
- return 1;
- }
- CMD:weather(playerid, params[])
- {
- if(PlayerInfo[playerid][pVip] == 0) return SendClientMessage(playerid,0xFF0000FF,"This command is allowed only for VIP players.");
- ShowPlayerDialog(playerid, 19, DIALOG_STYLE_INPUT, "Weather ID Selection", "Please type the Weather ID [0-299]", "Select", "Cancel");
- return 1;
- }
- CMD:fs(playerid, params[])
- {
- if(PlayerInfo[playerid][pVip] == 0) return SendClientMessage(playerid,0xFF0000FF,"This command is allowed only for VIP players.");
- ShowPlayerDialog(playerid, 20, DIALOG_STYLE_LIST, "Select Your Fight Style", "Normal \nBoxing \nKung Fu \nKneehead \nGrabkick \nElbow", "OK", "Cancel");
- return 1;
- }
- CMD:vcolor(playerid, params[])
- {
- if(PlayerInfo[playerid][pVip] == 0) return SendClientMessage(playerid,0xFF0000FF,"This command is allowed only for VIP players.");
- new colour1, colour2;
- new tmp[128],player1 = strval(tmp);
- if(sscanf(params,"dd", colour1, colour2))return SendClientMessage(playerid, red, "[ERROR]Usage: /vehcolor [Colour1] [Colour2]");
- ChangeVehicleColor(GetPlayerVehicleID(player1), colour1, colour2);
- SendClientMessage(playerid, green, "Your vehicle colour has been changed!");
- return 1;
- }
- CMD:nos(playerid, params[])
- {
- if(PlayerInfo[playerid][pVip] == 0) return SendClientMessage(playerid,0xFF0000FF,"This command is allowed only for VIP players.");
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, red, "You must in vehicle to use this command.");
- switch(GetVehicleModel( GetPlayerVehicleID(playerid)))
- {
- case 448,461,462,463,468,471,509,510,521,522,523,581,586,449:
- return SendClientMessage(playerid,red,"You can not tune this vehicle!");
- }
- AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
- SendClientMessage(playerid, green, "Nos has been added.");
- return 1;
- }
- //VIP COMMANDS//
- /*---------------------------------------------------------------------------------------------*/
- //GENERAL COMMANDS//
- CMD:cmds(playerid)
- {
- if(gTeam[playerid] == TEAM_COP)
- {
- ShowPlayerDialog(playerid,7,DIALOG_STYLE_MSGBOX,"{3399FF}*****COP Commands*****","/ar (Arrest a supect)-\n/tk (Issue a ticket to a suspect)-\n*****General Commands*****\n/me\n/stats\n/rules\n/help\n/kill\n/pm\n/op\n/gm\n/report\n/ov\n/mwp\n/credits\n/vcmds\n/vinfo\n/lock\n/bug\n/cw\n/myid\n/nopm\n/sausage\n/loc\n/changepass\n/spec\n/specoff\n/ej\n/ejall","Ok","");
- }
- else if(gTeam[playerid] == TEAM_CIV)
- {
- ShowPlayerDialog(playerid,8,DIALOG_STYLE_MSGBOX,"{FFFFFF}*****CIVILIAN Commands*****","/rob (Rob a store)\n/rb (Rob money from players)\n/rape (Rape a player)\n/bankrob (Rob a bank)\n/td (Take Drugs)\n/gd (Give drugs)\n/gs (Give sausages)\n*****General Commands*****\n/me\n/stats\n/rules\n/help\n/kill\n/pm\n/op\n/gm\n/report\n/ov\n/mwp\n/credits\n/vcmds\n/vinfo\n/lock\n/bug\n/cw\n/myid\n/nopm\n/sausage\n/robap\n/loc\n/changepass\n/spec\n/specoff\n/ej\n/ejall","Ok","");
- }
- return true;
- }
- CMD:pm(playerid, params[])
- {
- new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
- if(sscanf(params, "us", id, str2))
- {
- SendClientMessage(playerid, 0xFF0000FF, "Usage: /pm <id> <message>");
- return 1;
- }
- if(PlayerInfo[id][pNopm] == 1) return SendClientMessage(playerid,0xFF0000FF,"This player has /nopm enabled,you can't send him a pm.");
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player not connected");
- if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot pm yourself!");
- if(strlen(params) > 256) return SendClientMessage(playerid,0xFF0000FF, "Your message is too long,reduce it. (Max 256 characters)");
- GetPlayerName(playerid, Name1, sizeof(Name1));
- GetPlayerName(id, Name2, sizeof(Name2));
- format(str, sizeof(str), "PM SENT TO: %s (%d): %s", Name2, id, str2);
- SendClientMessage(playerid, yellow, str);
- format(str, sizeof(str), "PM FROM: %s (%d): %s", Name1, playerid, str2);
- SendClientMessage(id, yellow, str);
- new string[128];
- format(string, sizeof(string), "PM from %s (%d) to %s (%d): %s - %02d/%02d/%d - %02d:%02d:%02d -",Name1,playerid, Name2, id,str2,Day,Month,Year,Hour,Minute,Second);
- PmLog(string);
- SendMessageToAdmins(yellow,string);
- return 1;
- }
- CMD:me(playerid, params[])
- {
- if(isnull(params))return SendClientMessage(playerid, 0xFF0000FF, "Usage: /me [action]");
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- format(str, sizeof(str), "* %s says: %s", str, params);
- SendClientMessageToAll(0xFF9900AA, str);
- return true;
- }
- CMD:rules(playerid)
- {
- Rules(playerid);
- return true;
- }
- CMD:crules(playerid)
- {
- TextDrawShowForPlayer(playerid, CopsRules0);
- TextDrawShowForPlayer(playerid, CopsRules1);
- TextDrawShowForPlayer(playerid, CopsRules2);
- TextDrawShowForPlayer(playerid, CopsRules3);
- TextDrawShowForPlayer(playerid, CopsRules4);
- return true;
- }
- CMD:help(playerid)
- {
- if(gTeam[playerid] == TEAM_COP)
- {
- ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"{3399FF}*****COP Help***** - See {FF0000}/rules -","As a COP,your job is to ARREST criminals with /ar PLAYERID.\n{FF0000}Do NOT kill other cops and civilians for NO reason.\n{33FF00}Check /cmds for your commands.","Ok","");
- }
- else if(gTeam[playerid] == TEAM_CIV)
- {
- ShowPlayerDialog(playerid,4,DIALOG_STYLE_MSGBOX,"{FFFFFF}*****CIVILIAN Help***** - See {FF0000}/rules -","You are a civilian now.Your job is to rob players and stores.\nDon't kill people randomly or you will be arrested,or in extreme cases,killed.\n{33FF00}Check /cmds for your commands.","Ok","");
- }
- return true;
- }
- CMD:kill(playerid, params[])
- {
- if(GetPVarInt(playerid,"KillTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait before suiciding again,you emo.");
- if(PlayerInfo[playerid][pJailed] == 1) return SendClientMessage(playerid, red, "You cannot use this command in jail.");
- if(GetPlayerWantedLevel(playerid) >= 1)
- {
- SendClientMessage(playerid,red,"You cannot use /kill to kill yourself while you have a wanted level.That is arrest evade.");
- return 1;
- }
- SetPlayerHealth(playerid, 0);
- ShowDescriptionText(playerid, "~r~Emo.");
- SetPVarInt(playerid,"KillTime",GetTickCount()+10000);
- return true;
- }
- CMD:stats(playerid, params[])
- {
- new Float:gihp, Float:giar;
- GetPlayerHealth(playerid, gihp);
- GetPlayerArmour(playerid, giar);
- GetPlayerWantedLevel(playerid);
- new temp[1000];
- new info[1000];
- format(temp, sizeof(temp), "Cash: %i$\n",GetPlayerMoney(playerid));
- strcat(info, temp);
- format(temp, sizeof(temp), "Wanted Level: %d\n",PlayerInfo[playerid][pWantedLevel]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Admin Level: %d\n",PlayerInfo[playerid][pAdmin]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Kills: %i\n",PlayerInfo[playerid][pKills]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Deaths: %i\n",PlayerInfo[playerid][pDeaths]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Health: %0.1f\n",gihp);
- strcat(info, temp);
- format(temp, sizeof(temp), "Armour: %0.1f\n",giar);
- strcat(info, temp);
- format(temp, sizeof(temp), "VIP: %d (1 = YES - 0 = NO)\n",PlayerInfo[playerid][pVip]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Score: %i\n",GetPlayerScore(playerid));
- strcat(info, temp);
- format(temp, sizeof(temp), "Condoms: %d\n",PlayerInfo[playerid][pCondoms]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Drugs: %d gr\n",PlayerInfo[playerid][pDrug]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Sausages: %d\n",PlayerInfo[playerid][pSausage]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Nopm enabled: %d\n",PlayerInfo[playerid][pNopm]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Cash in bank: %d$\n",PlayerInfo[playerid][pBank]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Has changed password: %d\n",PlayerInfo[playerid][pPassChange]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Muted: %d\n",PlayerInfo[playerid][pMuted]);
- strcat(info, temp);
- ShowPlayerDialog(playerid, 14, DIALOG_STYLE_MSGBOX,"{53C506}Your Stats",info,"Close","");
- return true;
- }
- CMD:op(playerid, params[])
- {
- new count = 1, name[24], string[128];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- GetPlayerName(i, name, sizeof(name));
- new current_zone = player_zone[playerid];
- format(string, sizeof(string), "%s%s (%d) - Location: %s \n", string, name,i,zones[current_zone][zone_name]);
- count ++;
- }
- }
- if(count != 1)
- {
- ShowPlayerDialog(playerid, 16, DIALOG_STYLE_MSGBOX, "Online Players List", string, "OK", "");
- }
- else ShowPlayerDialog(playerid, 16, DIALOG_STYLE_MSGBOX, "Online Players", "No online players", "OK", "");
- return 1;
- }
- CMD:gm(playerid, params[])
- {
- if(PlayerInfo[playerid][pJailed] == 1) return SendClientMessage(playerid, red, "You cannot use this command in jail.");
- new Destinationid,Ammount,PlayerName[24],DestName[24],String[128];
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- if(GetPVarInt(playerid,"GmTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 5 seconds before giving money again.");
- if (sscanf(params, "ui", Destinationid, Ammount)) return SendClientMessage(playerid, -1, "Usage: /givemoney <playerid> <ammount>");
- if (!IsPlayerConnected(Destinationid)) return SendClientMessage(playerid, -1, "Player is not connected.");
- if (GetPlayerMoney(playerid) < Ammount) return SendClientMessage(playerid, -1, "Insufficent funds.");
- if(IsRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't send money while robbing");
- if(IsBankRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't send money while robbing a bank.");
- if(playerid == Destinationid) return SendClientMessage(playerid,red, "You can't send money to yourself.");
- if(IsApRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't send money while robbing the airport.");
- GetPlayerName(playerid, PlayerName, 24);
- GetPlayerName(Destinationid, DestName, 24);
- format(String, 128, "%s (%d) has sent you %d$", PlayerName, playerid, Ammount);
- SendClientMessage(Destinationid, yellow, String);
- new gmsent[128];
- format(gmsent,sizeof(gmsent),"Sent %d$ to %s (%d)", Ammount,DestName,Destinationid);
- GameTextForPlayer(playerid,gmsent,3000,5);
- format(String, 128, "You've sent %d$ to %s (%d)", Ammount, DestName, Destinationid);
- SendClientMessage(playerid, yellow, String);
- new gmrec[128];
- format(gmrec,sizeof(gmrec),"Received %d$ from %s (%d)", Ammount,PlayerName,Destinationid);
- GameTextForPlayer(Destinationid,gmrec,3000,5);
- GivePlayerMoney(Destinationid, Ammount);
- GivePlayerMoney(playerid, -Ammount);
- SetPVarInt(playerid,"GmTime",GetTickCount()+5000);
- new l[200];
- format(l, 200, "%s (%d) has sent %d$ to %s (%d) - %02d/%02d/%d - %02d:%02d:%02d -", PlayerName,playerid,Ammount,DestName,Destinationid,Day,Month,Year,Hour,Minute,Second);
- GMLog(l);
- return 1;
- }
- CMD:report(playerid,params[])
- {
- new Target;
- new Reason[128];
- if(!sscanf(params, "us[32]",Target, Reason))
- {
- if(Target == playerid) return SendClientMessage(playerid, red, "You can't report yourself.");
- if(strlen(params) >= 70) return SendClientMessage(playerid, red, "Your report can't be more than 70 characters long.");
- if(!IsPlayerConnected(Target))
- return SendClientMessage(playerid, red, "Player is not connected!");
- if(GetPVarInt(playerid,"RepTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 5 seconds before reporting a player again.");
- new tname[MAX_PLAYER_NAME];
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(Target,tname,sizeof(tname));
- GetPlayerName(playerid,pname,sizeof(pname));
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- SendClientMessage(playerid, red, "Player reported to online admins");
- new rstring[256];
- format(rstring,sizeof(rstring),"* Player %s(%d) reported %s(%d)! (Reason: %s) - %02d/%02d/%d - %02d:%02d:%02d -", pname,playerid,tname,Target,Reason,Day,Month,Year,Hour,Minute,Second);
- SendMessageToAdmins(yellow,rstring);
- ReportLog(rstring);
- SetPVarInt(playerid,"RepTime",GetTickCount()+5000);
- }
- else return SendClientMessage(playerid, red, "USAGE: /report <playerid> <reason>");
- return 1;
- }
- CMD:ov(playerid, params[])
- {
- new count = 1, name[24], string[128];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- if(PlayerInfo[playerid][pVip] == 1)
- {
- GetPlayerName(i, name, sizeof(name));
- new current_zone = player_zone[playerid];
- format(string, sizeof(string), "%s%s (%d) - Location: %s \n", string, name,i,zones[current_zone][zone_name]);
- count ++;
- }
- }
- if(count != 1)
- {
- ShowPlayerDialog(playerid, 23, DIALOG_STYLE_MSGBOX, "Online Vips List", string, "OK", "");
- }
- else ShowPlayerDialog(playerid, 23, DIALOG_STYLE_MSGBOX, "Online Vips", "No online vips", "OK", "");
- return 1;
- }
- CMD:vcmds(playerid, params[])
- {
- new dt[180];
- strcat(dt,"/skin (Set your custom player skin).\n");
- strcat(dt,"/weather (Set your custom weather id).\n");
- strcat(dt,"/fs (Set your custom fight style).\n");
- strcat(dt,"/vcolor (Change your vehicle color).\n");
- strcat(dt,"/nos (Add the NOS to your vehicle).\n");
- ShowPlayerDialog(playerid,30,DIALOG_STYLE_MSGBOX, "VIP Status Commands",dt,"Ok","");
- return 1;
- }
- CMD:vinfo(playerid, params[])
- {
- new dt[170];
- strcat(dt,"With the VIP status you have access at this features:\n");
- strcat(dt,"You don't have to pay medical fees when you die or you get killed.\n");
- strcat(dt,"Special VIP commands! See /vcmds for more.\n");
- strcat(dt,"{53C506}REMEMBER:\n");
- strcat(dt,"Being a VIP doesn't give you any rights to be treated different.\n");
- strcat(dt,"The server /rules are applied for both VIPs and PLAYERS.\n");
- ShowPlayerDialog(playerid,31,DIALOG_STYLE_MSGBOX, "VIP Info",dt,"Ok","");
- return 1;
- }
- CMD:mwp(playerid, params[])
- {
- new count = 1, name[24], string[200];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- GetPlayerWantedLevel(i);
- if(GetPlayerWantedLevel(i) >= 5)
- {
- GetPlayerName(i, name, sizeof(name));
- new current_zone = player_zone[playerid];
- format(string, sizeof(string), "%s%s (%d) - Wanted Level: %d - Location: %s\n", string, name,i,GetPlayerWantedLevel(i),zones[current_zone][zone_name]);
- count ++;
- }
- }
- if(count != 1)
- {
- ShowPlayerDialog(playerid, 26, DIALOG_STYLE_MSGBOX, "Most Wanted Players Online", string, "OK", "");
- }
- else ShowPlayerDialog(playerid, 26, DIALOG_STYLE_MSGBOX, "Most Wanted Players Online", "No online wanted players.", "OK", "");
- return 1;
- }
- CMD:lock(playerid, params[])
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFFFFFAA,"You have to be inside a vehicle.");
- if(PlayerInfo[playerid][pJailed] == 1) return SendClientMessage(playerid, red, "You cannot use this command in jail.");
- if(LockVeh[playerid] == false)
- {
- GameTextForPlayer(playerid, "~r~Vehicle Locked. Use again /lock to unlock it.", 5000, 5);
- SendClientMessage(playerid,yellow,"Vehicle locked.Use again /lock to unlock it.");
- RemovePlayerFromVehicle(playerid);
- LockVeh[playerid] = true;
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(i == playerid) continue;
- {
- SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i,0,1);
- }
- }
- }
- else
- {
- GameTextForPlayer(playerid, "~g~Vehicle Unlocked. Use /lock to lock it.", 5000, 5);
- SendClientMessage(playerid,yellow,"Vehicle unlocked.Use /lock to lock it.");
- LockVeh[playerid] = false;
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(i == playerid) continue;
- {
- SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i,0,0);
- }
- }
- }
- return 1;
- }
- CMD:credits(playerid, params[])
- {
- new ok[300];
- strcat(ok,"Original Owner of Most Wanted Cops&Robbers: Most Wanted\n");
- strcat(ok,"Betatester(s): [MG]Proliner - Most Wanted - Bulleh - Fear\n");
- strcat(ok,"Scripter of Most Wanted Cops&Robbers: Most Wanted\n");
- strcat(ok,"Thanks to SA-MP team for SA-MP application.\n");
- strcat(ok,"And you for playing.\n");
- ShowPlayerDialog(playerid,27,DIALOG_STYLE_MSGBOX, "{FFFFFF}*****Most Wanted Cops&Robbers Credits*****",ok,"Ok","");
- return 1;
- }
- CMD:bug(playerid,params[])
- {
- new Reason[128];
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- if(!sscanf(params, "s[170]",Reason))
- {
- if(GetPVarInt(playerid,"BugTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 5 seconds before reporting a bug again.");
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pname,sizeof(pname));
- SendClientMessage(playerid, yellow, "Thanks for reporting a bug to the admins.");
- new bstring[170];
- format(bstring,sizeof(bstring),"* Player %s(%d) reported bug: %s - %02d/%02d/%d - %02d:%02d:%02d -", pname,playerid,Reason,Day,Month,Year,Hour,Minute,Second);
- SendMessageToAdmins(yellow,bstring);
- BugLog(bstring);
- SetPVarInt(playerid,"BugTime",GetTickCount()+5000);
- }
- else return SendClientMessage(playerid, red, "USAGE: /bug <Description of the bug>.");
- return 1;
- }
- CMD:cw(playerid,params[])
- {
- new string[128], pCar;
- pCar = GetPlayerVehicleID(playerid);
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xF60000AA, "You must be in a vehicle to use the car whisper.");
- if(isnull(params))return SendClientMessage(playerid, 0xFF0000FF, "Usage: /cw [message]");
- if(strlen(params) > 128) return SendClientMessage(playerid,0xFF0000FF, "Your message is too long,reduce it. (Max 128 characters)");
- for(new i = 0; i < MAX_PLAYERS; i++)
- if(IsPlayerConnected(i) && GetPlayerVehicleID(i) == pCar)
- {
- format(string, sizeof(string), "(CAR WHISPER) %s (%d): %s", pNick(playerid), playerid, params);
- SendClientMessage(i, 0x00FFFFFF, string);
- }
- return 1;
- }
- CMD:myid(playerid, params[])
- {
- new string[60];
- format(string, sizeof(string), "Your id is: {BDBDBD}%d", playerid);
- SendClientMessage(playerid, -1, string);
- return 1;
- }
- CMD:nopm(playerid, params[])
- {
- if(NoPm[playerid] == false)
- {
- PlayerInfo[playerid][pNopm] = 1;
- GameTextForPlayer(playerid, "~g~Nopm enabled,you will not receive pm's anymore.", 5000, 5);
- SendClientMessage(playerid, green,"Nopm enabled,you will not receive pm's anymore.");
- NoPm[playerid] = true;
- }
- else
- {
- PlayerInfo[playerid][pNopm] = 0;
- GameTextForPlayer(playerid, "~r~Nopm disabled,you will now receive pm's.", 5000, 5);
- SendClientMessage(playerid, red,"Nopm disabled,you will now receive pm's.");
- NoPm[playerid] = false;
- }
- return true;
- }
- CMD:sausage(playerid,params[])
- {
- if(PlayerInfo[playerid][pSausage] == 0) return SendClientMessage(playerid,0xFF0000FF,"You dont have any sausage! Buy it from any 24/7. (Marked with dinner icon on the map).");
- if(PlayerInfo[playerid][pJailed] == 1) return SendClientMessage(playerid, red, "You cannot use this command in jail.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"You can't eat sausages if you are in a vehicle.");
- if(IsRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't eat sausages while robbing a place.");
- if(IsApRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't eat sausages while robbing the airport.");
- if(IsBankRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't eat sausages while robbing a bank..");
- if(GetPVarInt(playerid,"SausageTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 1 minute before eating a sausage again.");
- new Float:phealth;
- GetPlayerHealth(playerid,phealth);
- if(phealth == 90)
- {
- SendClientMessage(playerid,red,"Your health is already full.Why do you need to eat any sausage?");
- return 1;
- }
- ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,yellow,"***Sausage Eaten***");
- SendClientMessage(playerid,yellow,"***You have eaten a sausage and it has healed you slightly.You feel abit better!***");
- SetPlayerHealth(playerid,phealth+25);
- GameTextForPlayer(playerid, "~w~~h~Umh,yummi!!", 5000, 5);
- PlayerInfo[playerid][pSausage] --;
- SetPVarInt(playerid,"SausageTime",GetTickCount()+60000);
- return 1;
- }
- CMD:loc(playerid, params[])
- {
- if(isnull(params)) return SendClientMessage(playerid, red, "Usage: /loc <Playerid>");
- new pID = strval(params),iStr[128];
- if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, red, "Wrong player id/name.");
- new current_zone = player_zone[pID];
- format(iStr, sizeof(iStr), "%s's (%d) location: %s", pNick(pID), pID, zones[current_zone][zone_name]);
- SendClientMessage(playerid, red, iStr);
- return 1;
- }
- CMD:changepass(playerid,params[])
- {
- if(PlayerInfo[playerid][pPassChange] == 1) return SendClientMessage(playerid,0xFF0000FF,"You have already changed your password,you can't change it again.");
- ShowChangePassScreen(playerid);
- SendClientMessage(playerid,red,"Enter your new password in the box and press Confirm.YOU CAN CHANGE YOUR PASSWORD JUST ONE TIME,SO CHOOSE WISELY!");
- return 1;
- }
- CMD:spec(playerid, params[])
- {
- new specid;
- if(GetPVarInt(playerid,"SpecTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 5 seconds before spectating a player again.");
- if(sscanf(params, "u", specid)) return SendClientMessage(playerid,red, "Usage: /spec [playerid]");
- {
- if (specid == INVALID_PLAYER_ID) return SendClientMessage(playerid,red, "Invalid playerid.");
- if(IsPlayerInAnyVehicle(specid))
- {
- GetPlayerPos(playerid, s_pos[playerid][retx], s_pos[playerid][rety],s_pos[playerid][retz]);
- GetPlayerFacingAngle(playerid,s_pos[playerid][retang]);
- s_pos[playerid][retint] = GetPlayerInterior(playerid);
- s_pos[playerid][retworld] = GetPlayerVirtualWorld(playerid);
- TogglePlayerSpectating(playerid, 1);
- PlayerSpectateVehicle(playerid, GetPlayerVehicleID(specid));
- SendClientMessage(playerid,yellow,"Spec On!Use /specoff To Disable Spec!");
- GameTextForPlayer(playerid, "Spectating player,type /specoff to stop spectating.", 5000, 5);
- SetPVarInt(playerid,"RbTime",GetTickCount()+5000);
- }
- else
- {
- TogglePlayerSpectating(playerid, 1);
- PlayerSpectatePlayer(playerid, specid);
- GameTextForPlayer(playerid, "Spectating player,type /specoff to stop spectating.", 5000, 5);
- SetPVarInt(playerid,"RbTime",GetTickCount()+5000);
- }
- }
- return true;
- }
- CMD:specoff(playerid, params[])
- {
- SetPlayerPos(playerid, s_pos[playerid][retx], s_pos[playerid][rety],s_pos[playerid][retz]);
- SetPlayerFacingAngle(playerid,s_pos[playerid][retang]);
- SetPlayerVirtualWorld(playerid,s_pos[playerid][retworld]);
- SetPlayerInterior(playerid, s_pos[playerid][retint]);
- SetCameraBehindPlayer(playerid);
- TogglePlayerSpectating(playerid, false);
- return true;
- }
- CMD:ej(playerid,params[])
- {
- new string[128];
- new string2[128];
- new DestName[24];
- new Destinationid;
- new name[24];
- if (sscanf(params, "u", Destinationid)) return SendClientMessage(playerid, -1, "Usage: /ej <playerid>");
- GetPlayerName(playerid, name, 24);
- GetPlayerName(Destinationid, DestName, 24);
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && IsPlayerInVehicle(Destinationid, GetPlayerVehicleID(playerid)))
- {
- if(IsPlayerConnected(Destinationid) && playerid != Destinationid)
- {
- format(string2, 128, "You have ejected %s (%i) from your vehicle.", DestName, Destinationid);
- SendClientMessage(playerid, orange, string2);
- GameTextForPlayer(playerid,"~r~Player ejected from vehicle!",3000,5);
- format(string, 128, "You got ejected from %s's (%d) vehicle.", name, playerid);
- SendClientMessage(playerid, orange, string);
- RemovePlayerFromVehicle(Destinationid);
- GameTextForPlayer(Destinationid,"~r~You have been ejected!",3000,5);
- }
- }
- return true;
- }
- CMD:ejall(playerid,params[])
- {
- new playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- new mycar;
- new string[128];
- mycar = GetPlayerVehicleID(playerid);
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerInVehicle(i, mycar))
- {
- RemovePlayerFromVehicle(i);
- format(string, sizeof(string), "You have removed everyone from your vehicle.");
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "You have been removed from %s's vehicle.",playername);
- GameTextForPlayer(i,"~r~You have been ejected!",3000,5);
- SendClientMessage(i, COLOR_WHITE, string);
- }
- }
- return true;
- }
- //END GENERAL COMMANDS//
- /*---------------------------------------------------------------------------------------------*/
- //CIV COMMANDS//
- CMD:rob(playerid, params[])
- {
- for(new i; i < sizeof(robberyPlaces); i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 7.0, robberyPlaces[i][0], robberyPlaces[i][1], robberyPlaces[i][2]))
- {
- if(GetPVarInt(playerid,"RobTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 5 minutes before rob again.");
- if(gTeam[playerid] == TEAM_COP) return SendClientMessage(playerid, red, "Cops can't do robberies!");
- if(PlayerInfo[playerid][pJailed] == 1) return SendClientMessage(playerid, red, "You cannot use this command in jail.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"You can't start a robbery if you are in a vehicle!");
- if(IsRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You are already robbing this place.");
- if(IsBankRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You are already robbing this bank.");
- pRobTimerID[playerid] = SetTimerEx("pRobTimer", 1000, true, "i", playerid);
- pRobCount[playerid] = 31;
- SetPVarInt(playerid,"RobTime",GetTickCount()+300000);
- }
- }
- return 1;
- }
- CMD:rb(playerid,params[])
- {
- new string[128];
- new copm[150];
- new DestName[24];
- new Destinationid;
- new name[24];
- GetPlayerName(playerid, name, 24);
- GetPlayerName(Destinationid, DestName, 24);
- if(GetPVarInt(playerid,"RbTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 30 seconds before robbing a player again.");
- if(gTeam[playerid] == TEAM_COP) return SendClientMessage(playerid, red, "Cops can't rob money to other players.");
- if(PlayerInfo[playerid][pJailed] == 1) return SendClientMessage(playerid, red, "You cannot use this command in jail.");
- if(IsRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't rob players money when you're robbing a place.");
- if(IsApRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't rob players money when you're robbing the airport.");
- if(IsBankRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't rob players money when you're robbing a bank.");
- if(sscanf(params, "u", Destinationid))
- {
- SendClientMessage(playerid,red,"USAGE: /rb (Player Name/ID)");
- return 1;
- }
- if(!IsPlayerConnected(Destinationid))
- {
- format(string,sizeof(string),"Wrong playerid.");
- SendClientMessage(playerid,red,string);
- return 1;
- }
- if(GetDistanceBetweenPlayers(playerid,Destinationid) > 4)
- {
- format(string,sizeof(string),"%s (%d) is too far away.You cannot reach him to rob him.",DestName,Destinationid);
- SendClientMessage(playerid,red,string);
- return 1;
- }
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
- {
- SendClientMessage(playerid,red,"You cannot rob someone while in a vehicle.Exit the vehicle first.");
- return 1;
- }
- if(GetPlayerState(Destinationid) == PLAYER_STATE_DRIVER || GetPlayerState(Destinationid) == PLAYER_STATE_PASSENGER)
- {
- SendClientMessage(playerid,red,"You cannot rob someone while they are in a vehicle. Get them to exit the vehicle first.");
- return 1;
- }
- if(playerid == Destinationid)
- {
- SendClientMessage(playerid,red,"You cannot rob yourself,how can you even manage that?");
- return 1;
- }
- if(GetPlayerMoney(Destinationid) <= 0)
- {
- SendClientMessage(playerid,red,"That player has no money in their pockets.What would be the point in robbing them?");
- SetPVarInt(playerid,"RbTime",GetTickCount()+30000);
- return 1;
- }
- new crand = random(100);
- if(crand <= 30)
- {
- SendClientMessage(playerid,red,"Rob attempt failed. The player slipped out of your grasp.");
- SetPVarInt(playerid,"RbTime",GetTickCount()+30000);
- return 1;
- }
- if(GetDistanceBetweenPlayers(playerid,Destinationid) <= 4 && crand > 30)
- {
- new current_zone = player_zone[playerid];
- new mrand =random(GetPlayerMoney(Destinationid));
- SendClientMessage(playerid,red,"[[_Player Robbed_]]");
- format(string,sizeof(string),"You have robbed %d$ from %s (%d)!",mrand,DestName,Destinationid);
- SendClientMessage(playerid,red,string);
- GivePlayerMoney(playerid,mrand);
- SetPVarInt(playerid,"RbTime",GetTickCount()+30000);
- SendClientMessage(Destinationid,orange,"[[_Robbed_]]");
- format(string,sizeof(string),"%s (%d) has robbed you %d$!",name,playerid,mrand);
- SendClientMessage(Destinationid,orange,string);
- GivePlayerMoney(Destinationid,-mrand);
- format(copm,sizeof(copm),"Robbery: %s (%d) has robbed %d$ from %s (%d) - Location: %s.",name,playerid,mrand,DestName,Destinationid,zones[current_zone][zone_name]);
- new RobMsg[128];
- format(RobMsg, sizeof(RobMsg), "010Robbery: %s (%d) has robbed %d$ from %s (%d) - Location: %s.", name,playerid,mrand,DestName,Destinationid,zones[current_zone][zone_name]);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, RobMsg);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(!IsPlayerConnected(i))continue;
- if(gTeam[i] == TEAM_COP)
- {
- SendClientMessage(i, COLOR_BLUE, copm);
- }
- }
- return 1;
- }
- return 1;
- }
- CMD:bankrob(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 7.0, -1366.1598,-102.6746,6.0000))
- {
- if(gTeam[playerid] == TEAM_COP) return SendClientMessage(playerid, red, "Cops can't do robberies!");
- if(GetPlayerWantedLevel(playerid) > 1) return SendClientMessage(playerid, red, "You are wanted,you can't start a robbery.");
- if(PlayerInfo[playerid][pJailed] == 1) return SendClientMessage(playerid, red, "You cannot use this command in jail.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"You can't start a robbery if you are in a vehicle!");
- if(IsRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You are already robbing this place.");
- if(IsBankRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You are already robbing this bank.");
- if(GetPVarInt(playerid,"BankRobTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 10 minutes before rob a bank again.");
- SetPVarInt(playerid,"BankRobTime",GetTickCount()+600000);
- pBankRobTimerID[playerid] = SetTimerEx("pBankRobTimer", 1000, true, "i", playerid);
- pBankRobCount[playerid] = 60;
- }
- return 1;
- }
- CMD:td(playerid,params[])
- {
- new grams;
- new info[60];
- if(PlayerInfo[playerid][pDrug] == 0) return SendClientMessage(playerid,0xFF0000FF,"You dont have any drug! Buy it from refill points.");
- if(sscanf(params,"d",grams)) return SendClientMessage(playerid,0xFF0000FF,"Usage: /td <grams of drug to take>.");
- if(PlayerInfo[playerid][pJailed] == 1) return SendClientMessage(playerid, red, "You cannot use this command in jail.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"You can't take drugs if you are in a vehicle.");
- if(IsRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't take drugs while robbing a place.");
- if(IsApRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't take drugs while robbing the airport.");
- if(IsBankRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't take drugs while robbing a bank..");
- if(GetPVarInt(playerid,"DrugTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 1 minute before taking drug again.");
- new Float:phealth;
- GetPlayerHealth(playerid,phealth);
- if(phealth == 90)
- {
- SendClientMessage(playerid,red,"Your health is already full.You don't need to take drugs.");
- return 1;
- }
- ApplyAnimation(playerid,"JST_BUISNESS ", "smoke_01", 4.0, 1, 0, 0, 0, 0);
- SendClientMessage(playerid,orange,"***Drug Taken***");
- format(info,sizeof(info),"You taken %d gr of drugs!",grams);
- SendClientMessage(playerid, orange, info);
- SendClientMessage(playerid,orange,"***You are now on drugs,your health will refill automatically.***");
- GameTextForPlayer(playerid, "~w~~h~On Drugs!", 5000, 5);
- SetPlayerHealth(playerid,phealth+5);
- PlayerInfo[playerid][pDrug] -=grams;
- SetPVarInt(playerid,"DrugTime",GetTickCount()+60000);
- return 1;
- }
- CMD:robap(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 7.0, -1366.1598,-102.6746,6.0000))
- {
- if(gTeam[playerid] == TEAM_COP) return SendClientMessage(playerid, red, "Cops can't do robberies!");
- if(GetPlayerWantedLevel(playerid) > 1) return SendClientMessage(playerid, red, "You are wanted,you can't start a robbery.");
- if(PlayerInfo[playerid][pJailed] == 1) return SendClientMessage(playerid, red, "You cannot use this command in jail.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"You can't start a robbery if you are in a vehicle!");
- if(IsApRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You are already robbing the airport.");
- if(GetPVarInt(playerid,"ApRobTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 10 minutes before rob the airport again.");
- SetPVarInt(playerid,"ApRobTime",GetTickCount()+600000);
- pApRobTimerID[playerid] = SetTimerEx("pApRobTimer", 1000, true, "i", playerid);
- pApRobCount[playerid] = 60;
- }
- return 1;
- }
- CMD:gd(playerid, params[])
- {
- if(PlayerInfo[playerid][pJailed] == 1) return SendClientMessage(playerid, red, "You cannot use this command in jail.");
- new Destinationid,Ammount,PlayerName[24],DestName[24],String[128];
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- if(GetPVarInt(playerid,"GdTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 5 seconds before giving drug again.");
- if (sscanf(params, "ui", Destinationid, Ammount)) return SendClientMessage(playerid, -1, "Usage: /givedrug <playerid> <grams>");
- if (!IsPlayerConnected(Destinationid)) return SendClientMessage(playerid, -1, "Player is not connected.");
- if(PlayerInfo[playerid][pDrug] == 0) return SendClientMessage(playerid,0xFF0000FF,"You dont have any drug to send!");
- if(PlayerInfo[playerid][pDrug] < Ammount) return SendClientMessage(playerid,0xFF0000FF,"You don't have this number of grams to send!");
- if(IsRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't send drug while robbing");
- if(IsBankRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't send drug while robbing a bank.");
- if(playerid == Destinationid) return SendClientMessage(playerid,red, "You can't send drug to yourself.");
- if(IsApRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't send drug while robbing the airport.");
- GetPlayerName(playerid, PlayerName, 24);
- GetPlayerName(Destinationid, DestName, 24);
- format(String, 128, "%s (%d) has sent you %d grams of drug!", PlayerName, playerid, Ammount);
- SendClientMessage(Destinationid, yellow, String);
- new gmsent[128];
- format(gmsent,sizeof(gmsent),"Sent %d grams of drug to %s (%d)", Ammount,DestName,Destinationid);
- GameTextForPlayer(playerid,gmsent,3000,5);
- format(String, 128, "You've sent %d grams of drug to %s (%d)", Ammount, DestName, Destinationid);
- SendClientMessage(playerid, yellow, String);
- new gmrec[128];
- format(gmrec,sizeof(gmrec),"Received %d grams of drug from %s (%d)", Ammount,PlayerName,Destinationid);
- GameTextForPlayer(Destinationid,gmrec,3000,5);
- PlayerInfo[playerid][pDrug] -=Ammount;
- PlayerInfo[Destinationid][pDrug] +=Ammount;
- SetPVarInt(playerid,"GdTime",GetTickCount()+5000);
- new l[200];
- format(l, 200, "%s (%d) has sent %d grams of drugs to %s (%d) - %02d/%02d/%d - %02d:%02d:%02d -", PlayerName,playerid,Ammount,DestName,Destinationid,Day,Month,Year,Hour,Minute,Second);
- GDLog(l);
- return 1;
- }
- CMD:gs(playerid, params[])
- {
- if(PlayerInfo[playerid][pJailed] == 1) return SendClientMessage(playerid, red, "You cannot use this command in jail.");
- new Destinationid,Ammount,PlayerName[24],DestName[24],String[128];
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- if(GetPVarInt(playerid,"GsTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 5 seconds before giving sausages again.");
- if (sscanf(params, "ui", Destinationid, Ammount)) return SendClientMessage(playerid, -1, "Usage: /givesausage <playerid> <sausage number>");
- if (!IsPlayerConnected(Destinationid)) return SendClientMessage(playerid, -1, "Player is not connected.");
- if(PlayerInfo[playerid][pSausage] == 0) return SendClientMessage(playerid,0xFF0000FF,"You dont have any sausage to send!");
- if(PlayerInfo[playerid][pSausage] < Ammount) return SendClientMessage(playerid,0xFF0000FF,"You don't have this number of sausages to send!");
- if(IsRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't send sausages while robbing");
- if(IsBankRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't send sausages while robbing a bank.");
- if(playerid == Destinationid) return SendClientMessage(playerid,red, "You can't send sausages to yourself.");
- if(IsApRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You can't send sausages while robbing the airport.");
- GetPlayerName(playerid, PlayerName, 24);
- GetPlayerName(Destinationid, DestName, 24);
- format(String, 128, "%s (%d) has sent you %d sausages!", PlayerName, playerid, Ammount);
- SendClientMessage(Destinationid, yellow, String);
- new gmsent[128];
- format(gmsent,sizeof(gmsent),"Sent %d sausages to %s (%d)", Ammount,DestName,Destinationid);
- GameTextForPlayer(playerid,gmsent,3000,5);
- format(String, 128, "You've sent %d sausages to %s (%d)", Ammount, DestName, Destinationid);
- SendClientMessage(playerid, yellow, String);
- new gmrec[128];
- format(gmrec,sizeof(gmrec),"Received %d sausages from %s (%d)", Ammount,PlayerName,Destinationid);
- GameTextForPlayer(Destinationid,gmrec,3000,5);
- PlayerInfo[playerid][pSausage] -=Ammount;
- PlayerInfo[Destinationid][pSausage] +=Ammount;
- SetPVarInt(playerid,"GsTime",GetTickCount()+5000);
- return 1;
- }
- //END CIV COMMANDS//
- /*---------------------------------------------------------------------------------------------*/
- //COP COMMANDS//
- CMD:ar(playerid, params[])
- {
- new pName[MAX_PLAYER_NAME],tName[MAX_PLAYER_NAME],targetid,string[128];
- new Float:targetidpos[3];
- if(gTeam[playerid] == TEAM_CIV) return 0;
- if(GetPlayerInterior(targetid) > 0) return SendClientMessage(playerid, red, "ERROR: You can't arrest players inside an interior.");
- if(sscanf(params, "ui", targetid)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ar <playerid> / <PlayerName>");
- if(GetPVarInt(playerid,"ArTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 5 seconds before arresting a suspect again.");
- if(PlayerInfo[targetid][pJailed] == 1) return SendClientMessage(playerid, red, "This player is already in jail,you can't arrest him.");
- if(IsPlayerInAnyVehicle(targetid)) return SendClientMessage(playerid,red,"You can't arrest players if they're in a vehicle.");
- if(GetPlayerWantedLevel(targetid) <= 4) return SendClientMessage(playerid, red, "ERROR: You can't arrest players with wanted level lower than 4.Use /tk to issue a ticket,or press 2.");
- if(GetPlayerWantedLevel(targetid) == 0) return SendClientMessage(playerid, red, "This player is not wanted,you can't arrest him");
- if(playerid == targetid) return SendClientMessage(playerid,red, "You can't arrest yourself,you stupid or what?");
- if(gTeam[playerid] == TEAM_COP && gTeam[targetid] == TEAM_COP) return SendClientMessage(playerid,red, "You can't arrest who is in your team.");
- GetPlayerPos(playerid, targetidpos[0], targetidpos[1], targetidpos[2]);
- if (!IsPlayerInRangeOfPoint(playerid, 5.0, targetidpos[0], targetidpos[1], targetidpos[2])) return SendClientMessage(playerid, -1, "Nobody close enough to arrest.");
- GetPlayerName(playerid, pName, sizeof(pName));
- GetPlayerName(targetid, tName, sizeof(tName));
- if(IsPlayerConnected(targetid))
- {
- if(GetPlayerWantedLevel(targetid) >= 4)
- {
- format(string, sizeof(string), "You have been arrested by %s (%d).", pName, playerid);
- SendClientMessage(targetid, red, string);
- ShowDescriptionText(targetid, string);
- if(IsRobbing[targetid] == 1)
- {
- SendClientMessage(targetid,0xFF0000FF,"You have been arrested and your robbery is failed.");
- GameTextForPlayer(targetid, "Robbery ~r~FAILED.", 3000, 5);
- IsRobbing[targetid] =0;
- pRobCount[targetid] = 0;
- KillTimer(pRobTimerID[targetid]);
- }
- if(IsBankRobbing[targetid] == 1)
- {
- SendClientMessage(targetid,0xFF0000FF,"You have been arrested and your bank robbery is failed.");
- GameTextForPlayer(targetid, "Bank Robbery ~r~FAILED.", 3000, 5);
- IsBankRobbing[targetid] =0;
- pBankRobCount[targetid] = 0;
- KillTimer(pBankRobTimerID[targetid]);
- }
- if(IsApRobbing[targetid] == 1)
- {
- SendClientMessage(targetid,0xFF0000FF,"You have been arrested and your airport robbery is failed.");
- GameTextForPlayer(targetid, "Airport Robbery ~r~FAILED.", 3000, 5);
- IsApRobbing[targetid] =0;
- pApRobCount[targetid] = 0;
- KillTimer(pApRobTimerID[targetid]);
- }
- SetPlayerAttachedObject(targetid, 9, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
- SetPlayerSpecialAction(targetid, SPECIAL_ACTION_CUFFED);
- format(string, sizeof(string), "~b~Arrested by %s (%d)", pName, playerid);
- GameTextForPlayer(targetid, string, 4000, 5);
- format(string, sizeof(string), "You have arrested %s (%d) and recieved $5000 as a bonus!", tName, targetid);
- SendClientMessage(playerid, red, string);
- ShowDescriptionText(playerid, string);
- new current_zone = player_zone[targetid];
- format(string, sizeof(string), "Suspect %s (%d) has been arrested by %s (%d) - Location: %s", tName, targetid, pName, playerid,zones[current_zone][zone_name]);
- SendClientMessageToAll(yellow, string);
- new ArMsg[128];
- format(ArMsg, sizeof(ArMsg), "03Suspect %s (%d) has been arrested by %s (%d) - Location: %s", tName, targetid, pName, playerid,zones[current_zone][zone_name]);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, ArMsg);
- format(string, sizeof(string), "~b~%s (%d) arrested, Well Done! You have recieved $5000 as a bonus.", tName, targetid);
- GameTextForPlayer(playerid, string, 4000, 5);
- GivePlayerMoney(playerid, 5000);
- SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
- pJailTimerID[targetid] = SetTimerEx("pJailTimer", 1000, true, "i", targetid);
- pJailCount[targetid] = 20 + random(41);
- new Random = random(sizeof(RandomJailSpawns));
- SetPlayerPos(targetid, RandomJailSpawns[Random][0], RandomJailSpawns[Random][1], RandomJailSpawns[Random][2]);
- SetPlayerFacingAngle(targetid, RandomJailSpawns[Random][3]);
- ResetPlayerWeapons(targetid);
- SetPlayerInterior(targetid, 10);
- SetPlayerWantedLevel(targetid,0);
- SetPVarInt(playerid,"ArTime",GetTickCount()+5000);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(!IsPlayerConnected(i))continue;
- if(gTeam[i] == TEAM_COP)
- {
- new copmsg[170];
- format(copmsg, sizeof(copmsg), "%s (%d) has arrested %s (%d)",pName,playerid,tName,targetid);
- SendClientMessage(i, COLOR_BLUE, copmsg);
- }
- }
- }
- }
- return 1;
- }
- CMD:tk(playerid, params[])
- {
- new pName[MAX_PLAYER_NAME],tName[MAX_PLAYER_NAME],targetid,string[128];
- new Float:targetidpos[3];
- if(gTeam[playerid] == TEAM_CIV) return 0;
- if(GetPlayerInterior(targetid) > 0) return SendClientMessage(playerid, red, "ERROR: You can't issue tickets inside an interior.");
- if(sscanf(params, "ui", targetid)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /tk <playerid> / <PlayerName>");
- if(GetPVarInt(playerid,"TkTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 5 seconds before issuing a ticket again.");
- if(PlayerInfo[targetid][pJailed] == 1) return SendClientMessage(playerid, red, "This player is jailed,you can't issue a ticket to him");
- if(IsPlayerInAnyVehicle(targetid)) return SendClientMessage(playerid,red,"You can't issue tickets at players if they're in a vehicle.");
- if(GetPlayerWantedLevel(targetid) >= 4) return SendClientMessage(playerid, red, "ERROR: You can't issue ticket to players with wanted level more than 4.Use /ar instead.");
- if(GetPlayerWantedLevel(targetid) == 0) return SendClientMessage(playerid, red, "This player is not wanted,you can't issue a ticket to him.");
- if(playerid == targetid) return SendClientMessage(playerid,red, "You can't issue tickets to yourself.");
- if(gTeam[playerid] == TEAM_COP && gTeam[targetid] == TEAM_COP) return SendClientMessage(playerid,red, "You can't issue tickets at who is in your team.");
- GetPlayerPos(playerid, targetidpos[0], targetidpos[1], targetidpos[2]);
- if (!IsPlayerInRangeOfPoint(playerid, 5.0, targetidpos[0], targetidpos[1], targetidpos[2])) return SendClientMessage(playerid, -1, "Nobody close enough to arrest.");
- GetPlayerName(playerid, pName, sizeof(pName));
- GetPlayerName(targetid, tName, sizeof(tName));
- if(IsPlayerConnected(targetid))
- {
- if(GetPlayerWantedLevel(targetid) <= 4)
- {
- format(string, sizeof(string), "%s (%d) has issued you a ticket. -5000$ charged.", pName, playerid);
- SendClientMessage(targetid, red, string);
- ShowDescriptionText(targetid, string);
- SetPlayerWantedLevel(targetid,0);
- format(string, sizeof(string), "~b~Ticket issued by %s (%d) -5000$ charged.", pName, playerid);
- GameTextForPlayer(targetid, string, 5000, 5);
- format(string, sizeof(string), "You have issued a ticket to %s (%d) and recieved $5000 as collection prize!", tName, targetid);
- SendClientMessage(playerid, red, string);
- ShowDescriptionText(playerid, string);
- GivePlayerMoney(playerid, 5000);
- GivePlayerMoney(targetid, -5000);
- SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
- SetPVarInt(playerid,"TkTime",GetTickCount()+5000);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(!IsPlayerConnected(i))continue;
- if(gTeam[i] == TEAM_COP)
- {
- new copmsg[170];
- format(copmsg, sizeof(copmsg), "%s (%d) has issued a ticket to %s (%d)",pName,playerid,tName,targetid);
- SendClientMessage(i, COLOR_BLUE, copmsg);
- }
- }
- if (GetPlayerMoney(targetid) < 5000)
- {
- new plwl = GetPlayerWantedLevel(targetid);
- plwl = GetPlayerWantedLevel(targetid);
- SetPlayerWantedLevel(targetid,plwl +5);
- format(string, sizeof(string), "~g~You can't afford a ticket of 5000$ issued by %s (%d) - Wanted Level %d", pName, playerid,plwl);
- GameTextForPlayer(targetid, string, 6000, 5);
- ShowDescriptionText(targetid, string);
- SetPlayerWantedLevel(targetid,plwl +5);
- format(string, sizeof(string), "%s (%d) can't afford your ticket.Is now wanted,use /ar to arrest him.", tName, targetid);
- SendClientMessage(playerid, red, string);
- ShowDescriptionText(playerid, string);
- }
- }
- }
- return 1;
- }
- //END COP COMMANDS//
- /*---------------------------------------------------------------------------------------------*/
- //ADMIN COMMANDS//
- CMD:acmds(playerid)
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- ShowPlayerDialog(playerid,9,DIALOG_STYLE_MSGBOX,"{FFFFFF}*****Admin CMDS*****","/kick\n/ban\n/ann\n/goto\n/gall\n/info\n/cc\n/vipset\n/rec\n/fix\n/fav\n/ckf\n/drop\n/mute\n/unmute\n/flip\n/fine\n/sethp\n/setarm","Ok","");
- return true;
- }
- else return 0;
- }
- CMD:vipset(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] == 5)
- {
- new Target;
- if(!sscanf(params, "us[32]",Target))
- {
- if(!IsPlayerConnected(Target))
- return SendClientMessage(playerid, red, "Player is not connected!");
- new tname[MAX_PLAYER_NAME];
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(Target,tname,sizeof(tname));
- GetPlayerName(playerid,pname,sizeof(pname));
- if(VipSet[playerid] == false)
- {
- PlayerInfo[playerid][pVip] = 1;
- GameTextForPlayer(playerid, "~W~VIP status ~g~added to the selected player", 5000, 5);
- VipSet[playerid] = true;
- }else{
- PlayerInfo[playerid][pVip] = 0;
- GameTextForPlayer(playerid, "~W~VIP status ~r~removed to the selected player", 5000, 5);
- VipSet[playerid] = false;
- }
- }
- else return SendClientMessage(playerid, red, "USAGE: /vipset <playerid>/<player name>");
- return true;
- }
- else return 0;
- }
- CMD:kick(playerid,params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- new id,n[MAX_PLAYER_NAME],reason[128], on[MAX_PLAYER_NAME], string[256], string2[256];
- if(sscanf(params,"uz",id, reason)) return SendClientMessage(playerid,red,"Usage:/kick [PlayerID/Name] [reason]");
- else if(playerid == INVALID_PLAYER_ID) SendClientMessage(playerid,red,"System: Invalid ID");
- if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, red, "System: Invalid ID");
- if(playerid == id) return SendClientMessage(playerid,red, "You cannot kick yourself.");
- else
- {
- GetPlayerName(playerid,n,sizeof(n));
- GetPlayerName(id,on,sizeof(on));
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- format(string,sizeof(string),"You have been kicked by Admin %s for: %s - %02d/%02d/%d - %02d:%02d:%02d",n,reason,Day,Month,Year,Hour,Minute,Second);
- SendClientMessage(id,red,string);
- format(string2, sizeof(string), "Admin %s (%d) has kicked %s (%d) - Reason: %s - %02d/%02d/%d - %02d:%02d:%02d",n,playerid,on,id,reason,Day,Month,Year,Hour,Minute,Second);
- SendClientMessageToAll(red,string2);
- KickLog(string2);
- Kick(id);
- return true;
- }
- }
- else return 0;
- }
- CMD:ban(playerid,params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- new id,n[MAX_PLAYER_NAME],reason[128], on[MAX_PLAYER_NAME], string[256], string2[256];
- if(sscanf(params,"uz",id, reason)) return SendClientMessage(playerid,red,"Usage:/ban [PlayerID/Name] [reason]");
- else if(playerid == INVALID_PLAYER_ID) SendClientMessage(playerid,red,"System: Invalid ID");
- if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, red, "System: Invalid ID");
- if(playerid == id) return SendClientMessage(playerid,red, "You cannot ban yourself.");
- else
- {
- GetPlayerName(playerid,n,sizeof(n));
- GetPlayerName(id,on,sizeof(on));
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- new msg[190];
- format(string,sizeof(string),"You have been banned by Admin %s for: %s - %02d/%02d/%d - %02d:%02d:%02d",n,reason,Day,Month,Year,Hour,Minute,Second);
- SendClientMessage(id,red,string);
- ApplyAnimation(id, "FAT", "FatWalk", 4.1,1,1,1,1,1,0);
- SetPlayerAttachedObject(id, 0, 321, 1, -0.25,-0.33,-0.06 ,90,180,0);
- GameTextForPlayer(id, "~p~Oh shit! That dildo in your ass hurts!!", 9000, 6);
- SetPlayerDrunkLevel(id, 9000);
- GameTextForPlayer(id, "~r~Surprise!!!!!", 4000, 4);
- SetPlayerAttachedObject(id, 1, 1, 0);
- SetPlayerAttachedObject(id, 1, 1, 0);
- SetPlayerAttachedObject(id, 1, 1, 0);
- SetPlayerAttachedObject(id, 1, 1, 0);
- SetPlayerAttachedObject(id, 1, 1, 0);
- SetPlayerAttachedObject(id, 1, 1, 0);
- SetPlayerAttachedObject(id, 1, 1, 0);
- SetPlayerAttachedObject(id, 1, 1, 0);
- SetPlayerAttachedObject(id, 1, 1, 0);
- SetPlayerAttachedObject(id, 1, 1, 0);
- PlayerInfo[id][pBanned] = 1;
- format(string2, sizeof(string), "Admin %s (%d) has banned %s (%d) - Reason: %s - %02d/%02d/%d - %02d:%02d:%02d",n,playerid,on,id,reason,Day,Month,Year,Hour,Minute,Second);
- SendClientMessageToAll(red,string2);
- format(msg, sizeof(msg), "4Admin %s has banned %s - Reason: %s - %02d/%02d/%d - %02d:%02d:%02d",n,on,reason,Day,Month,Year,Hour,Minute,Second);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
- BanLog(string2);
- Ban(id);
- return true;
- }
- }
- else return 0;
- }
- CMD:ann(playerid,params[])
- {
- new mess[180];
- sscanf(params,"s",mess);
- if(strlen(params) > 128) return SendClientMessage(playerid,0xFF0000FF, "Your message is too long,reduce it. (Max 128 characters)");
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(!isnull(mess))
- {
- GameTextForAll(mess,5000,5);
- }
- else return SendClientMessage(playerid,red,"USAGE: /announce [message]");
- }
- return 1;
- }
- CMD:goto(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 2)
- {
- new targetid, string[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, red, "Usage: /goto [PlayerID/Name]");
- else
- {
- new pName[24];
- GetPlayerName(targetid,pName,128);
- format(string, sizeof(string), "You succesfully teleported to %s [%d]",pName,targetid);
- SendClientMessage(playerid,red,string);
- SetPlayerInterior(playerid,GetPlayerInterior(targetid));
- new Float:TeleX, Float:TeleY, Float:TeleZ;
- GetPlayerPos(targetid, TeleX, TeleY, TeleZ);
- SetPlayerPos(playerid, TeleX, TeleY, TeleZ+1);
- if(GetPlayerState(targetid) == PLAYER_STATE_DRIVER)
- {
- SetVehiclePos(GetPlayerVehicleID(targetid), TeleX, TeleY, TeleZ+2);
- }
- return true;
- }
- }
- else return 0;
- }
- CMD:gall(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 2)
- {
- new Float:x;
- new Float:y;
- new Float:z;
- new string[128];
- new pName[24];
- GetPlayerName(playerid,pName,128);
- format(string, sizeof(string), "Admin %s (%d) has teleported all players to his location.",pName,playerid);
- SendClientMessageToAll(red,string);
- for(new i=0; i<MAX_PLAYERS; i++)
- if(IsPlayerConnected(i)) {
- GetPlayerPos(playerid,x,y,z);
- SetPlayerPos(i,x,y,z);
- GetAllLog(string);
- }
- return true;
- }
- else return 0;
- }
- CMD:info(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- new giveplayerid;
- new Float:gihp, Float:giar;
- new name[MAX_PLAYER_NAME];
- GetPlayerName(giveplayerid, name, sizeof(name));
- GetPlayerHealth(giveplayerid, gihp);
- GetPlayerArmour(giveplayerid, giar);
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /info [ID/PartOfName]");
- if(IsPlayerConnected(giveplayerid))
- {
- new temp[1000];
- new info[1000];
- format(temp, sizeof(temp), "Name: %s\n",name);
- strcat(info, temp);
- format(temp, sizeof(temp), "Cash: %i$\n",GetPlayerMoney(giveplayerid));
- strcat(info, temp);
- format(temp, sizeof(temp), "Wanted Level: %d\n",PlayerInfo[giveplayerid][pWantedLevel]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Admin Level: %d\n",PlayerInfo[giveplayerid][pAdmin]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Kills: %i\n",PlayerInfo[giveplayerid][pKills]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Deaths: %i\n",PlayerInfo[giveplayerid][pDeaths]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Health: %0.1f\n",gihp);
- strcat(info, temp);
- format(temp, sizeof(temp), "Armour: %0.1f\n",giar);
- strcat(info, temp);
- format(temp, sizeof(temp), "VIP: %d (1 = YES - 0 = NO)\n",PlayerInfo[giveplayerid][pVip]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Score: %i\n",GetPlayerScore(giveplayerid));
- strcat(info, temp);
- format(temp, sizeof(temp), "Condoms: %d\n",PlayerInfo[giveplayerid][pCondoms]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Drugs: %d gr\n",PlayerInfo[giveplayerid][pDrug]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Sausages: %d\n",PlayerInfo[giveplayerid][pSausage]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Nopm enabled: %d\n",PlayerInfo[giveplayerid][pNopm]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Cash in bank: %d$\n",PlayerInfo[giveplayerid][pBank]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Has changed password: %d\n",PlayerInfo[playerid][pPassChange]);
- strcat(info, temp);
- format(temp, sizeof(temp), "Muted: %d\n",PlayerInfo[giveplayerid][pMuted]);
- strcat(info, temp);
- ShowPlayerDialog(playerid, 17, DIALOG_STYLE_MSGBOX,"{53C506}Player Info",info,"Close","");
- }
- else
- {
- SendClientMessage(playerid, red, "Invalid player specified.");
- }
- return true;
- }
- else return 0;
- }
- CMD:cc(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- for( new i = 0; i <= 100; i ++ ) SendClientMessageToAll( COLOR_WHITE, "" );
- SendClientMessageToAll(COLOR_WHITE, "Chat Cleared by an admin.");
- return true;
- }
- else return 0;
- }
- CMD:a(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- new sendername[24];
- new giveplayerid;
- if(sscanf(params, "s", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /a text - Ex: /a hai!");
- if(strlen(params) > 128) return SendClientMessage(playerid,0xFF0000FF, "Your message is too long,reduce it. (Max 128 characters)");
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new string[128];
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- format(string, sizeof(string), "Admin [%i]%s: %s - %02d/%02d/%d - %02d:%02d:%02d" ,playerid,sendername, params,Day,Month,Year,Hour,Minute,Second);
- SendMessageToAdmins(green,string);
- AdminChatLog(string);
- return true;
- }
- else return 0;
- }
- CMD:rec(playerid, params[])
- {
- new pid;
- if(sscanf(params, "us", pid, params[2])) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /reconnect [playerid] [reason]");
- if (PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, red, "ERROR: That player is not online.");
- new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[180];
- new ip[16];
- GetPlayerIp(pid, ip, sizeof(ip));
- GetPlayerName(pid, paramname, sizeof(paramname));
- GetPlayerName(playerid, adminname, sizeof(adminname));
- format(string, sizeof(string), "Admin %s (%d) has forced %s (%d) to reconnect. [Reason: %s]", adminname,playerid, paramname, pid, params[2]);
- SendClientMessageToAll(red, string);
- ForceRecLog(string);
- print(string);
- format(string, sizeof(string), "banip %s", ip);
- SetPVarString(pid,"reconnect",ip);
- ireconnect[pid] = 1;
- SendRconCommand(string);
- }
- else SendClientMessage(playerid, red, "Unknown command.");
- return 1;
- }
- CMD:fix(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] == 5)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- RepairVehicle(GetPlayerVehicleID(playerid));
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehicleHealth(vehicleid, 1000.0);
- SendClientMessage(playerid, red, "Your vehicle has been successfully repaired.");
- }
- }
- else SendClientMessage(playerid, red, "Unknown command.");
- return 1;
- }
- CMD:fav(playerid, params[])
- {
- if(IsPlayerConnected(playerid)) {
- if (PlayerInfo[playerid][pAdmin] < 5) {
- SendClientMessage(playerid, red, "Unknown command.");
- return 1;
- }
- for(new v = 0; v < MAX_VEHICLES; v++) {
- RepairVehicle(v);
- }
- SendClientMessage(playerid, red, "All vehicles fixed!");
- }
- return 1;
- }
- CMD:ckf(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] == 5)
- {
- ClearKillFeed();
- new string[100], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format(string,sizeof string,"{BDBDBD}Admin %s (%d) has cleared the death chat.",pName,playerid);
- SendClientMessageToAll(-1, string);
- }
- else SendClientMessage(playerid, red, "Unknown command.");
- return 1;
- }
- CMD:drop(playerid, params[])
- {
- new pid;
- if(sscanf(params, "us", pid, params[2])) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /drop [playerid] [reason]");
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, red, "ERROR: That player is not online.");
- new Float:x;
- new Float:y;
- new Float:z;
- new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[180];
- GetPlayerName(pid, paramname, sizeof(paramname));
- GetPlayerName(playerid, adminname, sizeof(adminname));
- format(string, sizeof(string), "Admin %s (%d) has dropped %s (%d) - Reason: %s", adminname,playerid, paramname, pid, params[2]);
- SendClientMessageToAll(red, string);
- GetPlayerPos(pid,x,y,z);
- SetPlayerPos(pid,x,y,z+25);
- }
- else SendClientMessage(playerid, red, "Unknown command.");
- return 1;
- }
- CMD:mute(playerid, params[])
- {
- new pid;
- if(sscanf(params, "us", pid, params[2])) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /mute [playerid] [reason]");
- if(PlayerInfo[pid][pMuted] == 1) return SendClientMessage(playerid,0xFF0000FF,"This player is already muted.");
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, red, "ERROR: That player is not online.");
- new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[180];
- GetPlayerName(pid, paramname, sizeof(paramname));
- GetPlayerName(playerid, adminname, sizeof(adminname));
- format(string, sizeof(string), "Admin %s (%d) has muted %s (%d) - Reason: %s", adminname,playerid, paramname, pid, params[2]);
- SendClientMessageToAll(red, string);
- PlayerInfo[pid][pMuted] = 1;
- }
- else SendClientMessage(playerid, red, "Unknown command.");
- return 1;
- }
- CMD:unmute(playerid, params[])
- {
- new pid;
- if(sscanf(params, "u", pid, params[2])) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /unmute [playerid]");
- if(PlayerInfo[pid][pMuted] == 0) return SendClientMessage(playerid,0xFF0000FF,"This player is not muted,you can't unmute him.");
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, red, "ERROR: That player is not online.");
- new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[180];
- GetPlayerName(pid, paramname, sizeof(paramname));
- GetPlayerName(playerid, adminname, sizeof(adminname));
- format(string, sizeof(string), "Admin %s (%d) has unmuted %s (%d)", adminname,playerid, paramname, pid);
- SendClientMessageToAll(red, string);
- PlayerInfo[pid][pMuted] = 0;
- }
- else SendClientMessage(playerid, red, "Unknown command.");
- return 1;
- }
- CMD:flip(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new currentveh;
- new Float:angle;
- currentveh = GetPlayerVehicleID(playerid);
- GetVehicleZAngle(currentveh, angle);
- SetVehicleZAngle(currentveh, angle);
- SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been flipped.");
- return 1;
- }
- }
- else SendClientMessage(playerid, red, "Unknown command.");
- return 1;
- }
- CMD:fine(playerid, params[])
- {
- new string[200], amount, reason[64], pid;
- new string2[128];
- if(sscanf(params, "uds", pid, amount, reason)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /fine [player] [amount] [reason]");
- if(PlayerInfo[playerid][pAdmin] == 5)
- {
- if(IsPlayerConnected(pid))
- {
- if (amount < 1)
- {
- SendClientMessage(playerid, red, "Amount must be greater than 0.");
- return 1;
- }
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME];
- GetPlayerName(pid, paramname, sizeof(paramname));
- GetPlayerName(playerid, adminname, sizeof(adminname));
- format(string, sizeof(string), "%s (%d) was fined %d$ by %s (%d) - Reason: %s - %02d/%02d/%d - %02d:%02d:%02d", paramname,pid,amount,adminname,playerid,reason,Day,Month,Year,Hour,Minute,Second);
- SendClientMessageToAll(red, string);
- FineLog(string);
- GivePlayerMoney(pid, -amount);
- format(string2, sizeof(string2), "%s (%d) has fined you %d$ - Reason: %s", adminname,playerid,amount,reason);
- SendClientMessage(pid,red, string2);
- GameTextForPlayer(pid, "~r~Fined!", 5000, 5);
- return 1;
- }
- else SendClientMessage(playerid, red, "Invalid player specified.");
- }
- else
- {
- SendClientMessage(playerid, red, "Unknown command.");
- }
- return 1;
- }
- CMD:sethp(playerid, params[])
- {
- new i, string[128];
- new pid;
- new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME];
- GetPlayerName(pid, paramname, sizeof(paramname));
- GetPlayerName(playerid, adminname, sizeof(adminname));
- if(PlayerInfo[playerid][pAdmin] == 5)
- {
- if(sscanf(params, "ud", pid, i)) return SendClientMessage(playerid, red, "Usage: /sethp [playerid/name] [Amount]");
- {
- SetPlayerHealth(pid, i);
- format(string, sizeof(string), "Admin %s (%d) has set your health to %d.", adminname,playerid,i);
- SendClientMessage(pid, red, string);
- format(string, sizeof(string), "You have set %s's (%d) health to %d.", paramname,pid,i);
- SendClientMessage(playerid, red, string);
- }
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "Unknown command.");
- return 1;
- }
- CMD:setarm(playerid, params[])
- {
- new i, string[128];
- new pid;
- new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME];
- GetPlayerName(pid, paramname, sizeof(paramname));
- GetPlayerName(playerid, adminname, sizeof(adminname));
- if(PlayerInfo[playerid][pAdmin] == 5)
- {
- if(sscanf(params, "ud", pid, i)) return SendClientMessage(playerid, red, "Server: /setarm [playerid/name] [Amount]");
- {
- SetPlayerArmour(pid, i);
- format(string, sizeof(string), "Admin %s (%d) has set your armour to %d.", adminname,playerid,i);
- SendClientMessage(pid, red, string);
- format(string, sizeof(string), "You have set %s's (%d) armour to %d.", paramname,pid,i);
- SendClientMessage(playerid, red, string);
- }
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "Unknown command.");
- return 1;
- }
- //END ADMIN COMMANDS//
- /*---------------------------------------------------------------------------------------------*/
- public OnPlayerConnect(playerid)
- {
- SendDeathMessage(INVALID_PLAYER_ID,playerid, 200);
- Rules(playerid);
- if(fexist(UserPath(playerid)))
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login and load your account data.","Login","Quit");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...","{FF0000}Type your password below to register a new account.","Register","Quit");
- }
- new ConnIP[16];
- GetPlayerIp(playerid,ConnIP,16);
- new compare_IP[16];
- new number_IP = 0;
- for(new i=0; i<MAX_PLAYERS; i++) {
- if(IsPlayerConnected(i)) {
- GetPlayerIp(i,compare_IP,16);
- if(!strcmp(compare_IP,ConnIP)) number_IP++;
- }
- }
- if((GetTickCount() - Join_Stamp) < Time_Limit)
- exceed=1;
- else
- exceed=0;
- if(strcmp(ban_s, ConnIP, false) == 0 && exceed == 1 )
- {
- Same_IP++;
- if(Same_IP > SAME_IP_CONNECT)
- {
- Ban(playerid);
- Same_IP=0;
- }
- }
- else
- {
- Same_IP=0;
- }
- if(number_IP > IP_LIMIT)
- Ban(playerid);
- GetStampIP(playerid);
- new joinMsg[128], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(joinMsg, sizeof(joinMsg), "4[%d] 03*** %s has joined the server.", playerid, name);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, joinMsg);
- TextDrawShowForPlayer(playerid, WantedLvlTxd[playerid]);
- TextDrawShowForPlayer(playerid, DrugTxd[playerid]);
- TextDrawShowForPlayer(playerid, DrugTxd[playerid]);
- LocationTD[playerid] = TextDrawCreate(8.000000, 430.000000, "_");
- TextDrawBackgroundColor(LocationTD[playerid], 255);
- TextDrawFont(LocationTD[playerid], 2);
- TextDrawLetterSize(LocationTD[playerid], 0.400000, 1.000000);
- TextDrawColor(LocationTD[playerid], -1);
- TextDrawSetOutline(LocationTD[playerid], 1);
- TextDrawSetProportional(LocationTD[playerid], 1);
- TextDrawUseBox(LocationTD[playerid], 1);
- TextDrawBoxColor(LocationTD[playerid], 80);
- TextDrawTextSize(LocationTD[playerid], 222.000000, 18.000000);
- XDeaths[playerid] = 0;
- LastDeath[playerid] = 0;
- IsRobbing[playerid] =0;
- IsBankRobbing[playerid] =0;
- IsApRobbing[playerid] =0;
- zoneupdates[playerid] =1;
- DescriptionText[playerid] = TextDrawCreate(320.0, 380.0, " ");
- TextDrawAlignment(DescriptionText[playerid], 2);
- TextDrawFont(DescriptionText[playerid], 1);
- TextDrawLetterSize(DescriptionText[playerid], 0.320000, 1.700000);
- TextDrawSetOutline(DescriptionText[playerid], 1);
- TextDrawHideForPlayer(playerid, DescriptionText[playerid]);
- new string[128], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- new plrIP[16];
- GetPlayerIp(playerid, plrIP, sizeof(plrIP));
- format(string,sizeof string,"%s has joined the server with the ip %s",pName,plrIP);
- JoinsLog(string);
- for( new i = 0; i <= 50; i ++ ) SendClientMessage(playerid,COLOR_WHITE, "" );
- SendClientMessage(playerid, COLOR_WHITE, "{FFFF66}Welcome to {33FF66}Most Wanted Cops&Robbers - Please {33FF66}register if you are new or login to retrieve your data!");
- SendClientMessage(playerid, COLOR_WHITE, "Be sure to check {FFFF66}/rules - and {FFFF66}/cmds - Type {FFFF66}/help if you need help about the server -");
- for(new i;i<sizeof(Coords);i++) SetPlayerMapIcon(playerid,i,Coords[i][X],Coords[i][Y],Coords[i][Z],Coords[i][ID],0,MAPICON_LOCAL);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- SendDeathMessage(INVALID_PLAYER_ID,playerid,201);
- new leaveMsg[128], name[MAX_PLAYER_NAME], reasonMsg[8];
- switch(reason)
- {
- case 0: reasonMsg = "Timeout";
- case 1: reasonMsg = "Leaving";
- case 2: reasonMsg = "Kicked";
- }
- GetPlayerName(playerid, name, sizeof(name));
- format(leaveMsg, sizeof(leaveMsg), "4[%d] 03*** %s has left the server. (%s)", playerid, name, reasonMsg);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, leaveMsg);
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
- INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
- INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
- INI_WriteInt(File,"WantedLevel",GetPlayerWantedLevel(playerid));
- INI_WriteInt(File,"Vip",PlayerInfo[playerid][pVip]);
- INI_WriteInt(File,"Score",GetPlayerScore(playerid));
- INI_WriteInt(File,"Condoms",PlayerInfo[playerid][pCondoms]);
- INI_WriteInt(File,"Banned",PlayerInfo[playerid][pBanned]);
- INI_WriteInt(File,"Jailed",PlayerInfo[playerid][pJailed]);
- INI_WriteInt(File,"Drugs",PlayerInfo[playerid][pDrug]);
- INI_WriteInt(File,"Nopm",PlayerInfo[playerid][pNopm]);
- INI_WriteInt(File,"Bank",PlayerInfo[playerid][pBank]);
- INI_WriteInt(File,"Sausages",PlayerInfo[playerid][pSausage]);
- INI_WriteInt(File,"PassChange",PlayerInfo[playerid][pPassChange]);
- INI_WriteInt(File,"Mute",PlayerInfo[playerid][pMuted]);
- INI_Close(File);
- if(ireconnect[playerid] == 1)
- {
- new unbanningip[16], string[128];
- GetPVarString(playerid, "reconnect", unbanningip, 16);
- format(string,sizeof(string),"unbanip %s", unbanningip);
- SendRconCommand(string);
- printf(string);
- SendRconCommand("reloadbans");
- ireconnect[playerid] = 0;
- }
- TextDrawDestroy(LocationTD[playerid]);
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(PlayerInfo[playerid][pMuted] == 1)
- {
- SendClientMessage(playerid,0xFF0000FF,"You are muted,you can't talk.");
- return 0;
- }
- if(text[0] == '@' && PlayerInfo[playerid][pAdmin] > 0)
- {
- new sendername[24];
- if(strlen(text) > 128) return SendClientMessage(playerid,0xFF0000FF, "Your message is too long,reduce it. (Max 128 characters)");
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new string[200];
- new msg[200];
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- format(string, sizeof(string), "Admin [%i]%s: %s - %02d/%02d/%d" ,playerid,sendername,text[1],Day,Month,Year);
- SendMessageToAdmins(COLOR_GREEN,string);
- format(msg, sizeof(msg), "9Admin [%i]%s: %s - %02d/%02d/%d", playerid,sendername,text[1],Day,Month,Year);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
- AdminChatLog(string);
- return 0;
- }
- SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 5000);
- new textv2[128], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof (name));
- format(textv2, sizeof (textv2), "(%d) %s", playerid, text);
- SendPlayerMessageToAll(playerid, textv2);
- new TCount, KMessage[128];
- TCount = GetPVarInt(playerid, "TextSpamCount");
- TCount++;
- SetPVarInt(playerid, "TextSpamCount", TCount);
- if(TCount == 3) {
- SendClientMessage(playerid, 0xFFFFFF, "Stop flooding.");
- }
- else if(TCount == 4) {
- GetPlayerName(playerid, KMessage, sizeof(KMessage));
- format(KMessage, sizeof(KMessage), "[Anti-Spam]: %s has been kicked for chat spamming.", KMessage);
- SendClientMessageToAll(0xFFFFFF, KMessage);
- Kick(playerid);
- }
- SetTimerEx("ResetCount", SpamLimit, false, "i", playerid);
- new ircMsg[256];
- format(ircMsg, sizeof(ircMsg), "07[%d] 07%s: %s", playerid, name, text);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, ircMsg);
- return 0;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- SetTimerEx("ResetCommandCount", SpamLimit, false, "i", playerid);
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch( dialogid )
- {
- case DIALOG_REGISTER:
- {
- if (!response) return Kick(playerid);
- if(response)
- {
- if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registering...","{FF0000}You have entered an invalid password.\n""Type your password below to register a new account.","Register","Quit");
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Password",udb_hash(inputtext));
- INI_WriteInt(File,"Cash",0);
- INI_WriteInt(File,"Admin",0);
- INI_WriteInt(File,"Kills",0);
- INI_WriteInt(File,"Deaths",0);
- INI_WriteInt(File,"WantedLevel",0);
- INI_WriteInt(File,"Vip",0);
- INI_WriteInt(File,"Score",0);
- INI_WriteInt(File,"Condoms",0);
- INI_WriteInt(File,"Banned",0);
- INI_WriteInt(File,"Jailed",0);
- INI_WriteInt(File,"Drugs",0);
- INI_WriteInt(File,"Nopm",0);
- INI_WriteInt(File,"Bank",0);
- INI_WriteInt(File,"Sausages",0);
- INI_WriteInt(File,"PassChange",0);
- INI_WriteInt(File,"Mute",0);
- INI_Close(File);
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,"{008000}Success!","{FF0000}Registered and autologged! Now all your data are saved. (Money,score,robberies,wanted level etc)","Ok","");
- }
- }
- case DIALOG_LOGIN:
- {
- if (!response) return Kick(playerid);
- if( response )
- {
- if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
- SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
- SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,"{008000}Success!","{FFFF00}You have successfully logged in!","Ok","");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","{FF0000}You have entered an incorrect password.\n""Type your password below to login.","Login","Quit");
- }
- return 1;
- }
- }
- }
- if(dialogid == 18)
- {
- if(response)
- {
- new skinid, message[64];
- skinid = strval(inputtext);
- if(skinid < 0 || skinid > 299)
- {
- SendClientMessage(playerid, 0x33CCFFAA, "ERROR: Skin ID's avalaible are from 0 to 299!");
- }
- else
- {
- SetPlayerSkin(playerid, skinid);
- format(message, sizeof(message), "Changed Skin to ID = %d.", skinid);
- SendClientMessage(playerid, 0x33CCFFAA, message);
- }
- }
- }
- if(dialogid == 19)
- {
- if(response)
- {
- new weatherid, message[64];
- weatherid = strval(inputtext);
- if(weatherid < 0 || weatherid > 299)
- {
- SendClientMessage(playerid, 0x33CCFFAA, "ERROR: ID 0-299!");
- }
- else
- {
- SetPlayerWeather(playerid, weatherid);
- format(message, sizeof(message), "Weatherid ID Set to %d.", weatherid);
- SendClientMessage(playerid, 0x33CCFFAA, message);
- }
- }
- }
- if(dialogid == 20)
- {
- if(response)
- {
- if(listitem == 0)
- {
- SetPlayerFightingStyle(playerid, 4);
- SendClientMessage(playerid, 0xFFFFFFAA, "Now you have Normal Fighting style!");
- }
- if(listitem == 1)
- {
- SetPlayerFightingStyle(playerid, 5);
- SendClientMessage(playerid, 0xFFFFFFAA, "Now you have Boxing Fighting style!");
- }
- if(listitem == 2)
- {
- SetPlayerFightingStyle(playerid, 6);
- SendClientMessage(playerid, 0xFFFFFFAA, "Now you have Kung Fu Fighting style!");
- }
- if(listitem == 3)
- {
- SetPlayerFightingStyle(playerid, 7);
- SendClientMessage(playerid, 0xFFFFFFAA, "Now you have Kneehead Fighting style!");
- }
- if(listitem == 4)
- {
- SetPlayerFightingStyle(playerid, 15);
- SendClientMessage(playerid, 0xFFFFFFAA, "Now you have Grabkick Fighting style!");
- }
- if(listitem == 5)
- {
- SetPlayerFightingStyle(playerid, 26);
- SendClientMessage(playerid, 0xFFFFFFAA, "Now you have Elbow Fighting style!");
- }
- return 1;
- }
- }
- if(dialogid == DIALOG_247)
- {
- if(response)
- {
- if(listitem == 0) //10 condoms pack
- {
- if(GetPlayerMoney(playerid) >= 5000) {
- GivePlayerMoney(playerid,-5000);
- SendClientMessage(playerid, green,"Bought a pack of 10 condoms");
- PlayerInfo[playerid][pCondoms] += 10;
- }
- else return SendClientMessage(playerid, red, "You can't afford 5.000$ to buy a pack of 10 condoms.");
- }
- if(listitem == 1) //20 condoms pack
- {
- if(GetPlayerMoney(playerid) >= 15000) {
- GivePlayerMoney(playerid,-15000);
- SendClientMessage(playerid, green,"Bought a pack of 20 condoms");
- PlayerInfo[playerid][pCondoms] += 20;
- }
- else return SendClientMessage(playerid, red, "You can't afford 15.000$ to buy a pack of 20 condoms.");
- }
- if(listitem == 2) //50 condoms pack
- {
- if(GetPlayerMoney(playerid) >= 35000) {
- GivePlayerMoney(playerid,-35000);
- SendClientMessage(playerid, green,"Bought a pack of 50 condoms");
- PlayerInfo[playerid][pCondoms] += 50;
- }
- else return SendClientMessage(playerid, red, "You can't afford 35.000$ to buy a pack of 50 condoms.");
- }
- if(listitem == 3) //100 condoms pack
- {
- if(GetPlayerMoney(playerid) >= 75000) {
- GivePlayerMoney(playerid,-75000);
- SendClientMessage(playerid, green,"Bought a pack of 100 condoms");
- PlayerInfo[playerid][pCondoms] += 100;
- }
- else return SendClientMessage(playerid, red, "You can't afford 75.000$ to buy a pack of 100 condoms.");
- }
- if(listitem == 4) //Reset wanted level to 0.
- {
- if(GetPlayerMoney(playerid) >= 50000) {
- GivePlayerMoney(playerid,-50000);
- SendClientMessage(playerid, green,"Wanted Level resetted to 0.");
- SetPlayerWantedLevel(playerid,0);
- }
- else return SendClientMessage(playerid, red, "You can't afford 50.000$ to buy the health pack.");
- }
- if(listitem == 5) //Health
- {
- if(GetPlayerMoney(playerid) >= 5000) {
- GivePlayerMoney(playerid,-5000);
- SendClientMessage(playerid, green,"Bought health pack.HP refilled.");
- SetPlayerHealth(playerid,90);
- }
- else return SendClientMessage(playerid, red, "You can't afford 5000$ to buy the health pack.");
- }
- if(listitem == 6) //Armour
- {
- if(GetPlayerMoney(playerid) >= 10000) {
- GivePlayerMoney(playerid,-10000);
- SendClientMessage(playerid, green,"Bought armour pack.Armour refilled.");
- SetPlayerArmour(playerid,90);
- }
- else return SendClientMessage(playerid, red, "You can't afford 10.000$ to buy the armour pack.");
- }
- if(listitem == 7) //5 Sausages
- {
- if(GetPlayerMoney(playerid) >= 1500) {
- GivePlayerMoney(playerid,-1500);
- SendClientMessage(playerid, green,"You bought 5 sausages.Use /sausage to eat them or /gs to give sausages to a player");
- PlayerInfo[playerid][pSausage] +=5;
- }
- else return SendClientMessage(playerid, red, "You can't afford 1500$ to buy 5 sausages!");
- }
- if(listitem == 8) //10 Sausages
- {
- if(GetPlayerMoney(playerid) >= 2500) {
- GivePlayerMoney(playerid,-2500);
- SendClientMessage(playerid, green,"You bought 10 sausages.Use /sausage to eat them or /gs to give sausages to a player");
- PlayerInfo[playerid][pSausage] +=10;
- }
- else return SendClientMessage(playerid, red, "You can't afford 2500$ to buy 10 sausages!");
- }
- if(listitem == 9) //25 Sausages
- {
- if(GetPlayerMoney(playerid) >= 5000) {
- GivePlayerMoney(playerid,-5000);
- SendClientMessage(playerid, green,"You bought 25 sausages.Use /sausage to eat them or /gs to give sausages to a player");
- PlayerInfo[playerid][pSausage] +=25;
- }
- else return SendClientMessage(playerid, red, "You can't afford 2500$ to buy 25 sausages!");
- }
- return 1;
- }
- }
- if(dialogid == DIALOG_CHANGEPASS)
- {
- if (response == 0)
- {
- return 1;
- }
- if (response == 1)
- {
- if (strlen(inputtext)==0)
- {
- SendClientMessage(playerid,red,"Please enter your desired new password in the box.YOU CAN CHANGE YOUR PASSWORD JUST ONE TIME,SO CHOOSE WISELY!");
- ShowChangePassScreen(playerid);
- return 1;
- }
- new INI:File = INI_Open(UserPath(playerid));
- INI_WriteInt(File,"Password",udb_hash(inputtext));
- new string[128];
- format(string,sizeof(string),"You have successfully changed your password to '%s'.Use this to login from now on.");
- SendClientMessage(playerid,yellow,string);
- PlayerInfo[playerid][pPassChange] = 1;
- GameTextForPlayer(playerid, "~w~Password changed!", 5000, 5);
- return true;
- }
- return 1;
- }
- return 1;
- }
- SetPlayerTeamFromClass(playerid, classid)
- {
- if(classid == 0)
- {
- gTeam[playerid] = TEAM_COP;
- }
- else if(classid == 1)
- {
- gTeam[playerid] = TEAM_COP;
- }
- else if(classid == 2)
- {
- gTeam[playerid] = TEAM_COP;
- }
- else if(classid == 3)
- {
- gTeam[playerid] = TEAM_COP;
- }
- else if(classid == 4)
- {
- gTeam[playerid] = TEAM_COP;
- }
- else if(classid == 5)
- {
- gTeam[playerid] = TEAM_CIV;
- }
- else if(classid == 6)
- {
- gTeam[playerid] = TEAM_CIV;
- }
- else if(classid == 7)
- {
- gTeam[playerid] = TEAM_CIV;
- }
- else if(classid == 8)
- {
- gTeam[playerid] = TEAM_CIV;
- }
- else if(classid == 9)
- {
- gTeam[playerid] = TEAM_CIV;
- }
- else if(classid == 10)
- {
- gTeam[playerid] = TEAM_CIV;
- }
- else if(classid == 11)
- {
- gTeam[playerid] = TEAM_CIV;
- }
- else if(classid == 12)
- {
- gTeam[playerid] = TEAM_CIV;
- }
- else if(classid == 13)
- {
- gTeam[playerid] = TEAM_CIV;
- }
- else if(classid == 14)
- {
- gTeam[playerid] = TEAM_CIV;
- }
- return 1;
- }
- SetPlayerToTeamColour(playerid)
- {
- if(gTeam[playerid] == TEAM_COP)
- {
- SetPlayerColor(playerid,COLOR_BLUE);
- }
- if(gTeam[playerid] == TEAM_CIV)
- {
- SetPlayerColor(playerid,COLOR_WHITE);
- }
- return 1;
- }
- //---------------------------------------------------------------------IRC PLAYER COMMANDS---------------------------------------------------------------------
- IRCCMD:cmds(botid, channel[], user[], host[], params[])
- {
- IRC_Notice(gGroupID,user,"IRC COMMANDS");
- IRC_Notice(gGroupID,user,"Player commands: !s - !tp - !admins - !pm - !time");
- return 1;
- }
- IRCCMD:acmds(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsHalfop(botid, channel, user))
- {
- IRC_Notice(gGroupID,user,"IRC ADMIN COMMANDS");
- IRC_Notice(gGroupID,user,"Admin commands: !kick - !ban - !rcon - !ann - !freeze - !unfreeze - !explode - !mute - !unmute - !ip - !achat - !money - !sall - !banip");
- }
- return 1;
- }
- IRCCMD:s(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsVoice(botid, channel, user))
- {
- new msg9[128];
- format(msg9, sizeof(msg9), "Your message is too long,reduce it. (Max 128 characters)");
- if(strlen(params) > 128) return IRC_GroupSay(gGroupID, channel, msg9);
- if (!isnull(params))
- {
- new msg[128];
- new msg2[128];
- format(msg, sizeof(msg), "11*** %s on IRC: %s", user, params);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
- format(msg2, sizeof(msg2), "*** %s on IRC: %s", user, params);
- SendClientMessageToAll(COLOR_YELLOW, msg2);
- }
- }
- return 1;
- }
- IRCCMD:tp(botid, channel[], user[], host[], params[])
- {
- new count,msg[90];
- for(new i=0; i<=MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i)) count++;
- }
- format(msg,90,"1,9* %s has requested the total player count: %d",user,count);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
- return 1;
- }
- IRCCMD:admins(botid, channel[], user[], host[])
- {
- new str[100],name[24];
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] >= 1)
- {
- GetPlayerName(i,name,sizeof name);
- format(str,sizeof str,"0,3Admin %s (ID:%d) (Level %d)",name,i,PlayerInfo[i][pAdmin]);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, str);
- }
- }
- return 1;
- }
- IRCCMD:time(botid, channel[], user[], host[], params[])
- {
- new msg1[100],hour,minute,second,year,month,day;
- gettime(hour,minute,second);
- getdate(year,month,day);
- format(msg1,100,"10>> Day: %02d/%02d/%02d 10Hour: %02d:%02d:%02d",day,month,year,hour,minute,second);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, msg1);
- return 1;
- }
- IRCCMD:pm(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsVoice(botid, channel, user))
- {
- new playerid,message[76];
- if (sscanf(params, "dz", playerid, message))
- {
- return 1;
- }
- if (IsPlayerConnected(playerid))
- {
- new msg[128],name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "7*IRC PM from %s to %s (ID:%i): %s", user, name, playerid, message);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
- format(msg, sizeof(msg), "*IRC PM from %s : %s", user, message);
- SendClientMessage(playerid, 0xFFFFAAA, msg);
- PmLog(msg);
- }
- }
- return 1;
- }
- //---------------------------------------------------------------------IRC PLAYER COMMANDS---------------------------------------------------------------------
- //---------------------------------------------------------------------IRC ADMIN COMMANDS---------------------------------------------------------------------
- IRCCMD:kick(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsHalfop(botid, channel, user))
- {
- new playerid, reason[64];
- if (sscanf(params, "dS(No reason)[64]", playerid, reason))
- {
- return 1;
- }
- if (IsPlayerConnected(playerid))
- {
- new msg[180], name[MAX_PLAYER_NAME];
- new msg2[180];
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "0,4*** %s has been kicked by %s on IRC. (%s) - %02d/%02d/%d - %02d:%02d:%02d", name, user, reason,Day,Month,Year,Hour,Minute,Second);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
- format(msg2, sizeof(msg2), "*** %s has been kicked by %s on IRC. (%s) - %02d/%02d/%d - %02d:%02d:%02d", name, user, reason,Day,Month,Year,Hour,Minute,Second);
- SendClientMessageToAll(0x0000FFFF, msg2);
- Kick(playerid);
- KickLog(msg2);
- }
- }
- return 1;
- }
- IRCCMD:ban(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsOp(botid, channel, user))
- {
- new playerid, reason[64];
- if (sscanf(params, "dS(No reason)[64]", playerid, reason))
- {
- return 1;
- }
- if (IsPlayerConnected(playerid))
- {
- new msg[180], name[MAX_PLAYER_NAME];
- new msg2[180];
- GetPlayerName(playerid, name, sizeof(name));
- new Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- format(msg, sizeof(msg), "0,4*** %s has been banned by %s on IRC. (%s) - %02d/%02d/%d - %02d:%02d:%02d", name, user, reason,Day,Month,Year,Hour,Minute,Second);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
- format(msg2, sizeof(msg2), "*** %s (%d) has been banned by %s on IRC. (%s) - %02d/%02d/%d - %02d:%02d:%02d", name,playerid, user, reason,Day,Month,Year,Hour,Minute,Second);
- SendClientMessageToAll(0x0000FFFF, msg2);
- SendClientMessage(playerid,red,"If you think this is a mistake,post an unban appeal at www.codsamp.net");
- PlayerInfo[playerid][pBanned] = 1;
- BanLog(msg2);
- BanEx(playerid, reason);
- }
- }
- return 1;
- }
- IRCCMD:rcon(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsOwner(botid, channel, user))
- {
- if (!isnull(params))
- {
- if (strcmp(params, "exit", true) != 0 && strfind(params, "loadfs irc", true) == -1)
- {
- new msg[128];
- format(msg, sizeof(msg), "RCON command %s has been executed.", params);
- SendRconCommand(params);
- }
- }
- }
- return 1;
- }
- IRCCMD:ann(botid, channel[], user[], host[], params[])
- {
- if(IRC_IsOp(botid, channel, user))
- {
- new msg[128];
- format(msg, sizeof(msg), "Your message is too long,reduce it. (Max 128 characters)");
- if(strlen(params) > 128) return IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
- if(!isnull(params))
- {
- new string[128];
- format(string, 122, "%s", params);
- GameTextForAll(string, 7000, 3);
- format(string, 122, "4Admin %s has ingame announced: %s", user, params);
- IRC_Say(gGroupID, IRC_CHANNEL, string);
- }
- }
- return 1;
- }
- IRCCMD:unfreeze(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsOp(botid, channel, user))
- {
- new playerid,reason[64];
- if (sscanf(params, "dz", playerid, reason))
- {
- return 1;
- }
- if (IsPlayerConnected(playerid))
- {
- new msg[128],name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "04*** %s has been unfrozen by %s on IRC.", name, user);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
- format(msg, sizeof(msg), "* Admin %s on IRC has unfrozen %s ",user, name);
- SendClientMessageToAll(0xAA3333AA, msg);
- TogglePlayerControllable(playerid, 1);
- }
- }
- return 1;
- }
- IRCCMD:freeze(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsOp(botid, channel, user))
- {
- new playerid,reason[64];
- if (sscanf(params, "dz", playerid, reason))
- {
- return 1;
- }
- if (IsPlayerConnected(playerid))
- {
- new msg[128],name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "04*** %s has been frozen by %s on IRC.", name, user);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
- format(msg, sizeof(msg), "* Admin %s on IRC has frozen %s ",user, name);
- SendClientMessageToAll(0xAA3333AA, msg);
- TogglePlayerControllable(playerid, 0);
- }
- }
- return 1;
- }
- IRCCMD:explode(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsOp(botid, channel, user))
- {
- new playerid,reason[64];
- if (sscanf(params, "dz", playerid, reason))
- {
- return 1;
- }
- if (IsPlayerConnected(playerid))
- {
- new msg[128],name[MAX_PLAYER_NAME];
- if (isnull(reason))
- {
- format(reason, sizeof(reason), "No reason");
- }
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "04*** %s has been exploded by %s on IRC. (%s)", name, user, reason);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
- format(msg, sizeof(msg), "*** %s has been exploded by %s on IRC. (%s)", name, user, reason);
- SendClientMessageToAll(0xAA3333AA, msg);
- new Float:x, Float:y, Float:z; GetPlayerPos(playerid,x,y,z); CreateExplosion(x, y , z, 7, 10.0);
- }
- }
- return 1;
- }
- IRCCMD:mute(botid, channel[], user[], host[], params[])
- {
- if(IRC_IsOp(botid,channel,user))
- {
- new id,rsn[128],name[24];
- if(sscanf(params,"dz",id,rsn)) return IRC_GroupSay(gGroupID, channel,"4Usage: !mute <playerid> <optional:reason>");
- if(!IsPlayerConnected(id)) return IRC_GroupSay(gGroupID, channel,"4Player is not connected!");
- GetPlayerName(id, name, sizeof(name));
- new string[128];
- if(strlen(rsn) > 0)
- {
- format(string, sizeof(string),"IRC Admin %s muted %s (ID:%d). [Reason: %s ]",user,name,id,rsn);
- SendClientMessageToAll(ADMIN_RED, string);
- format(string, sizeof(string),"4IRC Admin %s muted %s (ID:%d). [Reason: %s ]",user,name,id,rsn);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, string);
- PlayerInfo[id][pMuted] = 1;
- }
- else
- {
- format(string, sizeof(string),"IRC Admin %s muted %s (ID:%d)",user,name,id);
- SendClientMessageToAll(ADMIN_RED, string);
- format(string, sizeof(string),"4IRC Admin %s muted %s (ID:%d)",user,name,id);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, string);
- }
- }
- return 1;
- }
- IRCCMD:unmute(botid, channel[], user[], host[], params[])
- {
- if(IRC_IsOp(botid,channel,user))
- {
- new id,name[24];
- if(sscanf(params,"d",id)) return IRC_GroupSay(gGroupID, channel,"4Usage: !unmute <playerid>");
- if(!IsPlayerConnected(id)) return IRC_GroupSay(gGroupID, channel,"4Player is not connected!");
- GetPlayerName(id, name, sizeof(name));
- new string[100];
- format(string, sizeof(string),"IRC Admin %s unmuted %s (ID:%d)",user,name,id);
- SendClientMessageToAll(ADMIN_RED, string);
- format(string, sizeof(string),"4IRC Admin %s unmuted %s (ID:%d)",user,name,id);
- IRC_GroupSay(gGroupID, IRC_CHANNEL, string);
- PlayerInfo[id][pMuted] = 0;
- }
- return 1;
- }
- IRCCMD:ip(botid, channel[], user[], host[], params[])
- {
- new msg[128], IP[16];
- new nick[MAX_PLAYER_NAME];
- new playerid;
- GetPlayerName(playerid, nick, MAX_PLAYER_NAME);
- if (IRC_IsOp(botid, channel, user))
- {
- if (sscanf(params, "d", playerid)) return IRC_GroupSay(gGroupID, channel,"4Usage: !ip <playerid>");
- if(playerid == INVALID_PLAYER_ID) return IRC_GroupSay(gGroupID, channel,"4Player is not connected!");
- GetPlayerIp(playerid,IP,16);
- format(msg,128,"4%s (%d): %s",nick,playerid,IP);
- IRC_GroupSay(gGroupID,IRC_CHANNEL,msg);
- return 1;
- }
- return 1;
- }
- IRCCMD:achat(botid, channel[], user[], host[], params[])
- {
- new msg1[256];
- if(isnull(params)) return IRC_GroupSay(gGroupID, channel,"4Usage: !achat <message>");
- if (IRC_IsHalfop(botid, channel, user))
- {
- format(msg1,sizeof(msg1),"11[Admin Chat %s(IRC)]: %s",user,params);
- IRC_GroupSay(gGroupID,IRC_CHANNEL,msg1);
- new msg2[256];
- format(msg2,sizeof(msg2),"[Admin Chat %s(IRC)]: %s",user,params);
- SendMessageToAdmins(COLOR_ORANGE, msg2);
- AdminChatLog(msg2);
- }
- return 1;
- }
- IRCCMD:money(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsHalfop(botid, channel, user))
- {
- new giveid,msg1[100];
- if(isnull(params)) return IRC_GroupSay(gGroupID, channel,"3Usage: !money <PlayerName/PlayerID>");
- giveid = ReturnUser(params);
- if(!IsPlayerConnected(giveid))return IRC_GroupSay(gGroupID, channel,"4*** Error: Invalid player ID.");
- format(msg1,100,"10Money from %s (ID: %d): $%d",pNick(giveid),giveid,GetPlayerMoney(giveid));
- IRC_GroupSay(gGroupID,IRC_CHANNEL,msg1);
- }
- return 1;
- }
- IRCCMD:sall(botid, channel[], user[], host[], params[])
- {
- if (IRC_IsHalfop(botid, channel, user))
- {
- for(new i=0; i<=MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i)) SavePlayer(i);
- }
- }
- IRC_GroupSay(gGroupID, channel,"4***Players Online Stats Saved***");
- return 1;
- }
- //---------------------------------------------------------------------IRC ADMIN COMMANDS---------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement