commit
56d228c5d5
@ -9,7 +9,7 @@
|
|||||||
#include < YSI\y_hooks >
|
#include < YSI\y_hooks >
|
||||||
|
|
||||||
/* ** Definitions ** */
|
/* ** Definitions ** */
|
||||||
#define ALL_CHECKPOINTS ( 37 )
|
#define ALL_CHECKPOINTS ( 50 )
|
||||||
|
|
||||||
#define CP_BANK_MENU ( 1 )
|
#define CP_BANK_MENU ( 1 )
|
||||||
#define CP_247_MENU ( 2 )
|
#define CP_247_MENU ( 2 )
|
||||||
@ -23,65 +23,65 @@
|
|||||||
#define CP_AMMUNATION_1 ( 10 )
|
#define CP_AMMUNATION_1 ( 10 )
|
||||||
#define CP_AMMUNATION_2 ( 11 )
|
#define CP_AMMUNATION_2 ( 11 )
|
||||||
#define CP_COUNTRY_BANK_MENU ( 12 )
|
#define CP_COUNTRY_BANK_MENU ( 12 )
|
||||||
#define CP_HOSPITAL_LV ( 14 )
|
#define CP_HOSPITAL_LV ( 13 )
|
||||||
#define CP_FIGHTSTYLE_LV ( 15 )
|
#define CP_FIGHTSTYLE_LV ( 14 )
|
||||||
#define CP_HOSPITAL1_LS ( 17 )
|
#define CP_HOSPITAL1_LS ( 15 )
|
||||||
#define CP_HOSPITAL2_LS ( 18 )
|
#define CP_HOSPITAL2_LS ( 16 )
|
||||||
#define CP_FIGHTSTYLE_LS ( 19 )
|
#define CP_FIGHTSTYLE_LS ( 17 )
|
||||||
#define CP_PAWNSHOP ( 20 )
|
#define CP_PAWNSHOP ( 18 )
|
||||||
#define CP_HOSPITAL_FC ( 21 )
|
#define CP_HOSPITAL_FC ( 19 )
|
||||||
#define CP_REFILL_AMMO ( 22 )
|
#define CP_REFILL_AMMO ( 20 )
|
||||||
#define CP_REFILL_AMMO_LS ( 23 )
|
#define CP_REFILL_AMMO_LS ( 21 )
|
||||||
#define CP_REFILL_AMMO_LV ( 24 )
|
#define CP_REFILL_AMMO_LV ( 22 )
|
||||||
/*#define CP_DROP_OFF_COP ( 28 )
|
#define CP_DROP_OFF_COP ( 23 )
|
||||||
#define CP_DROP_OFF_FC ( 29 )
|
#define CP_DROP_OFF_FC ( 24 )
|
||||||
#define CP_DROP_OFF_DILLIMORE ( 30 )
|
#define CP_DROP_OFF_DILLIMORE ( 25 )
|
||||||
#define CP_DROP_OFF_DIABLO ( 31 )
|
#define CP_DROP_OFF_DIABLO ( 26 )
|
||||||
#define CP_DROP_OFF_QUBRADOS ( 32 )
|
#define CP_DROP_OFF_QUBRADOS ( 27 )
|
||||||
#define CP_DROP_OFF_COP_LS ( 33 )
|
#define CP_DROP_OFF_COP_LS ( 28 )
|
||||||
#define CP_DROP_OFF_FBI_LS ( 34 )
|
#define CP_DROP_OFF_FBI_LS ( 29 )
|
||||||
#define CP_DROP_OFF_FBI_LV ( 35 )
|
#define CP_DROP_OFF_FBI_LV ( 30 )
|
||||||
#define CP_DROP_OFF_COP_LV ( 36 )
|
#define CP_DROP_OFF_COP_LV ( 31 )
|
||||||
#define CP_DROP_OFF_FBI ( 37 )
|
#define CP_DROP_OFF_FBI ( 32 )
|
||||||
#define CP_DROP_OFF_HELI ( 38 )*/
|
#define CP_DROP_OFF_HELI ( 33 )
|
||||||
#define CP_BIZ_TERMINAL_COKE ( 25 )
|
#define CP_BIZ_TERMINAL_COKE ( 34 )
|
||||||
#define CP_BIZ_TERMINAL_METH ( 26 )
|
#define CP_BIZ_TERMINAL_METH ( 35 )
|
||||||
#define CP_BIZ_TERMINAL_WEED ( 27 )
|
#define CP_BIZ_TERMINAL_WEED ( 36 )
|
||||||
#define CP_BIZ_TERMINAL_WEAP ( 28 )
|
#define CP_BIZ_TERMINAL_WEAP ( 37 )
|
||||||
#define CP_REWARDS_4DRAG ( 29 )
|
#define CP_REWARDS_4DRAG ( 38 )
|
||||||
#define CP_REWARDS_CALIG ( 30 )
|
#define CP_REWARDS_CALIG ( 39 )
|
||||||
#define CP_REWARDS_VISAGE ( 31 )
|
#define CP_REWARDS_VISAGE ( 40 )
|
||||||
#define CP_AIRPORT_SF ( 32 )
|
#define CP_AIRPORT_SF ( 41 )
|
||||||
#define CP_AIRPORT_LS ( 33 )
|
#define CP_AIRPORT_LS ( 42 )
|
||||||
#define CP_AIRPORT_LV ( 34 )
|
#define CP_AIRPORT_LV ( 43 )
|
||||||
#define CP_CASINO_BAR ( 35 )
|
#define CP_CASINO_BAR ( 44 )
|
||||||
#define CP_ALCATRAZ_EXPORT ( 36 )
|
#define CP_ALCATRAZ_EXPORT ( 45 )
|
||||||
|
|
||||||
new g_Checkpoints [ ALL_CHECKPOINTS ] = { -1, ... };
|
new g_Checkpoints [ ALL_CHECKPOINTS ] = { -1, ... };
|
||||||
|
|
||||||
/* ** Hooks ** */
|
/* ** Hooks ** */
|
||||||
hook OnScriptInit( )
|
hook OnScriptInit( )
|
||||||
{
|
{
|
||||||
//g_Checkpoints[ CP_DROP_OFF_COP ] = CreateDynamicCP( -1577.0952, 683.9492, 7.2440, 3.0, 0, -1, -1, 100.0 );
|
g_Checkpoints[ CP_DROP_OFF_COP ] = CreateDynamicCP( -1577.0952, 683.9492, 7.2440, 3.0, 0, -1, -1, 100.0 );
|
||||||
g_Checkpoints[ CP_BANK_MENU ] = CreateDynamicCP( -1405.0657, 831.0966, 984.7126, 1.0, -1, -1, -1, 100.0 );
|
g_Checkpoints[ CP_BANK_MENU ] = CreateDynamicCP( -1405.0657, 831.0966, 984.7126, 1.0, -1, -1, -1, 100.0 );
|
||||||
g_Checkpoints[ CP_COUNTRY_BANK_MENU ] = CreateDynamicCP( 2156.1299, 1640.2460, 1041.6124, 1.0, -1, -1, -1, 100.0 );
|
g_Checkpoints[ CP_COUNTRY_BANK_MENU ] = CreateDynamicCP( 2156.1299, 1640.2460, 1041.6124, 1.0, -1, -1, -1, 100.0 );
|
||||||
g_Checkpoints[ CP_CHANGE_JOB ] = CreateDynamicCP( 361.8525, 173.6031, 1008.3828, 1.0, -1, -1, -1, 50.0 );
|
g_Checkpoints[ CP_CHANGE_JOB ] = CreateDynamicCP( 361.8525, 173.6031, 1008.3828, 1.0, -1, -1, -1, 50.0 );
|
||||||
g_Checkpoints[ CP_HOSPITAL ] = CreateDynamicCP( -2647.5007, 659.0084, 970.4332, 2.0, -1, -1, -1, 100.0 );
|
g_Checkpoints[ CP_HOSPITAL ] = CreateDynamicCP( -2647.5007, 659.0084, 970.4332, 2.0, -1, -1, -1, 100.0 );
|
||||||
g_Checkpoints[ CP_PAINTBALL ] = CreateDynamicCP( -2172.2017, 252.1113, 35.3388, 1.0, -1, -1, -1, 100.0 );
|
g_Checkpoints[ CP_PAINTBALL ] = CreateDynamicCP( -2172.2017, 252.1113, 35.3388, 1.0, -1, -1, -1, 100.0 );
|
||||||
//g_Checkpoints[ CP_DROP_OFF_FBI ] = CreateDynamicCP( -2446.6785, 522.9684, 30.2548, 3.0, -1, -1, -1, 100.0 );
|
g_Checkpoints[ CP_DROP_OFF_FBI ] = CreateDynamicCP( -2446.6785, 522.9684, 30.2548, 3.0, -1, -1, -1, 100.0 );
|
||||||
g_Checkpoints[ CP_FIGHTSTYLE ] = CreateDynamicCP( 768.2576, -22.8351, 1000.5859, 2.0, -1, -1, -1, 25.0 );
|
g_Checkpoints[ CP_FIGHTSTYLE ] = CreateDynamicCP( 768.2576, -22.8351, 1000.5859, 2.0, -1, -1, -1, 25.0 );
|
||||||
g_Checkpoints[ CP_247_MENU ] = CreateDynamicCP( -29.0409, -184.7446, 1003.5469, 1.0, -1, -1, -1, 25.0 );
|
g_Checkpoints[ CP_247_MENU ] = CreateDynamicCP( -29.0409, -184.7446, 1003.5469, 1.0, -1, -1, -1, 25.0 );
|
||||||
g_Checkpoints[ CP_AMMUNATION_0 ] = CreateDynamicCP( 296.3782, -38.4512, 1001.5156, 1.0, -1, -1, -1, 20.0 );
|
g_Checkpoints[ CP_AMMUNATION_0 ] = CreateDynamicCP( 296.3782, -38.4512, 1001.5156, 1.0, -1, -1, -1, 20.0 );
|
||||||
g_Checkpoints[ CP_AMMUNATION_1 ] = CreateDynamicCP( 295.4524, -80.7487, 1001.5156, 1.0, -1, -1, -1, 20.0 );
|
g_Checkpoints[ CP_AMMUNATION_1 ] = CreateDynamicCP( 295.4524, -80.7487, 1001.5156, 1.0, -1, -1, -1, 20.0 );
|
||||||
g_Checkpoints[ CP_AMMUNATION_2 ] = CreateDynamicCP( 312.8432, -166.1419, 999.6010, 1.0, -1, -1, -1, 20.0 );
|
g_Checkpoints[ CP_AMMUNATION_2 ] = CreateDynamicCP( 312.8432, -166.1419, 999.6010, 1.0, -1, -1, -1, 20.0 );
|
||||||
//g_Checkpoints[ CP_DROP_OFF_HELI ] = CreateDynamicCP( -1651.6956, 700.8394, 38.2422, 5.0, -1, -1, -1, 50.0 );
|
g_Checkpoints[ CP_DROP_OFF_HELI ] = CreateDynamicCP( -1651.6956, 700.8394, 38.2422, 5.0, -1, -1, -1, 50.0 );
|
||||||
g_Checkpoints[ CP_PAWNSHOP ] = CreateDynamicCP( 1333.0847, -1080.0726, 968.0430, 1.0, -1, -1, -1, 20.0 );
|
g_Checkpoints[ CP_PAWNSHOP ] = CreateDynamicCP( 1333.0847, -1080.0726, 968.0430, 1.0, -1, -1, -1, 20.0 );
|
||||||
g_Checkpoints[ CP_REFILL_AMMO ] = CreateDynamicCP( -1615.2600, 685.5120, 7.1875, 1.0, -1, -1, -1, 20.0 );
|
g_Checkpoints[ CP_REFILL_AMMO ] = CreateDynamicCP( -1615.2600, 685.5120, 7.1875, 1.0, -1, -1, -1, 20.0 );
|
||||||
g_Checkpoints[ CP_REFILL_AMMO_LS ] = CreateDynamicCP( -1615.2600, 685.5120, 7.1875, 1.0, -1, -1, -1, 20.0 );
|
g_Checkpoints[ CP_REFILL_AMMO_LS ] = CreateDynamicCP( -1615.2600, 685.5120, 7.1875, 1.0, -1, -1, -1, 20.0 );
|
||||||
//g_Checkpoints[ CP_DROP_OFF_FC ] = CreateDynamicCP( -211.6869, 979.3518, 19.3237, 3.0, -1, -1, -1, 100.0 );
|
g_Checkpoints[ CP_DROP_OFF_FC ] = CreateDynamicCP( -211.6869, 979.3518, 19.3237, 3.0, -1, -1, -1, 100.0 );
|
||||||
//g_Checkpoints[ CP_DROP_OFF_DILLIMORE ] = CreateDynamicCP( 614.2876, -588.6716, 17.2330, 3.0, -1, -1, -1, 100.0 );
|
g_Checkpoints[ CP_DROP_OFF_DILLIMORE ] = CreateDynamicCP( 614.2876, -588.6716, 17.2330, 3.0, -1, -1, -1, 100.0 );
|
||||||
//g_Checkpoints[ CP_DROP_OFF_DIABLO ] = CreateDynamicCP( -433.3666, 2255.6064, 42.4297, 3.0, -1, -1, -1, 100.0 );
|
g_Checkpoints[ CP_DROP_OFF_DIABLO ] = CreateDynamicCP( -433.3666, 2255.6064, 42.4297, 3.0, -1, -1, -1, 100.0 );
|
||||||
//g_Checkpoints[ CP_DROP_OFF_QUBRADOS ] = CreateDynamicCP( -1400.0497, 2647.2358, 55.6875, 3.0, -1, -1, -1, 100.0 );
|
g_Checkpoints[ CP_DROP_OFF_QUBRADOS ] = CreateDynamicCP( -1400.0497, 2647.2358, 55.6875, 3.0, -1, -1, -1, 100.0 );
|
||||||
g_Checkpoints[ CP_BIZ_TERMINAL_COKE ] = CreateDynamicCP( 2563.5728, -1310.5925, 1143.7242, 1.0, -1, -1, -1, 30.0 );
|
g_Checkpoints[ CP_BIZ_TERMINAL_COKE ] = CreateDynamicCP( 2563.5728, -1310.5925, 1143.7242, 1.0, -1, -1, -1, 30.0 );
|
||||||
g_Checkpoints[ CP_BIZ_TERMINAL_METH ] = CreateDynamicCP( 2034.0669, 1001.6073, 1510.2416, 1.0, -1, -1, -1, 30.0 );
|
g_Checkpoints[ CP_BIZ_TERMINAL_METH ] = CreateDynamicCP( 2034.0669, 1001.6073, 1510.2416, 1.0, -1, -1, -1, 30.0 );
|
||||||
g_Checkpoints[ CP_BIZ_TERMINAL_WEED ] = CreateDynamicCP( -1742.9982, -1377.3049, 5874.1333, 1.0, -1, -1, -1, 30.0 );
|
g_Checkpoints[ CP_BIZ_TERMINAL_WEED ] = CreateDynamicCP( -1742.9982, -1377.3049, 5874.1333, 1.0, -1, -1, -1, 30.0 );
|
||||||
@ -96,19 +96,19 @@ hook OnScriptInit( )
|
|||||||
g_Checkpoints[ CP_ALCATRAZ_EXPORT ] = CreateDynamicCP( -1999.9487, 1781.2325, 43.7386, 1.0, -1, -1, -1, 30.0 );
|
g_Checkpoints[ CP_ALCATRAZ_EXPORT ] = CreateDynamicCP( -1999.9487, 1781.2325, 43.7386, 1.0, -1, -1, -1, 30.0 );
|
||||||
|
|
||||||
// Out of SF
|
// Out of SF
|
||||||
//CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, -211.6869, 979.3518, 19.3237, 50.0);
|
CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, -211.6869, 979.3518, 19.3237, 50.0);
|
||||||
//CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, 614.2876, -588.6716, 17.2330, 50.0);
|
CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, 614.2876, -588.6716, 17.2330, 50.0);
|
||||||
//CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, -433.3666, 2255.6064, 42.4297, 50.0);
|
CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, -433.3666, 2255.6064, 42.4297, 50.0);
|
||||||
//CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, -1400.0497, 2647.2358, 55.6875, 50.0);
|
CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, -1400.0497, 2647.2358, 55.6875, 50.0);
|
||||||
|
|
||||||
#if ENABLE_CITY_LV == true
|
#if ENABLE_CITY_LV == true
|
||||||
//g_Checkpoints[ CP_DROP_OFF_COP_LV ] = CreateDynamicCP( 2225.6753, 2457.2388, -7.4531, 3.0, 0, -1, -1, 100.0 );
|
g_Checkpoints[ CP_DROP_OFF_COP_LV ] = CreateDynamicCP( 2225.6753, 2457.2388, -7.4531, 3.0, 0, -1, -1, 100.0 );
|
||||||
g_Checkpoints[ CP_HOSPITAL_LV ] = CreateDynamicCP( 1607.2659, 1815.2485, 10.8203, 2.0, -1, -1, -1, 100.0 );
|
g_Checkpoints[ CP_HOSPITAL_LV ] = CreateDynamicCP( 1607.2659, 1815.2485, 10.8203, 2.0, -1, -1, -1, 100.0 );
|
||||||
//g_Checkpoints[ CP_DROP_OFF_FBI_LV ] = CreateDynamicCP( 948.6036, 1811.2720, 8.6484, 3.0, -1, -1, -1, 100.0 );
|
g_Checkpoints[ CP_DROP_OFF_FBI_LV ] = CreateDynamicCP( 948.6036, 1811.2720, 8.6484, 3.0, -1, -1, -1, 100.0 );
|
||||||
g_Checkpoints[ CP_FIGHTSTYLE_LV ] = CreateDynamicCP( 766.8416, -62.1872, 1000.6563, 2.0, -1, -1, -1, 25.0 );
|
g_Checkpoints[ CP_FIGHTSTYLE_LV ] = CreateDynamicCP( 766.8416, -62.1872, 1000.6563, 2.0, -1, -1, -1, 25.0 );
|
||||||
g_Checkpoints[ CP_REFILL_AMMO_LV ] = CreateDynamicCP( 2251.9438, 2488.7981, 10.9908, 1.0, -1, -1, -1, 20.0 );
|
g_Checkpoints[ CP_REFILL_AMMO_LV ] = CreateDynamicCP( 2251.9438, 2488.7981, 10.9908, 1.0, -1, -1, -1, 20.0 );
|
||||||
//CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, 2225.6753, 2457.2388, -7.4531, 20.0);
|
CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, 2225.6753, 2457.2388, -7.4531, 20.0);
|
||||||
//CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, 948.6036, 1811.2720, 8.6484, 20.0);
|
CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, 948.6036, 1811.2720, 8.6484, 20.0);
|
||||||
CreateDynamic3DTextLabel("[LEARN FIGHT STYLES]", COLOR_GOLD, 766.8416, -62.1872, 1000.6563, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 9);
|
CreateDynamic3DTextLabel("[LEARN FIGHT STYLES]", COLOR_GOLD, 766.8416, -62.1872, 1000.6563, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 9);
|
||||||
CreateDynamic3DTextLabel("[HOSPITAL]", COLOR_GOLD, 1607.2659, 1815.2485, 10.8203, 20.0);
|
CreateDynamic3DTextLabel("[HOSPITAL]", COLOR_GOLD, 1607.2659, 1815.2485, 10.8203, 20.0);
|
||||||
CreateDynamic3DTextLabel("[REFILL AMMO]", COLOR_GOLD, 2251.9438, 2488.7981, 10.9908, 20.0);
|
CreateDynamic3DTextLabel("[REFILL AMMO]", COLOR_GOLD, 2251.9438, 2488.7981, 10.9908, 20.0);
|
||||||
@ -118,14 +118,14 @@ hook OnScriptInit( )
|
|||||||
g_Checkpoints[ CP_HOSPITAL1_LS ] = CreateDynamicCP( 1172.0767, -1323.3257, 15.4029, 1.0, -1, -1, -1, 100.0 );
|
g_Checkpoints[ CP_HOSPITAL1_LS ] = CreateDynamicCP( 1172.0767, -1323.3257, 15.4029, 1.0, -1, -1, -1, 100.0 );
|
||||||
g_Checkpoints[ CP_HOSPITAL2_LS ] = CreateDynamicCP( 2034.0677, -1401.6699, 17.2938, 1.0, -1, -1, -1, 100.0 );
|
g_Checkpoints[ CP_HOSPITAL2_LS ] = CreateDynamicCP( 2034.0677, -1401.6699, 17.2938, 1.0, -1, -1, -1, 100.0 );
|
||||||
g_Checkpoints[ CP_HOSPITAL_FC ] = CreateDynamicCP( -320.2127, 1048.2339, 20.3403, 1.0, -1, -1, -1, 100.0 );
|
g_Checkpoints[ CP_HOSPITAL_FC ] = CreateDynamicCP( -320.2127, 1048.2339, 20.3403, 1.0, -1, -1, -1, 100.0 );
|
||||||
//g_Checkpoints[ CP_DROP_OFF_COP_LS ] = CreateDynamicCP( 1569.0277, -1694.1566, 5.8906, 3.0, 0, -1, -1, 100.0 );
|
g_Checkpoints[ CP_DROP_OFF_COP_LS ] = CreateDynamicCP( 1569.0277, -1694.1566, 5.8906, 3.0, 0, -1, -1, 100.0 );
|
||||||
//g_Checkpoints[ CP_DROP_OFF_FBI_LS ] = CreateDynamicCP( 1516.6716, -1458.9398, 9.5000, 3.0, -1, -1, -1, 100.0 );
|
g_Checkpoints[ CP_DROP_OFF_FBI_LS ] = CreateDynamicCP( 1516.6716, -1458.9398, 9.5000, 3.0, -1, -1, -1, 100.0 );
|
||||||
g_Checkpoints[ CP_FIGHTSTYLE_LS ] = CreateDynamicCP( 772.0868, 12.6397, 1000.6996, 1.0, -1, -1, -1, 25.0 );
|
g_Checkpoints[ CP_FIGHTSTYLE_LS ] = CreateDynamicCP( 772.0868, 12.6397, 1000.6996, 1.0, -1, -1, -1, 25.0 );
|
||||||
g_Checkpoints[ CP_BANK_MENU_LS ] = CreateDynamicCP( 2136.4946, 1226.1787, 1017.1369, 1.0, -1, -1, -1, 25.0 );
|
g_Checkpoints[ CP_BANK_MENU_LS ] = CreateDynamicCP( 2136.4946, 1226.1787, 1017.1369, 1.0, -1, -1, -1, 25.0 );
|
||||||
g_Checkpoints[ CP_REFILL_AMMO_LS ] = CreateDynamicCP( 1579.5439, -1635.5166, 13.5609, 1.0, -1, -1, -1, 20.0 );
|
g_Checkpoints[ CP_REFILL_AMMO_LS ] = CreateDynamicCP( 1579.5439, -1635.5166, 13.5609, 1.0, -1, -1, -1, 20.0 );
|
||||||
CreateDynamic3DTextLabel("[BANK MENU]", COLOR_GOLD, 2136.4946, 1226.1787, 1017.1369, 20.0);
|
CreateDynamic3DTextLabel("[BANK MENU]", COLOR_GOLD, 2136.4946, 1226.1787, 1017.1369, 20.0);
|
||||||
//CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, 1569.0277, -1694.1566, 5.8906, 20.0);
|
CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, 1569.0277, -1694.1566, 5.8906, 20.0);
|
||||||
//CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, 1516.6716, -1458.9398, 9.5000, 20.0);
|
CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, 1516.6716, -1458.9398, 9.5000, 20.0);
|
||||||
CreateDynamic3DTextLabel("[LEARN FIGHT STYLES]", COLOR_GOLD, 772.0868, 12.6397, 1000.6996, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 10);
|
CreateDynamic3DTextLabel("[LEARN FIGHT STYLES]", COLOR_GOLD, 772.0868, 12.6397, 1000.6996, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 10);
|
||||||
CreateDynamic3DTextLabel("[HOSPITAL]", COLOR_GOLD, 1172.0767, -1323.3257, 15.4029, 20.0);
|
CreateDynamic3DTextLabel("[HOSPITAL]", COLOR_GOLD, 1172.0767, -1323.3257, 15.4029, 20.0);
|
||||||
CreateDynamic3DTextLabel("[HOSPITAL]", COLOR_GOLD, 2034.0677, -1401.6699, 17.2938, 20.0);
|
CreateDynamic3DTextLabel("[HOSPITAL]", COLOR_GOLD, 2034.0677, -1401.6699, 17.2938, 20.0);
|
||||||
@ -143,9 +143,9 @@ hook OnScriptInit( )
|
|||||||
CreateDynamic3DTextLabel("[SHOP]", COLOR_GOLD, -29.0409,-184.7446,1003.5469, 20.0);
|
CreateDynamic3DTextLabel("[SHOP]", COLOR_GOLD, -29.0409,-184.7446,1003.5469, 20.0);
|
||||||
CreateDynamic3DTextLabel("[BANK MENU]", COLOR_GOLD, -1405.0657, 831.0966, 984.7126, 20.0);
|
CreateDynamic3DTextLabel("[BANK MENU]", COLOR_GOLD, -1405.0657, 831.0966, 984.7126, 20.0);
|
||||||
CreateDynamic3DTextLabel("[BANK MENU]", COLOR_GOLD, 2156.1299, 1640.2460, 1041.6124, 20.0);
|
CreateDynamic3DTextLabel("[BANK MENU]", COLOR_GOLD, 2156.1299, 1640.2460, 1041.6124, 20.0);
|
||||||
//CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, -1577.0952, 683.9492, 7.2440, 20.0);
|
CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, -1577.0952, 683.9492, 7.2440, 20.0);
|
||||||
//CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, -2446.6785, 522.9684, 30.2548, 20.0);
|
CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, -2446.6785, 522.9684, 30.2548, 20.0);
|
||||||
//CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, -1651.6956, 700.8394, 38.2422, 50.0);
|
CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, -1651.6956, 700.8394, 38.2422, 50.0);
|
||||||
CreateDynamic3DTextLabel("[GUN STORE]", COLOR_GOLD, 296.3782, -38.4512, 1001.5156, 20.0);
|
CreateDynamic3DTextLabel("[GUN STORE]", COLOR_GOLD, 296.3782, -38.4512, 1001.5156, 20.0);
|
||||||
CreateDynamic3DTextLabel("[GUN STORE]", COLOR_GOLD, 295.4524, -80.7487, 1001.5156, 20.0);
|
CreateDynamic3DTextLabel("[GUN STORE]", COLOR_GOLD, 295.4524, -80.7487, 1001.5156, 20.0);
|
||||||
CreateDynamic3DTextLabel("[GUN STORE]", COLOR_GOLD, 312.8432, -166.1419, 999.6010, 20.0);
|
CreateDynamic3DTextLabel("[GUN STORE]", COLOR_GOLD, 312.8432, -166.1419, 999.6010, 20.0);
|
||||||
@ -179,5 +179,6 @@ hook OnPlayerEnterDynamicCP( playerid, checkpointid )
|
|||||||
if ( IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) || IsPlayerInEvent( playerid ) ) {
|
if ( IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) || IsPlayerInEvent( playerid ) ) {
|
||||||
return SendError( playerid, "You can't do anything as you are in an event." ), Y_HOOKS_BREAK_RETURN_1;
|
return SendError( playerid, "You can't do anything as you are in an event." ), Y_HOOKS_BREAK_RETURN_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
#define DIALOG_GANG_COLOR 1027
|
#define DIALOG_GANG_COLOR 1027
|
||||||
#define DIALOG_GANG_COLOR_INPUT 1028
|
#define DIALOG_GANG_COLOR_INPUT 1028
|
||||||
#define DIALOG_RADIO 1029
|
#define DIALOG_RADIO 1029
|
||||||
//#define DIALOG_XPMARKET 1030
|
#define DIALOG_XPMARKET 1030
|
||||||
#define DIALOG_PAINTBALL 1031
|
#define DIALOG_PAINTBALL 1031
|
||||||
#define DIALOG_GPS 1032
|
#define DIALOG_GPS 1032
|
||||||
#define DIALOG_VIP_LOCKER 1033
|
#define DIALOG_VIP_LOCKER 1033
|
||||||
@ -211,6 +211,7 @@
|
|||||||
#define DIALOG_HOUSE_SELL 1201
|
#define DIALOG_HOUSE_SELL 1201
|
||||||
#define DIALOG_BUSINESS_SELL_CONFIRM 1202
|
#define DIALOG_BUSINESS_SELL_CONFIRM 1202
|
||||||
#define DIALOG_NEXT_PAGE_VIP 1204
|
#define DIALOG_NEXT_PAGE_VIP 1204
|
||||||
|
#define DIALOG_XPMARKET_SELL 1205
|
||||||
|
|
||||||
/* ** Hooks ** */
|
/* ** Hooks ** */
|
||||||
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||||
|
@ -343,7 +343,7 @@ stock CreateLoopingAnimation( playerid, animlib[ ], animname[ ], Float:Speed, lo
|
|||||||
else if ( !IsPlayerSpawned( playerid ) ) return SendError( playerid, "You cannot use this command since you're not spawned." );
|
else if ( !IsPlayerSpawned( playerid ) ) return SendError( playerid, "You cannot use this command since you're not spawned." );
|
||||||
// else if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this command since you're jailed." );
|
// else if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this command since you're jailed." );
|
||||||
else if ( IsPlayerTazed( playerid ) ) return SendError( playerid, "You cannot use this command since you're tazed." );
|
else if ( IsPlayerTazed( playerid ) ) return SendError( playerid, "You cannot use this command since you're tazed." );
|
||||||
//else if ( IsPlayerDetained( playerid ) ) return SendError( playerid, "You cannot use this command since you're detained." );
|
else if ( IsPlayerDetained( playerid ) ) return SendError( playerid, "You cannot use this command since you're detained." );
|
||||||
else if ( IsPlayerCuffed( playerid ) ) return SendError( playerid, "You cannot use this command since you're cuffed." );
|
else if ( IsPlayerCuffed( playerid ) ) return SendError( playerid, "You cannot use this command since you're cuffed." );
|
||||||
else if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You cannot use this command since you're tied." );
|
else if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You cannot use this command since you're tied." );
|
||||||
else if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." );
|
else if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." );
|
||||||
|
@ -53,7 +53,7 @@ hook OnPlayerPickUpDynPickup( playerid, pickupid )
|
|||||||
{
|
{
|
||||||
foreach ( new bribeid : BribeCount ) if ( g_bribeData[ bribeid ] [ E_PICKUP ] [ 0 ] == pickupid || g_bribeData[ bribeid ] [ E_PICKUP ] [ 1 ] == pickupid )
|
foreach ( new bribeid : BribeCount ) if ( g_bribeData[ bribeid ] [ E_PICKUP ] [ 0 ] == pickupid || g_bribeData[ bribeid ] [ E_PICKUP ] [ 1 ] == pickupid )
|
||||||
{
|
{
|
||||||
if ( !( g_bribeData[ bribeid ] [ E_DISABLED ] == true || p_WantedLevel[ playerid ] <= 0 || IsPlayerCuffed( playerid ) || GetPlayerState( playerid ) == PLAYER_STATE_SPECTATING ) ) // || IsPlayerDetained( playerid )
|
if ( !( g_bribeData[ bribeid ] [ E_DISABLED ] == true || p_WantedLevel[ playerid ] <= 0 || IsPlayerCuffed( playerid ) || GetPlayerState( playerid ) == PLAYER_STATE_SPECTATING || IsPlayerDetained( playerid ) ) )
|
||||||
{
|
{
|
||||||
new
|
new
|
||||||
iWanted = 2;
|
iWanted = 2;
|
||||||
|
@ -168,7 +168,7 @@ CMD:c4( playerid, params[ ] )
|
|||||||
if ( !IsPlayerJob( playerid, JOB_TERRORIST ) ) return SendError( playerid, "This is restricted to terrorists." );
|
if ( !IsPlayerJob( playerid, JOB_TERRORIST ) ) return SendError( playerid, "This is restricted to terrorists." );
|
||||||
if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this command since you're jailed." );
|
if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this command since you're jailed." );
|
||||||
if ( IsPlayerTazed( playerid ) ) return SendError( playerid, "You cannot use this command since you're tazed." );
|
if ( IsPlayerTazed( playerid ) ) return SendError( playerid, "You cannot use this command since you're tazed." );
|
||||||
//if ( IsPlayerDetained( playerid ) ) return SendError( playerid, "You cannot use this command since you're detained." );
|
if ( IsPlayerDetained( playerid ) ) return SendError( playerid, "You cannot use this command since you're detained." );
|
||||||
if ( IsPlayerCuffed( playerid ) ) return SendError( playerid, "You cannot use this command since you're cuffed." );
|
if ( IsPlayerCuffed( playerid ) ) return SendError( playerid, "You cannot use this command since you're cuffed." );
|
||||||
if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You cannot use this command since you're tied." );
|
if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You cannot use this command since you're tied." );
|
||||||
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." );
|
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." );
|
||||||
|
@ -11,19 +11,4 @@
|
|||||||
#include "irresistible\cnr\features\cop\arrest.pwn"
|
#include "irresistible\cnr\features\cop\arrest.pwn"
|
||||||
#include "irresistible\cnr\features\cop\bail.pwn"
|
#include "irresistible\cnr\features\cop\bail.pwn"
|
||||||
#include "irresistible\cnr\features\cop\ticket.pwn"
|
#include "irresistible\cnr\features\cop\ticket.pwn"
|
||||||
#include "irresistible\cnr\features\cop\emp.pwn"
|
#include "irresistible\cnr\features\cop\emp.pwn"
|
||||||
|
|
||||||
/* ** Hooks ** */
|
|
||||||
/*hook OnPlayerTakeDamage( playerid, issuerid, Float: amount, weaponid, bodypart )
|
|
||||||
{
|
|
||||||
if ( p_Class[ playerid ] == CLASS_POLICE && !IsPlayerNPC( playerid ) )
|
|
||||||
{
|
|
||||||
new Float: x, Float: y, Float: z;
|
|
||||||
|
|
||||||
GetPlayerPos( playerid, x, y, z );
|
|
||||||
|
|
||||||
if ( x >= -1650.0 && x <= -1571.0 && y >= 647.0 && y <= 711.0 )
|
|
||||||
return ShowPlayerHelpDialog( issuerid, 2000, "You cannot damage LEO officers while they are within the Police Department HQ." ), 0;
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}*/
|
|
@ -9,10 +9,6 @@
|
|||||||
#include < YSI\y_hooks >
|
#include < YSI\y_hooks >
|
||||||
|
|
||||||
/* ** Variables ** */
|
/* ** Variables ** */
|
||||||
static stock
|
|
||||||
bool: p_AwaitingBCAttempt [ MAX_PLAYERS char ],
|
|
||||||
p_AwaitingBCAttemptTimer [ MAX_PLAYERS ] = { -1, ... }
|
|
||||||
;
|
|
||||||
|
|
||||||
/* ** Forwards ** */
|
/* ** Forwards ** */
|
||||||
forward OnPlayerArrested( playerid, victimid, totalarrests, totalpeople );
|
forward OnPlayerArrested( playerid, victimid, totalarrests, totalpeople );
|
||||||
@ -20,62 +16,20 @@ forward OnPlayerArrested( playerid, victimid, totalarrests, totalpeople );
|
|||||||
/* ** Hooks ** */
|
/* ** Hooks ** */
|
||||||
hook OnPlayerDisconnect( playerid, reason )
|
hook OnPlayerDisconnect( playerid, reason )
|
||||||
{
|
{
|
||||||
|
|
||||||
p_AwaitingBCAttempt{ playerid } = false;
|
|
||||||
KillTimer( p_AwaitingBCAttemptTimer[ playerid ] );
|
|
||||||
p_AwaitingBCAttemptTimer[ playerid ] = -1;
|
|
||||||
|
|
||||||
// Quit to Avoid - Award Handling
|
// Quit to Avoid - Award Handling
|
||||||
AwardNearestLEO( playerid, 0 );
|
AwardNearestLEO( playerid, 0 );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
hook OnPlayerSpawn( playerid )
|
hook OnPlayerEnterDynamicCP( playerid, checkpointid )
|
||||||
{
|
|
||||||
p_AwaitingBCAttempt{ playerid } = false;
|
|
||||||
KillTimer( p_AwaitingBCAttemptTimer[ playerid ] );
|
|
||||||
p_AwaitingBCAttemptTimer[ playerid ] = -1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined AC_INCLUDED
|
|
||||||
hook OnPlayerDeathEx( playerid, killerid, reason, Float: damage, bodypart )
|
|
||||||
#else
|
|
||||||
hook OnPlayerDeath( playerid, killerid, reason )
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
KillTimer( p_AwaitingBCAttemptTimer[ playerid ] );
|
|
||||||
p_AwaitingBCAttemptTimer[ playerid ] = -1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
|
||||||
{
|
|
||||||
/*if ( PRESSED( KEY_LOOK_BEHIND ) ) // MMB to taze/cuff/ar
|
|
||||||
{
|
|
||||||
if ( p_Class[ playerid ] == CLASS_POLICE && ! IsPlayerSpawnProtected( playerid ) )
|
|
||||||
{
|
|
||||||
new
|
|
||||||
closestid = GetClosestPlayer( playerid );
|
|
||||||
|
|
||||||
if ( closestid != INVALID_PLAYER_ID && p_Class[ closestid ] != CLASS_POLICE && ! ( GetDistanceBetweenPlayers( playerid, closestid ) > 10.0 || !IsPlayerConnected( closestid ) ) ) {
|
|
||||||
if ( GetPlayerWantedLevel( closestid ) > 5 ) {
|
|
||||||
if ( IsPlayerCuffed( closestid ) ) ArrestPlayer( closestid, playerid );
|
|
||||||
else if ( IsPlayerTazed( closestid ) ) CuffPlayer( closestid, playerid );
|
|
||||||
else TazePlayer( closestid, playerid );
|
|
||||||
} else {
|
|
||||||
TicketPlayer( closestid, playerid );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*hook OnPlayerEnterDynamicCP( playerid, checkpointid )
|
|
||||||
{
|
{
|
||||||
// Detain Mechanism
|
// Detain Mechanism
|
||||||
if ( bDropoff )
|
if ( checkpointid == g_Checkpoints[ CP_DROP_OFF_COP ] ||
|
||||||
|
checkpointid == g_Checkpoints[ CP_DROP_OFF_FC ] || checkpointid == g_Checkpoints[ CP_DROP_OFF_DILLIMORE ] ||
|
||||||
|
checkpointid == g_Checkpoints[ CP_DROP_OFF_DIABLO ] || checkpointid == g_Checkpoints[ CP_DROP_OFF_QUBRADOS ] ||
|
||||||
|
checkpointid == g_Checkpoints[ CP_DROP_OFF_COP_LS ] || checkpointid == g_Checkpoints[ CP_DROP_OFF_FBI_LS ] ||
|
||||||
|
checkpointid == g_Checkpoints[ CP_DROP_OFF_FBI_LV ] || checkpointid == g_Checkpoints[ CP_DROP_OFF_COP_LV ] ||
|
||||||
|
checkpointid == g_Checkpoints[ CP_DROP_OFF_FBI ] || checkpointid == g_Checkpoints[ CP_DROP_OFF_HELI ] )
|
||||||
{
|
{
|
||||||
if ( p_Class[ playerid ] != CLASS_POLICE )
|
if ( p_Class[ playerid ] != CLASS_POLICE )
|
||||||
return 1;
|
return 1;
|
||||||
@ -130,42 +84,165 @@ hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
|||||||
else return SendError( playerid, "You need a driver of a vehicle with detained criminals to use this." );
|
else return SendError( playerid, "You need a driver of a vehicle with detained criminals to use this." );
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
/* ** Commands ** */
|
/* ** Commands ** */
|
||||||
CMD:taze( playerid, params[ ] )
|
CMD:taze( playerid, params[ ] )
|
||||||
{
|
{
|
||||||
new
|
new victimid;
|
||||||
pID = GetClosestPlayer( playerid );
|
if ( p_Class[ playerid ] != CLASS_POLICE ) return SendError( playerid, "This is restricted to police only." );
|
||||||
|
else if ( sscanf( params, "u", victimid ) ) return SendUsage( playerid, "/taze [PLAYER_ID]" );
|
||||||
return TazePlayer( pID, playerid );
|
else if ( victimid == playerid ) return SendError( playerid, "You cannot taze yourself." );
|
||||||
|
else if ( !IsPlayerConnected( victimid ) ) return SendError( playerid, "There are no players around to taze." );
|
||||||
|
else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." );
|
||||||
|
else if ( IsPlayerInBattleRoyale( playerid ) ) return SendError( playerid, "You cannot use this command while in Battle Royale." );
|
||||||
|
else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 5.0 && IsPlayerConnected( victimid ) )
|
||||||
|
{
|
||||||
|
if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player is in your team." );
|
||||||
|
if ( p_WantedLevel[ victimid ] == 0 ) return SendError( playerid, "This player is innocent!" );
|
||||||
|
if ( IsPlayerInAnyVehicle( victimid ) ) return SendError( playerid, "This player is in a vehicle " );
|
||||||
|
if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You cannot do this while you're inside a vehicle." );
|
||||||
|
if ( IsPlayerTazed( victimid ) ) return SendError( playerid, "This player is already tazed." );
|
||||||
|
if ( IsPlayerDead( victimid ) ) return SendError( playerid, "This player is dead." );
|
||||||
|
if ( IsPlayerCuffed( victimid ) ) return SendError( playerid, "This player is already cuffed." );
|
||||||
|
if ( IsPlayerDetained( victimid ) ) return SendError( playerid, "This player is already detained." );
|
||||||
|
if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." );
|
||||||
|
if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." );
|
||||||
|
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You are kidnapped, you cannot do this." );
|
||||||
|
if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You are tied, you cannot do this." );
|
||||||
|
if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." );
|
||||||
|
if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." );
|
||||||
|
if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this command while in jail." );
|
||||||
|
if ( IsPlayerTied( victimid ) ) return SendError( playerid, "Tazing a tied player is pretty useless, though you can use /untie for a harder job!" );
|
||||||
|
if ( IsPlayerLoadingObjects( victimid ) ) return SendError( playerid, "This player is in a object-loading state." );
|
||||||
|
if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an event." );
|
||||||
|
if ( GetPlayerState( playerid ) == PLAYER_STATE_WASTED ) return SendError( playerid, "You cannot use this command since you are dead." );
|
||||||
|
if ( p_TazingImmunity[ victimid ] > g_iTime ) return SendError( playerid, "You must wait %d seconds before tazing this player.", p_TazingImmunity[ victimid ] - g_iTime );
|
||||||
|
if ( random( 101 ) < 90 )
|
||||||
|
{
|
||||||
|
GameTextForPlayer( victimid, "~n~~r~TAZED!", 2000, 4 );
|
||||||
|
GameTextForPlayer( playerid, "~n~~y~~h~/cuff", 2000, 4 );
|
||||||
|
SendClientMessageFormatted( victimid, -1, ""COL_RED"[TAZED]{FFFFFF} You have been tazed by %s(%d) for 5 seconds!", ReturnPlayerName( playerid ), playerid );
|
||||||
|
SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[TAZED]{FFFFFF} You have tazed %s(%d) for 5 seconds!", ReturnPlayerName( victimid ), victimid );
|
||||||
|
SetTimerEx( "Untaze", 5000, false, "dd", victimid, 6 );
|
||||||
|
TogglePlayerControllable( victimid, 0 );
|
||||||
|
ApplyAnimation( victimid, "CRACK", "crckdeth2", 5.0, 1, 1, 1, 0, 0 );
|
||||||
|
p_Tazed{ victimid } = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SendClientMessageFormatted( playerid, -1, ""COL_RED"[TAZE FAIL]{FFFFFF} You have failed to taze %s(%d)!", ReturnPlayerName( victimid ), victimid );
|
||||||
|
SendClientMessageFormatted( victimid, -1, ""COL_GREEN"[TAZE FAIL]{FFFFFF} %s(%d) has failed to taze you!", ReturnPlayerName( playerid ), playerid );
|
||||||
|
}
|
||||||
|
p_TazingImmunity[ victimid ] = g_iTime + 6;
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
return SendError( playerid, "There are no players around to taze." );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CMD:ar( playerid, params[ ] ) return cmd_arrest(playerid, params);
|
CMD:ar( playerid, params[ ] ) return cmd_arrest(playerid, params);
|
||||||
CMD:arrest( playerid, params[ ] )
|
CMD:arrest( playerid, params[ ] )
|
||||||
{
|
{
|
||||||
new
|
new victimid;
|
||||||
victimid = GetClosestPlayer( playerid );
|
if ( p_Class[ playerid ] != CLASS_POLICE ) return SendError( playerid, "This is restricted to police only." );
|
||||||
|
else if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this command since you're jailed." );
|
||||||
return ArrestPlayer( victimid, playerid );
|
else if ( sscanf( params, "u", victimid ) ) return SendUsage( playerid, "/ar(rest) [PLAYER_ID]" );
|
||||||
|
else if ( victimid == playerid ) return SendError( playerid, "You cannot arrest yourself." );
|
||||||
|
else if ( !IsPlayerConnected( victimid ) ) return SendError( playerid, "This player is not connected." );
|
||||||
|
else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." );
|
||||||
|
else if ( IsPlayerInBattleRoyale( playerid ) ) return SendError( playerid, "You cannot use this command while in Battle Royale." );
|
||||||
|
else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 4.0 && IsPlayerConnected( victimid ) )
|
||||||
|
{
|
||||||
|
if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player is in your team." );
|
||||||
|
if ( p_WantedLevel[ victimid ] == 0 ) return SendError( playerid, "This player is innocent!" );
|
||||||
|
if ( !IsPlayerCuffed( victimid ) ) return SendError( playerid, "This player is not cuffed." );
|
||||||
|
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You are kidnapped, you cannot do this." );
|
||||||
|
if ( IsPlayerDead( victimid ) ) return SendError( playerid, "This player is dead." );
|
||||||
|
if ( IsPlayerDetained( victimid ) ) return SendError( playerid, "This player is detained, you cannot arrest them." );
|
||||||
|
if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You are tied, you cannot do this." );
|
||||||
|
if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." );
|
||||||
|
if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You cannot arrest this person inside a vehicle." );
|
||||||
|
if ( IsPlayerInAnyVehicle( victimid ) ) return SendError( playerid, "You cannot arrest a person that is inside a vehicle." );
|
||||||
|
if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." );
|
||||||
|
if ( GetPlayerState( playerid ) == PLAYER_STATE_WASTED ) return SendError( playerid, "You cannot use this command since you are dead." );
|
||||||
|
new totalCash = ( p_WantedLevel[ victimid ] < MAX_WANTED_LVL ? p_WantedLevel[ victimid ] : MAX_WANTED_LVL ) * ( 300 );
|
||||||
|
new totalSeconds = p_WantedLevel[ victimid ] * ( JAIL_SECONDS_MULTIPLIER );
|
||||||
|
GivePlayerScore( playerid, 2 );
|
||||||
|
GivePlayerExperience( playerid, E_POLICE );
|
||||||
|
GivePlayerCash( playerid, totalCash );
|
||||||
|
StockMarket_UpdateEarnings( E_STOCK_GOVERNMENT, totalCash, 0.1 );
|
||||||
|
if ( totalCash > 20000 ) printf("[police arrest] %s -> %s - %s", ReturnPlayerName( playerid ), ReturnPlayerName( victimid ), cash_format( totalCash ) ); // 8hska7082bmahu
|
||||||
|
SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[ACHIEVE]{FFFFFF} You have earned "COL_GOLD"%s{FFFFFF} dollars and 2 score for arresting %s(%d)!", cash_format( totalCash ), ReturnPlayerName( victimid ), victimid );
|
||||||
|
GameTextForPlayer( victimid, "~r~Busted!", 4000, 0 );
|
||||||
|
CallLocalFunction( "OnPlayerArrested", "dddd", playerid, victimid, p_Arrests[ playerid ], 1 );
|
||||||
|
Untaze( victimid, 6 );
|
||||||
|
GivePlayerSeasonalXP( victimid, -20.0 );
|
||||||
|
SendGlobalMessage( -1, ""COL_GOLD"[JAIL]{FFFFFF} %s(%d) has sent %s(%d) to jail for %d seconds!", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( victimid ), victimid, totalSeconds );
|
||||||
|
JailPlayer( victimid, totalSeconds );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else return SendError( playerid, "There are no players around to arrest." );
|
||||||
}
|
}
|
||||||
|
|
||||||
CMD:cuff( playerid, params[ ] )
|
CMD:cuff( playerid, params[ ] )
|
||||||
{
|
{
|
||||||
new
|
new victimid;
|
||||||
victimid = GetClosestPlayer( playerid );
|
if ( p_Class[ playerid ] != CLASS_POLICE ) return SendError( playerid, "This is restricted to police only." );
|
||||||
|
else if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this command since you're jailed." );
|
||||||
|
else if ( sscanf( params, "u", victimid ) ) return SendUsage( playerid, "/cuff [PLAYER_ID]" );
|
||||||
|
else if ( victimid == playerid ) return SendError( playerid, "You cannot cuff yourself." );
|
||||||
|
else if ( !IsPlayerConnected( victimid ) || IsPlayerNPC( victimid ) ) return SendError( playerid, "This player is not connected." );
|
||||||
|
else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." );
|
||||||
|
else if ( IsPlayerInBattleRoyale( playerid ) ) return SendError( playerid, "You cannot use this command while in Battle Royale." );
|
||||||
|
else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 4.0 && IsPlayerConnected( victimid ) )
|
||||||
|
{
|
||||||
|
if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player is in your team." );
|
||||||
|
if ( p_WantedLevel[ victimid ] == 0 ) return SendError( playerid, "This player is innocent!" );
|
||||||
|
if ( p_WantedLevel[ victimid ] < 6 ) return SendError( playerid, "This person isn't worth cuffing, ticket them." );
|
||||||
|
if ( IsPlayerInAnyVehicle( victimid ) ) return SendError( playerid, "This player is in a vehicle " );
|
||||||
|
if ( IsPlayerDead( victimid ) ) return SendError( playerid, "This player is dead." );
|
||||||
|
if ( IsPlayerDetained( victimid ) ) return SendError( playerid, "This player is already detained." );
|
||||||
|
if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You cannot do this while you're inside a vehicle." );
|
||||||
|
if ( IsPlayerCuffed( victimid ) ) return SendError( playerid, "This player is already cuffed." );
|
||||||
|
if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." );
|
||||||
|
if ( !IsPlayerTazed( victimid ) ) return SendError( playerid, "You must taze this player before cuffing them." );
|
||||||
|
if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." );
|
||||||
|
if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." );
|
||||||
|
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You are kidnapped, you cannot do this." );
|
||||||
|
if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You are tied, you cannot do this." );
|
||||||
|
if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." );
|
||||||
|
if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." );
|
||||||
|
if ( IsPlayerLoadingObjects( victimid ) ) return SendError( playerid, "This player is in a object-loading state." );
|
||||||
|
if ( GetPlayerState( playerid ) == PLAYER_STATE_WASTED ) return SendError( playerid, "You cannot use this command since you are dead." );
|
||||||
|
if ( !IsPlayerSpawned( victimid ) ) return SendError( playerid, "The player must be spawned." );
|
||||||
|
|
||||||
return CuffPlayer( victimid, playerid );
|
GameTextForPlayer( victimid, "~n~~r~CUFFED!", 2000, 4 );
|
||||||
|
GameTextForPlayer( playerid, "~n~~y~~h~/arrest", 2000, 4 );
|
||||||
|
|
||||||
|
SendClientMessageFormatted( victimid, -1, ""COL_RED"[CUFFED]{FFFFFF} You have been cuffed by %s(%d)!", ReturnPlayerName( playerid ), playerid );
|
||||||
|
SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[CUFFED]{FFFFFF} You have cuffed %s(%d)!", ReturnPlayerName( victimid ), victimid );
|
||||||
|
|
||||||
|
p_Cuffed{ victimid } = true;
|
||||||
|
p_QuitToAvoidTimestamp[ victimid ] = g_iTime + 3;
|
||||||
|
SetPlayerAttachedObject( victimid, 2, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000 );
|
||||||
|
SetPlayerSpecialAction( victimid, SPECIAL_ACTION_CUFFED );
|
||||||
|
|
||||||
|
KillTimer( p_CuffAbuseTimer[ victimid ] );
|
||||||
|
p_CuffAbuseTimer[ victimid ] = SetTimerEx( "Uncuff", ( 60 * 1000 ), false, "d", victimid );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else return SendError( playerid, "There are no players around to cuff." );
|
||||||
}
|
}
|
||||||
|
|
||||||
CMD:uncuff( playerid, params[ ] )
|
CMD:uncuff( playerid, params[ ] )
|
||||||
{
|
{
|
||||||
new victimid = GetClosestPlayer( playerid );
|
new victimid;
|
||||||
//if ( p_Class[ playerid ] != CLASS_POLICE ) return SendError( playerid, "This is restricted to police only." );
|
|
||||||
if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." );
|
if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." );
|
||||||
|
else if ( sscanf( params, "u", victimid ) ) return SendUsage( playerid, "/uncuff [PLAYER_ID]" );
|
||||||
|
else if ( victimid == playerid ) return SendError( playerid, "You cannot uncuff yourself." );
|
||||||
else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 4.0 && IsPlayerConnected( victimid ) )
|
else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 4.0 && IsPlayerConnected( victimid ) )
|
||||||
{
|
{
|
||||||
//if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player you're close to is in your team." );
|
|
||||||
if ( p_WantedLevel[ victimid ] == 0 ) return SendError( playerid, "This player is innocent!" );
|
if ( p_WantedLevel[ victimid ] == 0 ) return SendError( playerid, "This player is innocent!" );
|
||||||
if ( !IsPlayerCuffed( victimid ) ) return SendError( playerid, "This player is not cuffed." );
|
if ( !IsPlayerCuffed( victimid ) ) return SendError( playerid, "This player is not cuffed." );
|
||||||
if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You cannot do this while you're inside a vehicle." );
|
if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You cannot do this while you're inside a vehicle." );
|
||||||
@ -174,16 +251,16 @@ CMD:uncuff( playerid, params[ ] )
|
|||||||
if ( IsPlayerTazed( playerid ) ) return SendError( playerid, "You cannot use this command since you're tazed." );
|
if ( IsPlayerTazed( playerid ) ) return SendError( playerid, "You cannot use this command since you're tazed." );
|
||||||
if ( IsPlayerCuffed( playerid ) ) return SendError( playerid, "You cannot use this command since you're cuffed." );
|
if ( IsPlayerCuffed( playerid ) ) return SendError( playerid, "You cannot use this command since you're cuffed." );
|
||||||
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." );
|
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." );
|
||||||
//if ( IsPlayerDetained( playerid ) ) return SendError( playerid, "You cannot use this command since you're detained." );
|
if ( IsPlayerDetained( playerid ) ) return SendError( playerid, "You cannot use this command since you're detained." );
|
||||||
SendClientMessageFormatted( victimid, -1, ""COL_RED"[UNCUFFED]{FFFFFF} You have been uncuffed by %s(%d)!", ReturnPlayerName( playerid ), playerid );
|
SendClientMessageFormatted( victimid, -1, ""COL_RED"[UNCUFFED]{FFFFFF} You have been uncuffed by %s(%d)!", ReturnPlayerName( playerid ), playerid );
|
||||||
SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[UNCUFFED]{FFFFFF} You have uncuffed %s(%d)!", ReturnPlayerName( victimid ), victimid );
|
SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[UNCUFFED]{FFFFFF} You have uncuffed %s(%d)!", ReturnPlayerName( victimid ), victimid );
|
||||||
ClearAnimations( victimid );
|
ClearAnimations( victimid );
|
||||||
TogglePlayerControllable( victimid, 1 );
|
TogglePlayerControllable( victimid, 1 );
|
||||||
p_Cuffed{ victimid } = false;
|
p_Cuffed{ victimid } = false;
|
||||||
//p_Detained{ victimid } = false;
|
p_Detained{ victimid } = false;
|
||||||
//Delete3DTextLabel( p_DetainedLabel[ victimid ] );
|
Delete3DTextLabel( p_DetainedLabel[ victimid ] );
|
||||||
//p_DetainedLabel[ victimid ] = Text3D: INVALID_3DTEXT_ID;
|
p_DetainedLabel[ victimid ] = Text3D: INVALID_3DTEXT_ID;
|
||||||
//p_DetainedBy[ victimid ] = INVALID_PLAYER_ID;
|
p_DetainedBy[ victimid ] = INVALID_PLAYER_ID;
|
||||||
KillTimer( p_CuffAbuseTimer[ victimid ] );
|
KillTimer( p_CuffAbuseTimer[ victimid ] );
|
||||||
SetPlayerSpecialAction( victimid, SPECIAL_ACTION_NONE );
|
SetPlayerSpecialAction( victimid, SPECIAL_ACTION_NONE );
|
||||||
RemovePlayerAttachedObject( victimid, 2 );
|
RemovePlayerAttachedObject( victimid, 2 );
|
||||||
@ -192,12 +269,14 @@ CMD:uncuff( playerid, params[ ] )
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*CMD:detain( playerid, params[ ] )
|
CMD:detain( playerid, params[ ] )
|
||||||
{
|
{
|
||||||
new victimid = GetClosestPlayer( playerid );
|
new victimid;
|
||||||
if ( p_Class[ playerid ] != CLASS_POLICE ) return SendError( playerid, "This is restricted to police only." );
|
if ( p_Class[ playerid ] != CLASS_POLICE ) return SendError( playerid, "This is restricted to police only." );
|
||||||
else if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this command since you're jailed." );
|
else if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this command since you're jailed." );
|
||||||
else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." );
|
else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." );
|
||||||
|
else if ( sscanf( params, "u", victimid ) ) return SendUsage( playerid, "/detain [PLAYER_ID]" );
|
||||||
|
else if ( victimid == playerid ) return SendError( playerid, "You cannot detain yourself." );
|
||||||
else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 4.0 && IsPlayerConnected( victimid ) )
|
else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 4.0 && IsPlayerConnected( victimid ) )
|
||||||
{
|
{
|
||||||
if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player you're close to is in your team." );
|
if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player you're close to is in your team." );
|
||||||
@ -225,106 +304,9 @@ CMD:uncuff( playerid, params[ ] )
|
|||||||
}
|
}
|
||||||
else return SendError( playerid, "There are no players around to detain." );
|
else return SendError( playerid, "There are no players around to detain." );
|
||||||
return 1;
|
return 1;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
/* ** Functions ** */
|
/* ** Functions ** */
|
||||||
stock TazePlayer( victimid, playerid )
|
|
||||||
{
|
|
||||||
if ( p_Class[ playerid ] != CLASS_POLICE ) return SendError( playerid, "This is restricted to police only." );
|
|
||||||
//else if ( sscanf( params, "u", victimid ) ) return SendUsage( playerid, "/taze [PLAYER_ID]" );
|
|
||||||
//else if ( victimid == playerid ) return SendError( playerid, "You cannot taze yourself." );
|
|
||||||
else if ( !IsPlayerConnected( victimid ) ) return SendError( playerid, "There are no players around to taze." );
|
|
||||||
else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." );
|
|
||||||
else if ( IsPlayerInBattleRoyale( playerid ) ) return SendError( playerid, "You cannot use this command while in Battle Royale." );
|
|
||||||
else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 5.0 && IsPlayerConnected( victimid ) )
|
|
||||||
{
|
|
||||||
if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player is in your team." );
|
|
||||||
if ( p_WantedLevel[ victimid ] == 0 ) return SendError( playerid, "This player is innocent!" );
|
|
||||||
if ( IsPlayerInAnyVehicle( victimid ) ) return SendError( playerid, "This player is in a vehicle " );
|
|
||||||
if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You cannot do this while you're inside a vehicle." );
|
|
||||||
if ( IsPlayerTazed( victimid ) ) return SendError( playerid, "This player is already tazed." );
|
|
||||||
if ( IsPlayerDead( victimid ) ) return SendError( playerid, "This player is dead." );
|
|
||||||
//if ( IsPlayerCuffed( victimid ) ) return SendError( playerid, "This player is already cuffed." );
|
|
||||||
//if ( IsPlayerDetained( victimid ) ) return SendError( playerid, "This player is already detained." );
|
|
||||||
if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." );
|
|
||||||
if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." );
|
|
||||||
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You are kidnapped, you cannot do this." );
|
|
||||||
if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You are tied, you cannot do this." );
|
|
||||||
if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." );
|
|
||||||
if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." );
|
|
||||||
if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this command while in jail." );
|
|
||||||
if ( IsPlayerTied( victimid ) ) return SendError( playerid, "Tazing a tied player is pretty useless, though you can use /untie for a harder job!" );
|
|
||||||
if ( IsPlayerLoadingObjects( victimid ) ) return SendError( playerid, "This player is in a object-loading state." );
|
|
||||||
if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an event." );
|
|
||||||
if ( GetPlayerState( playerid ) == PLAYER_STATE_WASTED ) return SendError( playerid, "You cannot use this command since you are dead." );
|
|
||||||
if ( p_TazingImmunity[ victimid ] > g_iTime ) return SendError( playerid, "You must wait %d seconds before tazing this player.", p_TazingImmunity[ victimid ] - g_iTime );
|
|
||||||
if ( random( 101 ) < 90 )
|
|
||||||
{
|
|
||||||
GameTextForPlayer( victimid, "~n~~r~TAZED!", 2000, 4 );
|
|
||||||
GameTextForPlayer( playerid, "~n~~y~~h~/cuff", 2000, 4 );
|
|
||||||
SendClientMessageFormatted( victimid, -1, ""COL_RED"[TAZED]{FFFFFF} You have been tazed by %s(%d) for 3 seconds!", ReturnPlayerName( playerid ), playerid );
|
|
||||||
SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[TAZED]{FFFFFF} You have tazed %s(%d) for 3 seconds!", ReturnPlayerName( victimid ), victimid );
|
|
||||||
SetTimerEx( "Untaze", 2000, false, "dd", victimid, 6 ); // previous 3000
|
|
||||||
TogglePlayerControllable( victimid, 0 );
|
|
||||||
ApplyAnimation( victimid, "CRACK", "crckdeth2", 5.0, 1, 1, 1, 0, 0 );
|
|
||||||
p_Tazed{ victimid } = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendClientMessageFormatted( playerid, -1, ""COL_RED"[TAZE FAIL]{FFFFFF} You have failed to taze %s(%d)!", ReturnPlayerName( victimid ), victimid );
|
|
||||||
SendClientMessageFormatted( victimid, -1, ""COL_GREEN"[TAZE FAIL]{FFFFFF} %s(%d) has failed to taze you!", ReturnPlayerName( playerid ), playerid );
|
|
||||||
}
|
|
||||||
p_TazingImmunity[ victimid ] = g_iTime + 6;
|
|
||||||
return 1;
|
|
||||||
} else {
|
|
||||||
return SendError( playerid, "There are no players around to taze." );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stock ArrestPlayer( victimid, playerid )
|
|
||||||
{
|
|
||||||
if ( p_Class[ playerid ] != CLASS_POLICE ) return SendError( playerid, "This is restricted to police only." );
|
|
||||||
else if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this command since you're jailed." );
|
|
||||||
//else if ( GetPlayerScore( playerid ) > 200 ) return SendError( playerid, "This feature is no longer available to you. Please use /detain." );
|
|
||||||
// else if ( sscanf( params, "u", victimid ) ) return SendUsage( playerid, "/ar(rest) [PLAYER_ID]" );
|
|
||||||
// else if ( victimid == playerid ) return SendError( playerid, "You cannot arrest yourself." );
|
|
||||||
else if ( !IsPlayerConnected( victimid ) ) return SendError( playerid, "This player is not connected." );
|
|
||||||
else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." );
|
|
||||||
else if ( IsPlayerInBattleRoyale( playerid ) ) return SendError( playerid, "You cannot use this command while in Battle Royale." );
|
|
||||||
else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 4.0 && IsPlayerConnected( victimid ) )
|
|
||||||
{
|
|
||||||
if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player is in your team." );
|
|
||||||
if ( p_WantedLevel[ victimid ] == 0 ) return SendError( playerid, "This player is innocent!" );
|
|
||||||
if ( !IsPlayerCuffed( victimid ) ) return SendError( playerid, "This player is not cuffed." );
|
|
||||||
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You are kidnapped, you cannot do this." );
|
|
||||||
if ( IsPlayerDead( victimid ) ) return SendError( playerid, "This player is dead." );
|
|
||||||
//if ( IsPlayerDetained( victimid ) ) return SendError( playerid, "This player is detained, you cannot arrest them." );
|
|
||||||
if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You are tied, you cannot do this." );
|
|
||||||
if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." );
|
|
||||||
if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You cannot arrest this person inside a vehicle." );
|
|
||||||
if ( IsPlayerInAnyVehicle( victimid ) ) return SendError( playerid, "You cannot arrest a person that is inside a vehicle." );
|
|
||||||
if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." );
|
|
||||||
if ( GetPlayerState( playerid ) == PLAYER_STATE_WASTED ) return SendError( playerid, "You cannot use this command since you are dead." );
|
|
||||||
new totalCash = ( p_WantedLevel[ victimid ] < MAX_WANTED_LVL ? p_WantedLevel[ victimid ] : MAX_WANTED_LVL ) * ( 300 );
|
|
||||||
new totalSeconds = p_WantedLevel[ victimid ] * ( JAIL_SECONDS_MULTIPLIER );
|
|
||||||
GivePlayerScore( playerid, 2 );
|
|
||||||
GivePlayerExperience( playerid, E_POLICE );
|
|
||||||
GivePlayerCash( playerid, totalCash );
|
|
||||||
StockMarket_UpdateEarnings( E_STOCK_GOVERNMENT, totalCash, 0.1 );
|
|
||||||
if ( totalCash > 20000 ) printf("[police arrest] %s -> %s - %s", ReturnPlayerName( playerid ), ReturnPlayerName( victimid ), cash_format( totalCash ) ); // 8hska7082bmahu
|
|
||||||
SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[ACHIEVE]{FFFFFF} You have earned "COL_GOLD"%s{FFFFFF} dollars and 2 score for arresting %s(%d)!", cash_format( totalCash ), ReturnPlayerName( victimid ), victimid );
|
|
||||||
GameTextForPlayer( victimid, "~r~Busted!", 4000, 0 );
|
|
||||||
CallLocalFunction( "OnPlayerArrested", "dddd", playerid, victimid, p_Arrests[ playerid ], 1 );
|
|
||||||
Untaze( victimid, 6 );
|
|
||||||
GivePlayerSeasonalXP( victimid, -20.0 );
|
|
||||||
SendGlobalMessage( -1, ""COL_GOLD"[JAIL]{FFFFFF} %s(%d) has sent %s(%d) to jail for %d seconds!", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( victimid ), victimid, totalSeconds );
|
|
||||||
JailPlayer( victimid, totalSeconds );
|
|
||||||
KillTimer( p_AwaitingBCAttemptTimer[ victimid ] );
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else return SendError( playerid, "There are no players around to arrest." );
|
|
||||||
}
|
|
||||||
|
|
||||||
stock AwardArrest( victimid, playerid )
|
stock AwardArrest( victimid, playerid )
|
||||||
{
|
{
|
||||||
p_QuitToAvoidTimestamp[ playerid ] = 0;
|
p_QuitToAvoidTimestamp[ playerid ] = 0;
|
||||||
@ -343,67 +325,6 @@ stock AwardArrest( victimid, playerid )
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
stock CuffPlayer( victimid, playerid )
|
|
||||||
{
|
|
||||||
if ( p_Class[ playerid ] != CLASS_POLICE ) return SendError( playerid, "This is restricted to police only." );
|
|
||||||
else if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this command since you're jailed." );
|
|
||||||
//else if ( sscanf( params, "u", victimid ) ) return SendUsage( playerid, "/cuff [PLAYER_ID]" );
|
|
||||||
//else if ( victimid == playerid ) return SendError( playerid, "You cannot cuff yourself." );
|
|
||||||
else if ( !IsPlayerConnected( victimid ) || IsPlayerNPC( victimid ) ) return SendError( playerid, "This player is not connected." );
|
|
||||||
else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." );
|
|
||||||
else if ( IsPlayerInBattleRoyale( playerid ) ) return SendError( playerid, "You cannot use this command while in Battle Royale." );
|
|
||||||
else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 4.0 && IsPlayerConnected( victimid ) )
|
|
||||||
{
|
|
||||||
if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player is in your team." );
|
|
||||||
if ( p_WantedLevel[ victimid ] == 0 ) return SendError( playerid, "This player is innocent!" );
|
|
||||||
if ( p_WantedLevel[ victimid ] < 6 ) return SendError( playerid, "This person isn't worth cuffing, ticket them." );
|
|
||||||
if ( IsPlayerInAnyVehicle( victimid ) ) return SendError( playerid, "This player is in a vehicle " );
|
|
||||||
if ( IsPlayerDead( victimid ) ) return SendError( playerid, "This player is dead." );
|
|
||||||
//if ( IsPlayerDetained( victimid ) ) return SendError( playerid, "This player is already detained." );
|
|
||||||
if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You cannot do this while you're inside a vehicle." );
|
|
||||||
if ( IsPlayerCuffed( victimid ) ) return SendError( playerid, "This player is already cuffed." );
|
|
||||||
if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." );
|
|
||||||
if ( !IsPlayerTazed( victimid ) ) return SendError( playerid, "You must taze this player before cuffing them." );
|
|
||||||
if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." );
|
|
||||||
if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." );
|
|
||||||
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You are kidnapped, you cannot do this." );
|
|
||||||
if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You are tied, you cannot do this." );
|
|
||||||
if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." );
|
|
||||||
if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." );
|
|
||||||
if ( IsPlayerLoadingObjects( victimid ) ) return SendError( playerid, "This player is in a object-loading state." );
|
|
||||||
if ( GetPlayerState( playerid ) == PLAYER_STATE_WASTED ) return SendError( playerid, "You cannot use this command since you are dead." );
|
|
||||||
if ( !IsPlayerSpawned( victimid ) ) return SendError( playerid, "The player must be spawned." );
|
|
||||||
|
|
||||||
if ( !BreakPlayerCuffs( victimid ) )
|
|
||||||
{
|
|
||||||
GameTextForPlayer( victimid, "~n~~r~CUFFED!", 2000, 4 );
|
|
||||||
GameTextForPlayer( playerid, "~n~~y~~h~/arrest", 2000, 4 );
|
|
||||||
|
|
||||||
SendClientMessageFormatted( victimid, -1, ""COL_RED"[CUFFED]{FFFFFF} You have been cuffed by %s(%d)!", ReturnPlayerName( playerid ), playerid );
|
|
||||||
SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[CUFFED]{FFFFFF} You have cuffed %s(%d)!", ReturnPlayerName( victimid ), victimid );
|
|
||||||
|
|
||||||
p_Cuffed{ victimid } = true;
|
|
||||||
p_QuitToAvoidTimestamp[ victimid ] = g_iTime + 3;
|
|
||||||
SetPlayerAttachedObject( victimid, 2, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000 );
|
|
||||||
SetPlayerSpecialAction( victimid, SPECIAL_ACTION_CUFFED );
|
|
||||||
|
|
||||||
KillTimer( p_CuffAbuseTimer[ victimid ] );
|
|
||||||
p_CuffAbuseTimer[ victimid ] = SetTimerEx( "Uncuff", ( 60 * 1000 ), false, "d", victimid );
|
|
||||||
|
|
||||||
p_AwaitingBCAttempt{ victimid } = true;
|
|
||||||
|
|
||||||
KillTimer( p_AwaitingBCAttemptTimer[ victimid ] );
|
|
||||||
p_AwaitingBCAttemptTimer[ victimid ] = SetTimerEx( "BreakPlayerCuffsAttempt", 3000, false, "d", victimid );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[CUFFED]{FFFFFF} %s(%d) just broke their cuffs off!", ReturnPlayerName( victimid ), victimid );
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else return SendError( playerid, "There are no players around to cuff." );
|
|
||||||
}
|
|
||||||
|
|
||||||
function Untaze( playerid, taze_immunity_seconds )
|
function Untaze( playerid, taze_immunity_seconds )
|
||||||
{
|
{
|
||||||
if ( !IsPlayerConnected( playerid ) || !p_Tazed{ playerid } ) // || p_Detained{ playerid } == true
|
if ( !IsPlayerConnected( playerid ) || !p_Tazed{ playerid } ) // || p_Detained{ playerid } == true
|
||||||
@ -434,10 +355,10 @@ function Uncuff( playerid )
|
|||||||
ClearAnimations( playerid );
|
ClearAnimations( playerid );
|
||||||
}
|
}
|
||||||
p_Cuffed{ playerid } = false;
|
p_Cuffed{ playerid } = false;
|
||||||
//p_Detained{ playerid } = false;
|
p_Detained{ playerid } = false;
|
||||||
//Delete3DTextLabel( p_DetainedLabel[ playerid ] );
|
Delete3DTextLabel( p_DetainedLabel[ playerid ] );
|
||||||
//p_DetainedLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
p_DetainedLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||||
//p_DetainedBy[ playerid ] = INVALID_PLAYER_ID;
|
p_DetainedBy[ playerid ] = INVALID_PLAYER_ID;
|
||||||
p_BulletInvulnerbility[ playerid ] = g_iTime + 5;
|
p_BulletInvulnerbility[ playerid ] = g_iTime + 5;
|
||||||
|
|
||||||
SendGlobalMessage( -1, ""COL_GREY"[SERVER]{FFFFFF} %s(%d) has been uncuffed and undetained by the anti-abuse system.", ReturnPlayerName( playerid ), playerid );
|
SendGlobalMessage( -1, ""COL_GREY"[SERVER]{FFFFFF} %s(%d) has been uncuffed and undetained by the anti-abuse system.", ReturnPlayerName( playerid ), playerid );
|
||||||
@ -455,8 +376,6 @@ stock BreakPlayerCuffs( playerid )
|
|||||||
}
|
}
|
||||||
else p_BobbyPins[ playerid ] --;
|
else p_BobbyPins[ playerid ] --;
|
||||||
|
|
||||||
if ( p_AwaitingBCAttempt{ playerid } ) p_AwaitingBCAttempt{ playerid } = false;
|
|
||||||
|
|
||||||
new probability = 75; // success rate probability
|
new probability = 75; // success rate probability
|
||||||
|
|
||||||
if ( random( 101 ) <= probability )
|
if ( random( 101 ) <= probability )
|
||||||
@ -488,9 +407,6 @@ stock BreakPlayerCuffs( playerid )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
SendServerMessage( playerid, "You have snapped your bobby pin and failed to break out of your cuffs. Re-attempting in 3 seconds." );
|
SendServerMessage( playerid, "You have snapped your bobby pin and failed to break out of your cuffs. Re-attempting in 3 seconds." );
|
||||||
p_AwaitingBCAttempt{ playerid } = true;
|
|
||||||
KillTimer( p_AwaitingBCAttemptTimer[ playerid ] );
|
|
||||||
p_AwaitingBCAttemptTimer[ playerid ] = SetTimerEx( "BreakPlayerCuffsAttempt", 3000, false, "d", playerid );
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ hook OnPlayerUpdateEx( playerid )
|
|||||||
|
|
||||||
if ( IsPlayerInDynamicArea( playerid, g_AlcatrazArea ) )
|
if ( IsPlayerInDynamicArea( playerid, g_AlcatrazArea ) )
|
||||||
{
|
{
|
||||||
if ( !IsPlayerJailed( playerid ) && p_Class[ playerid ] != CLASS_POLICE ) // && !IsPlayerDetained( playerid )
|
if ( !IsPlayerJailed( playerid ) && p_Class[ playerid ] != CLASS_POLICE && !IsPlayerDetained( playerid ) )
|
||||||
{
|
{
|
||||||
if ( GetPVarInt( playerid, "AlcatrazWantedCD" ) < g_iTime )
|
if ( GetPVarInt( playerid, "AlcatrazWantedCD" ) < g_iTime )
|
||||||
{
|
{
|
||||||
|
@ -116,7 +116,7 @@ stock TicketPlayer( pID, playerid )
|
|||||||
else if ( p_WantedLevel[ pID ] > 5 ) return SendError( playerid, "Wanted suspects cannot be issued a ticket." );
|
else if ( p_WantedLevel[ pID ] > 5 ) return SendError( playerid, "Wanted suspects cannot be issued a ticket." );
|
||||||
else if ( p_WantedLevel[ pID ] < 1 ) return SendError( playerid, "Innocent players cannot be issued a ticket." );
|
else if ( p_WantedLevel[ pID ] < 1 ) return SendError( playerid, "Innocent players cannot be issued a ticket." );
|
||||||
else if ( p_Jailed{ playerid } ) return SendError( playerid, "You cannot use this command in jail." );
|
else if ( p_Jailed{ playerid } ) return SendError( playerid, "You cannot use this command in jail." );
|
||||||
//else if ( IsPlayerDetained( pID ) ) return SendError( playerid, "You cannot use this command on a detained player." );
|
else if ( IsPlayerDetained( pID ) ) return SendError( playerid, "You cannot use this command on a detained player." );
|
||||||
else if ( g_iTime < p_TicketTimestamp[ pID ] ) return SendError( playerid, "This player has been ticketed recently, he will be fined in %d seconds.", g_iTime - p_TicketTimestamp[ pID ] );
|
else if ( g_iTime < p_TicketTimestamp[ pID ] ) return SendError( playerid, "This player has been ticketed recently, he will be fined in %d seconds.", g_iTime - p_TicketTimestamp[ pID ] );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -47,23 +47,22 @@ enum e_GANG_ZONE_DATA
|
|||||||
static const
|
static const
|
||||||
g_gangzoneData[ ] [ e_GANG_ZONE_DATA ] =
|
g_gangzoneData[ ] [ e_GANG_ZONE_DATA ] =
|
||||||
{
|
{
|
||||||
{ -1725.0, 1301.5, -1538.0, 1437.5, CITY_SF },
|
{ -2076.0, 1036.5, -1873.0, 1088.5, CITY_SF },
|
||||||
{ -2868.0, 1012.5, -2768.0, 1217.5, CITY_SF },
|
{ -2014.0, 937.5, -1873.0, 1036.5, CITY_SF },
|
||||||
{ -2497.0, 932.5, -2392.0, 1069.5, CITY_SF },
|
{ -2014.0, 829.5, -1886.0, 937.5, CITY_SF },
|
||||||
{ -2054.0, 1084.5, -1892.0, 1171.5, CITY_SF },
|
{ -1873.0, 937.5, -1787.0, 1112.5, CITY_SF },
|
||||||
{ -1569.0, 822.5, -1418.0, 1019.5, CITY_SF },
|
{ -2014.0, 719.5, -1886.0, 829.5, CITY_SF },
|
||||||
{ -2088.0, 573.5, -2008.0, 728.5, CITY_SF },
|
{ -1886.0, 829.5, -1788.0, 937.5, CITY_SF },
|
||||||
{ -2523.0, 571.5, -2390.0, 705.5, CITY_SF },
|
{ -1886.0, 719.5, -1788.0, 829.5, CITY_SF },
|
||||||
{ -2766.0, 324.5, -2651.0, 426.5, CITY_SF },
|
{ -1788.0, 829.5, -1723.0, 937.5, CITY_SF },
|
||||||
{ -2386.0, 70.5, -2273.0, 227.5, CITY_SF },
|
{ -1723.0, 829.5, -1642.0, 937.5, CITY_SF },
|
||||||
{ -2139.0, 115.5, -2013.0, 311.5, CITY_SF },
|
{ -1642.0, 829.5, -1564.0, 937.5, CITY_SF },
|
||||||
{ -2001.0, 69.5, -1911.0, 219.5, CITY_SF },
|
{ -1564.0, 828.5, -1421.0, 1015.5, CITY_SF },
|
||||||
{ -2096.0, -279.5, -2011.0, -111.5, CITY_SF },
|
{ -1667.0, 720.5, -1563.0, 829.5, CITY_SF },
|
||||||
{ -2523.0, -321.5, -2264.0, -215.5, CITY_SF },
|
{ -1788.0, 719.5, -1667.0, 829.5, CITY_SF },
|
||||||
{ -2153.0, -515.5, -1960.0, -374.5, CITY_SF },
|
{ -1787.0, 935.5, -1704.0, 1037.5, CITY_SF },
|
||||||
{ -2600.0, -68.5, -2504.0, 34.5, CITY_SF },
|
{ -1787.0, 1037.5, -1704.0, 1112.5, CITY_SF },
|
||||||
{ -2245.0, 571.5, -2146.0, 727.5, CITY_SF },
|
{ -2130.0, 816.5, -2014.0, 1036.5, CITY_SF }
|
||||||
{ -1755.0, -80.5, -1658.0, 27.5, CITY_SF }
|
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -67,28 +67,24 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
|||||||
{
|
{
|
||||||
switch( listitem )
|
switch( listitem )
|
||||||
{
|
{
|
||||||
case 0: ShowPlayerDialog( playerid, DIALOG_PERKS_P, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Game Perks", ""COL_WHITE"Item Name\t"COL_WHITE"Total Level Req.\t"COL_WHITE"Cost ($)\nHide From Radar\t"COL_GOLD"75\t"COL_GREEN"$25,000\nUnlimited Ammunition\t"COL_GOLD"50\t"COL_GREEN"$9,900", "Select", "Back" );
|
case 0: ShowPlayerDialog( playerid, DIALOG_PERKS_P, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Deathmatch Perks", ""COL_WHITE"Item Name\t"COL_WHITE"Cost (XP)\nHide From Radar\t"COL_GREEN"250 XP\nUnlimited Ammunition\t"COL_GREEN"100 XP", "Select", "Back" );
|
||||||
case 1: ShowPlayerDialog( playerid, DIALOG_PERKS_V, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Game Perks", ""COL_WHITE"Item Name\t"COL_WHITE"Total Level Req.\t"COL_WHITE"Cost ($)\nFix & Flip vehicle\t"COL_GOLD"75\t"COL_GREEN"$9,900\nRepair Vehicle\t"COL_GOLD"75\t"COL_GREEN"$7,500\nAdd NOS\t"COL_GOLD"50\t"COL_GREEN"$3,000\nFlip vehicle\t"COL_GOLD"40\t"COL_GREEN"$2,500", "Select", "Back" );
|
case 1: ShowPlayerDialog( playerid, DIALOG_PERKS_V, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Robbery Perks", ""COL_WHITE"Item Name\t"COL_WHITE"Cost (XP)\nFix & Flip vehicle\t"COL_GREEN"180 XP\nRepair Vehicle\t"COL_GREEN"120 XP\nAdd NOS\t"COL_GREEN"80 XP\nFlip vehicle\t"COL_GREEN"50 XP", "Select", "Back" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( dialogid == DIALOG_PERKS_P )
|
else if ( dialogid == DIALOG_PERKS_P )
|
||||||
{
|
{
|
||||||
if ( !response )
|
if ( !response )
|
||||||
return ShowPlayerDialog( playerid, DIALOG_PERKS, DIALOG_STYLE_LIST, "{FFFFFF}Game Perks", "Player Perks\nVehicle Perks", "Select", "Cancel" );
|
return ShowPlayerDialog( playerid, DIALOG_PERKS, DIALOG_STYLE_LIST, "{FFFFFF}Game Perks", "Deathmatch Perks\nRobbery Perks", "Select", "Cancel" );
|
||||||
|
|
||||||
new
|
new
|
||||||
total_level = GetPlayerTotalLevel( playerid );
|
Float: total_dm_xp = GetPlayerExperience( playerid, E_DEATHMATCH );
|
||||||
|
|
||||||
switch( listitem )
|
switch( listitem )
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
if ( total_level < 75 ) {
|
if ( total_dm_xp < 250 ) {
|
||||||
return SendError( playerid, "Your total level must be at least 75 to use this (/level)." );
|
return SendError( playerid, "You need at least 250 Deathmatch XP for this item." );
|
||||||
}
|
|
||||||
|
|
||||||
if ( GetPlayerCash( playerid ) < 25000 ) {
|
|
||||||
return SendError( playerid, "You do not have enough money for this item ($25,000)." );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( GetPlayerClass( playerid ) != CLASS_CIVILIAN ) {
|
if ( GetPlayerClass( playerid ) != CLASS_CIVILIAN ) {
|
||||||
@ -98,9 +94,9 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
|||||||
p_OffRadar{ playerid } = true;
|
p_OffRadar{ playerid } = true;
|
||||||
p_OffRadarTimestamp[ playerid ] = GetServerTime( ) + 180;
|
p_OffRadarTimestamp[ playerid ] = GetServerTime( ) + 180;
|
||||||
|
|
||||||
GivePlayerCash( playerid, -25000 );
|
GivePlayerExperience( playerid, E_DEATHMATCH, -250, .with_dilation = false );
|
||||||
|
|
||||||
SendServerMessage( playerid, "You have hidden yourself from the radar (3 minutes) for $25,000." );
|
SendServerMessage( playerid, "You have hidden yourself from the radar (3 minutes) for 250 Deathmatch XP." );
|
||||||
ShowPlayerHelpDialog( playerid, 3000, "~g~~h~Hide from radar ~w~will be deactivate in 3 minutes." );
|
ShowPlayerHelpDialog( playerid, 3000, "~g~~h~Hide from radar ~w~will be deactivate in 3 minutes." );
|
||||||
|
|
||||||
SetPlayerColor( playerid, setAlpha( GetPlayerColor( playerid ), 0x00 ) );
|
SetPlayerColor( playerid, setAlpha( GetPlayerColor( playerid ), 0x00 ) );
|
||||||
@ -109,12 +105,8 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
|||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
if ( total_level < 50 ) {
|
if ( total_dm_xp < 100 ) {
|
||||||
return SendError( playerid, "Your total level must be at least 50 to use this (/level)." );
|
return SendError( playerid, "You need at least 100 Deathmatch XP for this item." );
|
||||||
}
|
|
||||||
|
|
||||||
if ( GetPlayerCash( playerid ) < 9900 ) {
|
|
||||||
return SendError( playerid, "You do not have enough money for this item ($9,900)." );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( new i = 0; i < MAX_WEAPONS; i++ )
|
for ( new i = 0; i < MAX_WEAPONS; i++ )
|
||||||
@ -125,8 +117,9 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GivePlayerCash( playerid, -9900 );
|
GivePlayerExperience( playerid, E_DEATHMATCH, -100, .with_dilation = false );
|
||||||
SendServerMessage( playerid, "You have bought unlimited ammunition for $9,900." );
|
|
||||||
|
SendServerMessage( playerid, "You have bought unlimited ammunition for 100 Deathmatch XP." );
|
||||||
SetPlayerArmedWeapon( playerid, 0 );
|
SetPlayerArmedWeapon( playerid, 0 );
|
||||||
Beep( playerid );
|
Beep( playerid );
|
||||||
}
|
}
|
||||||
@ -135,78 +128,62 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
|||||||
else if ( dialogid == DIALOG_PERKS_V )
|
else if ( dialogid == DIALOG_PERKS_V )
|
||||||
{
|
{
|
||||||
if ( !response )
|
if ( !response )
|
||||||
return ShowPlayerDialog( playerid, DIALOG_PERKS, DIALOG_STYLE_LIST, "{FFFFFF}Game Perks", "Player Perks\nVehicle Perks", "Select", "Cancel" );
|
return ShowPlayerDialog( playerid, DIALOG_PERKS, DIALOG_STYLE_LIST, "{FFFFFF}Game Perks", "Deathmatch Perks\nRobbery Perks", "Select", "Cancel" );
|
||||||
|
|
||||||
if ( !IsPlayerInAnyVehicle( playerid ) || GetPlayerState( playerid ) != PLAYER_STATE_DRIVER )
|
if ( !IsPlayerInAnyVehicle( playerid ) || GetPlayerState( playerid ) != PLAYER_STATE_DRIVER )
|
||||||
return SendError( playerid, "You are not in any vehicle as a driver." );
|
return SendError( playerid, "You are not in any vehicle as a driver." );
|
||||||
|
|
||||||
new
|
new
|
||||||
total_level = GetPlayerTotalLevel( playerid );
|
Float: total_robbery_xp = GetPlayerExperience( playerid, E_ROBBERY );
|
||||||
|
|
||||||
switch( listitem )
|
switch( listitem )
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
if ( total_level < 75 ) {
|
if ( total_robbery_xp < 180 ) {
|
||||||
return SendError( playerid, "Your total level must be at least 75 to use this (/level)." );
|
return SendError( playerid, "You need at least 180 Robbery XP for this item." );
|
||||||
}
|
|
||||||
|
|
||||||
if ( GetPlayerCash( playerid ) < 9900 ) {
|
|
||||||
return SendError( playerid, "You do not have enough money for this item ($9,900)." );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
new Float: vZ, vehicleid = GetPlayerVehicleID( playerid );
|
new Float: vZ, vehicleid = GetPlayerVehicleID( playerid );
|
||||||
GetVehicleZAngle( vehicleid, vZ ), SetVehicleZAngle( vehicleid, vZ );
|
GetVehicleZAngle( vehicleid, vZ ), SetVehicleZAngle( vehicleid, vZ );
|
||||||
RepairVehicle( vehicleid );
|
RepairVehicle( vehicleid );
|
||||||
GivePlayerCash( playerid, -9900 );
|
GivePlayerExperience( playerid, E_ROBBERY, -180, .with_dilation = false );
|
||||||
SendServerMessage( playerid, "You have fixed and flipped your vehicle for $9,900." );
|
SendServerMessage( playerid, "You have fixed and flipped your vehicle for 180 Robbery XP." );
|
||||||
PlayerPlaySound( playerid, 1133, 0.0, 0.0, 5.0 );
|
PlayerPlaySound( playerid, 1133, 0.0, 0.0, 5.0 );
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
if ( total_level < 75 ) {
|
if ( total_robbery_xp < 120 ) {
|
||||||
return SendError( playerid, "Your total level must be at least 75 to use this (/level)." );
|
return SendError( playerid, "You need at least 120 Robbery XP for this item." );
|
||||||
}
|
|
||||||
|
|
||||||
if ( GetPlayerCash( playerid ) < 7500 ) {
|
|
||||||
return SendError( playerid, "You do not have enough money for this item ($7,500)." );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
new vehicleid = GetPlayerVehicleID( playerid );
|
new vehicleid = GetPlayerVehicleID( playerid );
|
||||||
PlayerPlaySound( playerid, 1133, 0.0, 0.0, 5.0 );
|
PlayerPlaySound( playerid, 1133, 0.0, 0.0, 5.0 );
|
||||||
RepairVehicle( vehicleid );
|
RepairVehicle( vehicleid );
|
||||||
GivePlayerCash( playerid, -7500 );
|
GivePlayerExperience( playerid, E_ROBBERY, -120, .with_dilation = false );
|
||||||
SendServerMessage( playerid, "You have repaired your car for $7,500." );
|
SendServerMessage( playerid, "You have repaired your car for 120 Robbery XP." );
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
if ( total_level < 50 ) {
|
if ( total_robbery_xp < 80 ) {
|
||||||
return SendError( playerid, "Your total level must be at least 50 to use this (/level)." );
|
return SendError( playerid, "You need at least 80 Robbery XP for this item." );
|
||||||
}
|
|
||||||
|
|
||||||
if ( GetPlayerCash( playerid ) < 3000 ) {
|
|
||||||
return SendError( playerid, "You do not have enough money for this item ($3,000)." );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AddVehicleComponent( GetPlayerVehicleID( playerid ), 1010 );
|
AddVehicleComponent( GetPlayerVehicleID( playerid ), 1010 );
|
||||||
GivePlayerCash( playerid, -3000 );
|
GivePlayerExperience( playerid, E_ROBBERY, -80, .with_dilation = false );
|
||||||
SendServerMessage( playerid, "You have installed nitro on your car for $3,000." );
|
SendServerMessage( playerid, "You have repaired your car for 80 Robbery XP." );
|
||||||
PlayerPlaySound( playerid, 1133, 0.0, 0.0, 5.0 );
|
PlayerPlaySound( playerid, 1133, 0.0, 0.0, 5.0 );
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
if ( total_level < 40 ) {
|
if ( total_robbery_xp < 50 ) {
|
||||||
return SendError( playerid, "Your total level must be at least 40 to use this (/level)." );
|
return SendError( playerid, "You need at least 50 Robbery XP for this item." );
|
||||||
}
|
|
||||||
|
|
||||||
if ( GetPlayerCash( playerid ) < 2500 ) {
|
|
||||||
return SendError( playerid, "You do not have enough money for this item ($2,500)." );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
new Float: vZ, vehicleid = GetPlayerVehicleID( playerid );
|
new Float: vZ, vehicleid = GetPlayerVehicleID( playerid );
|
||||||
GetVehicleZAngle( vehicleid, vZ ), SetVehicleZAngle( vehicleid, vZ );
|
GetVehicleZAngle( vehicleid, vZ ), SetVehicleZAngle( vehicleid, vZ );
|
||||||
GivePlayerCash( playerid, -2500 );
|
GivePlayerExperience( playerid, E_ROBBERY, -50, .with_dilation = false );
|
||||||
SendServerMessage( playerid, "You have flipped your vehicle for $2,500." );
|
SendServerMessage( playerid, "You have repaired your car for 50 Robbery XP." );
|
||||||
PlayerPlaySound( playerid, 1133, 0.0, 0.0, 5.0 );
|
PlayerPlaySound( playerid, 1133, 0.0, 0.0, 5.0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -219,11 +196,11 @@ CMD:perks( playerid, params[ ] )
|
|||||||
{
|
{
|
||||||
if ( IsPlayerInEvent( playerid ) || IsPlayerInBattleRoyale( playerid ) )
|
if ( IsPlayerInEvent( playerid ) || IsPlayerInBattleRoyale( playerid ) )
|
||||||
return SendError( playerid, "You cannot use this command since you're in an event." );
|
return SendError( playerid, "You cannot use this command since you're in an event." );
|
||||||
|
|
||||||
if ( IsPlayerInArmyVehicle( playerid ) )
|
if ( IsPlayerInArmyVehicle( playerid ) )
|
||||||
return SendError( playerid, "You cannot use this command while in an army vehicle." );
|
return SendError( playerid, "You cannot use this command while in an army vehicle." );
|
||||||
|
|
||||||
return ShowPlayerDialog( playerid, DIALOG_PERKS, DIALOG_STYLE_LIST, "{FFFFFF}Game Perks", "Player Perks\nVehicle Perks", "Select", "Cancel" );
|
return ShowPlayerDialog( playerid, DIALOG_PERKS, DIALOG_STYLE_LIST, "{FFFFFF}Game Perks", "Deathmatch Perks\nRobbery Perks", "Select", "Cancel" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ** Functions ** */
|
/* ** Functions ** */
|
||||||
|
@ -34,7 +34,7 @@ enum E_LEVELS {
|
|||||||
enum E_LEVEL_DATA {
|
enum E_LEVEL_DATA {
|
||||||
E_NAME[ 16 ], E_COLOUR,
|
E_NAME[ 16 ], E_COLOUR,
|
||||||
|
|
||||||
Float: E_MAX_UNITS, Float: E_XP_DILATION
|
Float: E_MAX_UNITS, Float: E_XP_DILATION, Float: E_SELL_VALUE
|
||||||
};
|
};
|
||||||
|
|
||||||
enum E_RANK_DATA
|
enum E_RANK_DATA
|
||||||
@ -49,10 +49,10 @@ static const
|
|||||||
static const
|
static const
|
||||||
g_levelData [ ] [ E_LEVEL_DATA ] =
|
g_levelData [ ] [ E_LEVEL_DATA ] =
|
||||||
{
|
{
|
||||||
// Level Name Bar Color Level 100 Req. XP Dilation (just to confuse user)
|
// Level Name Bar Color Level 100 Req. XP Dilation Sell Value
|
||||||
{ "Police", 0x3E7EFFFF, 7500.0, 20.0 }, // 7.5k arrests
|
{ "Police", 0x3E7EFFFF, 7500.0, 20.0, 10.0 }, // 7.5k arrests
|
||||||
{ "Robbery", 0xF83245FF, 30000.0, 15.0 }, // 30K robberies
|
{ "Robbery", 0xF83245FF, 30000.0, 15.0, 10.0 }, // 30K robberies
|
||||||
{ "Deathmatch", 0xFF9233FF, 75000.0, 10.0 } // 75K kills
|
{ "Deathmatch", 0xFF9233FF, 75000.0, 10.0, 5.0 } // 75K kills
|
||||||
/*
|
/*
|
||||||
{ "Fireman", 10000.0, 9.0 }, // 10k fires
|
{ "Fireman", 10000.0, 9.0 }, // 10k fires
|
||||||
{ "Hitman", 1500.0, 4.5 }, // 1.5k contracts
|
{ "Hitman", 1500.0, 4.5 }, // 1.5k contracts
|
||||||
@ -106,6 +106,41 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
|||||||
if ( dialogid == DIALOG_VIEW_LEVEL && response ) {
|
if ( dialogid == DIALOG_VIEW_LEVEL && response ) {
|
||||||
return cmd_level( playerid, sprintf( "%d", GetPVarInt( playerid, "experience_watchingid" ) ) ), 1;
|
return cmd_level( playerid, sprintf( "%d", GetPVarInt( playerid, "experience_watchingid" ) ) ), 1;
|
||||||
}
|
}
|
||||||
|
else if ( dialogid == DIALOG_XPMARKET && response )
|
||||||
|
{
|
||||||
|
return ShowPlayerSellXPDialog( playerid, listitem );
|
||||||
|
}
|
||||||
|
else if ( dialogid == DIALOG_XPMARKET_SELL )
|
||||||
|
{
|
||||||
|
if ( ! response ) {
|
||||||
|
return cmd_xpmarket( playerid, "" );
|
||||||
|
}
|
||||||
|
|
||||||
|
new level = GetPVarInt( playerid, "selling_xp_level" );
|
||||||
|
new total_xp = floatround( g_playerExperience[ playerid ] [ E_LEVELS: level ], floatround_floor );
|
||||||
|
new xp_amount = strval( inputtext );
|
||||||
|
|
||||||
|
if ( ! ( 0 < xp_amount < 10000000 ) )
|
||||||
|
{
|
||||||
|
SendError( playerid, "You have specified an invalid amount of %s XP.", g_levelData[ level ] [ E_NAME ] );
|
||||||
|
return ShowPlayerSellXPDialog( playerid, level );
|
||||||
|
}
|
||||||
|
else if ( xp_amount > total_xp )
|
||||||
|
{
|
||||||
|
SendError( playerid, "You do not have this much %s XP.", g_levelData[ level ] [ E_NAME ] );
|
||||||
|
return ShowPlayerSellXPDialog( playerid, level );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
new
|
||||||
|
credit = floatround( float( xp_amount ) * g_levelData[ level ] [ E_SELL_VALUE ], floatround_floor );
|
||||||
|
|
||||||
|
GivePlayerCash( playerid, credit );
|
||||||
|
GivePlayerExperience( playerid, E_LEVELS: level, -xp_amount, .with_dilation = false );
|
||||||
|
SendServerMessage( playerid, "You have sold %s %s XP for "COL_GOLD"%s"COL_WHITE".", g_levelData[ level ] [ E_NAME ], number_format( xp_amount ), cash_format( credit ) );
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,7 +240,7 @@ CMD:level( playerid, params[ ] )
|
|||||||
new
|
new
|
||||||
player_total_lvl = 0;
|
player_total_lvl = 0;
|
||||||
|
|
||||||
szLargeString = ""COL_GREY"Skill\t"COL_GREY"Current Level\t"COL_GREY"XP Till Next Level\n";
|
szLargeString = ""COL_GREY"Skill\t"COL_GREY"Current Level\t"COL_GREY"XP Till Next Level\t"COL_GREY"Total XP\n";
|
||||||
|
|
||||||
for ( new level_id; level_id < sizeof( g_levelData ); level_id ++ )
|
for ( new level_id; level_id < sizeof( g_levelData ); level_id ++ )
|
||||||
{
|
{
|
||||||
@ -214,7 +249,7 @@ CMD:level( playerid, params[ ] )
|
|||||||
new Float: next_lvl_xp = ( g_levelData[ level_id ] [ E_MAX_UNITS ] * g_levelData[ level_id ] [ E_XP_DILATION ] ) / ( EXP_MAX_PLAYER_LEVEL * EXP_MAX_PLAYER_LEVEL ) * ( next_lvl * next_lvl );
|
new Float: next_lvl_xp = ( g_levelData[ level_id ] [ E_MAX_UNITS ] * g_levelData[ level_id ] [ E_XP_DILATION ] ) / ( EXP_MAX_PLAYER_LEVEL * EXP_MAX_PLAYER_LEVEL ) * ( next_lvl * next_lvl );
|
||||||
|
|
||||||
player_total_lvl += floatround( current_rank, floatround_floor );
|
player_total_lvl += floatround( current_rank, floatround_floor );
|
||||||
format( szLargeString, sizeof( szLargeString ), "%s%s Level\t%s%0.0f / %0.0f\t"COL_PURPLE"%0.0f XP\n", szLargeString, g_levelData[ level_id ] [ E_NAME ], current_rank >= 100.0 ? ( COL_GREEN ) : ( COL_GREY ), current_rank, EXP_MAX_PLAYER_LEVEL, next_lvl_xp - g_playerExperience[ watchingid ] [ E_LEVELS: level_id ] );
|
format( szLargeString, sizeof( szLargeString ), "%s%s Level\t%s%0.0f / %0.0f\t"COL_PURPLE"%0.0f XP\t"COL_GREY"%s\n", szLargeString, g_levelData[ level_id ] [ E_NAME ], current_rank >= 100.0 ? ( COL_GREEN ) : ( COL_GREY ), current_rank, EXP_MAX_PLAYER_LEVEL, next_lvl_xp - g_playerExperience[ watchingid ] [ E_LEVELS: level_id ], number_format( g_playerExperience[ playerid ] [ E_LEVELS: level_id ], .decimals = 0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
SetPVarInt( playerid, "experience_watchingid", watchingid );
|
SetPVarInt( playerid, "experience_watchingid", watchingid );
|
||||||
@ -237,6 +272,19 @@ CMD:rank( playerid, params[ ] )
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CMD:xpmarket( playerid, params[ ] )
|
||||||
|
{
|
||||||
|
// header
|
||||||
|
szBigString = ""COL_GREY"Skill\t"COL_GREY"Total XP\t"COL_GREY"Value ($)\n";
|
||||||
|
|
||||||
|
// level with user xp
|
||||||
|
for ( new level_id; level_id < sizeof( g_levelData ); level_id ++ ) {
|
||||||
|
new value = floatround( g_playerExperience[ playerid ] [ E_LEVELS: level_id ] * g_levelData[ level_id ] [ E_SELL_VALUE ] );
|
||||||
|
format( szBigString, sizeof( szBigString ), "%s%s Level\t"COL_PURPLE"%s XP\t"COL_GREEN"%s\n", szBigString, g_levelData[ level_id ] [ E_NAME ], number_format( g_playerExperience[ playerid ] [ E_LEVELS: level_id ], .decimals = 0 ), cash_format( value ) );
|
||||||
|
}
|
||||||
|
return ShowPlayerDialog( playerid, DIALOG_XPMARKET, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}XP Market", szBigString, "Select", "Close" ), 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* ** SQL Threads ** */
|
/* ** SQL Threads ** */
|
||||||
thread Experience_OnLoad( playerid )
|
thread Experience_OnLoad( playerid )
|
||||||
{
|
{
|
||||||
@ -279,13 +327,18 @@ thread currentUserRank( playerid, watchingid )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ** Functions ** */
|
/* ** Functions ** */
|
||||||
|
stock Float: GetPlayerExperience( playerid, E_LEVELS: level )
|
||||||
|
{
|
||||||
|
return g_playerExperience[ playerid ] [ level ];
|
||||||
|
}
|
||||||
|
|
||||||
stock GivePlayerExperience( playerid, E_LEVELS: level, Float: default_xp = 1.0, bool: with_dilation = true )
|
stock GivePlayerExperience( playerid, E_LEVELS: level, Float: default_xp = 1.0, bool: with_dilation = true )
|
||||||
{
|
{
|
||||||
if ( ! IsPlayerLoggedIn( playerid ) || ! ( 0 <= _: level < sizeof( g_levelData ) ) )
|
if ( ! IsPlayerLoggedIn( playerid ) || ! ( 0 <= _: level < sizeof( g_levelData ) ) )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// dilation is there so people see +3 when they arrest ... could trigger dopamine levels instead of constantly +1 lol
|
// dilation is there so people see +3 when they arrest ... could trigger dopamine levels instead of constantly +1 lol
|
||||||
new Float: xp_earned = default_xp * ( IsDoubleXP( ) ? 2.0 : 1.0 ) * ( with_dilation ? ( g_levelData[ _: level ] [ E_XP_DILATION ] ) : 1.0 );
|
new Float: xp_earned = default_xp * ( IsDoubleXP( ) && default_xp > 0.0 ? 2.0 : 1.0 ) * ( with_dilation ? ( g_levelData[ _: level ] [ E_XP_DILATION ] ) : 1.0 );
|
||||||
|
|
||||||
// when a player ranks up
|
// when a player ranks up
|
||||||
new next_lvl = floatround( GetPlayerLevel( playerid, level ), floatround_floor ) + 1;
|
new next_lvl = floatround( GetPlayerLevel( playerid, level ), floatround_floor ) + 1;
|
||||||
@ -310,7 +363,7 @@ stock GivePlayerExperience( playerid, E_LEVELS: level, Float: default_xp = 1.0,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// seasonal
|
// seasonal
|
||||||
GivePlayerSeasonalXP( playerid, xp_earned );
|
if ( default_xp ) GivePlayerSeasonalXP( playerid, xp_earned );
|
||||||
|
|
||||||
// alert user
|
// alert user
|
||||||
KillTimer( p_playerExpHideTimer[ playerid ] );
|
KillTimer( p_playerExpHideTimer[ playerid ] );
|
||||||
@ -318,7 +371,7 @@ stock GivePlayerExperience( playerid, E_LEVELS: level, Float: default_xp = 1.0,
|
|||||||
PlayerTextDrawShow( playerid, p_playerExpTitle[ playerid ] );
|
PlayerTextDrawShow( playerid, p_playerExpTitle[ playerid ] );
|
||||||
SetPlayerProgressBarColour( playerid, p_playerExpProgress[ playerid ], g_levelData[ _: level ] [ E_COLOUR ] );
|
SetPlayerProgressBarColour( playerid, p_playerExpProgress[ playerid ], g_levelData[ _: level ] [ E_COLOUR ] );
|
||||||
ShowPlayerProgressBar( playerid, p_playerExpProgress[ playerid ] );
|
ShowPlayerProgressBar( playerid, p_playerExpProgress[ playerid ] );
|
||||||
PlayerTextDrawSetString( playerid, p_playerExpAwardTD[ playerid ], sprintf( "+%0.0f XP", xp_earned ) );
|
PlayerTextDrawSetString( playerid, p_playerExpAwardTD[ playerid ], sprintf( "%s%0.0f XP", xp_earned < 0.0 ? ( "~r~" ) : ( "+" ), xp_earned ) );
|
||||||
PlayerTextDrawShow( playerid, p_playerExpAwardTD[ playerid ] );
|
PlayerTextDrawShow( playerid, p_playerExpAwardTD[ playerid ] );
|
||||||
p_playerExpHideTimer[ playerid ] = SetTimerEx( "Experience_HideIncrementTD", 3500, false, "d", playerid );
|
p_playerExpHideTimer[ playerid ] = SetTimerEx( "Experience_HideIncrementTD", 3500, false, "d", playerid );
|
||||||
|
|
||||||
@ -443,6 +496,25 @@ stock GivePlayerSeasonalXP( playerid, Float: default_xp )
|
|||||||
mysql_single_query( sprintf( "UPDATE `USERS` SET `RANK` = %f WHERE `ID` = %d", current_season_xp, GetPlayerAccountID( playerid ) ) );
|
mysql_single_query( sprintf( "UPDATE `USERS` SET `RANK` = %f WHERE `ID` = %d", current_season_xp, GetPlayerAccountID( playerid ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stock ShowPlayerSellXPDialog( playerid, level )
|
||||||
|
{
|
||||||
|
new value = floatround( g_playerExperience[ playerid ] [ E_LEVELS: level ] * g_levelData[ level ] [ E_SELL_VALUE ] );
|
||||||
|
|
||||||
|
format( szBigString, sizeof( szBigString ),
|
||||||
|
""COL_WHITE"Please input how much %s XP you want to sell.\n\n"\
|
||||||
|
"Exchange Rate is "COL_GOLD"1 XP"COL_WHITE" for %s\n\n"\
|
||||||
|
"You have %s XP that can be sold for %s\n\n"\
|
||||||
|
""COL_RED"Warning: this action will result in a reduced level.",
|
||||||
|
g_levelData[ level ] [ E_NAME ],
|
||||||
|
cash_format( g_levelData[ level ] [ E_SELL_VALUE ], .decimals = 0 ),
|
||||||
|
number_format( g_playerExperience[ playerid ] [ E_LEVELS: level ], .decimals = 0 ),
|
||||||
|
cash_format( value, .decimals = 0 )
|
||||||
|
);
|
||||||
|
|
||||||
|
SetPVarInt( playerid, "selling_xp_level", level );
|
||||||
|
return ShowPlayerDialog( playerid, DIALOG_XPMARKET_SELL, DIALOG_STYLE_INPUT, "{FFFFFF}XP Market", szBigString, "Sell", "Cancel");
|
||||||
|
}
|
||||||
|
|
||||||
/* ** Macros ** */
|
/* ** Macros ** */
|
||||||
stock GetSeasonalRankName( rankid, dest[ ], dest_size = sizeof( dest ) ) {
|
stock GetSeasonalRankName( rankid, dest[ ], dest_size = sizeof( dest ) ) {
|
||||||
return format( dest, dest_size, "%s", g_seasonalRanks[ rankid ] [ E_NAME ] );
|
return format( dest, dest_size, "%s", g_seasonalRanks[ rankid ] [ E_NAME ] );
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#define IsPlayerGettingBlowed(%0) (p_GettingBlowjob{%0})
|
#define IsPlayerGettingBlowed(%0) (p_GettingBlowjob{%0})
|
||||||
#define IsPlayerLoadingObjects(%0) (p_pausedToLoad{%0})
|
#define IsPlayerLoadingObjects(%0) (p_pausedToLoad{%0})
|
||||||
#define IsPlayerAdminJailed(%0) (p_AdminJailed{%0} && p_JailTime[%0])
|
#define IsPlayerAdminJailed(%0) (p_AdminJailed{%0} && p_JailTime[%0])
|
||||||
|
#define IsPlayerDetained(%0) (p_Detained{%0})
|
||||||
|
|
||||||
/* ** Variables ** */
|
/* ** Variables ** */
|
||||||
new
|
new
|
||||||
@ -146,9 +147,9 @@ new
|
|||||||
p_HouseCrackingPW [ MAX_PLAYERS ],
|
p_HouseCrackingPW [ MAX_PLAYERS ],
|
||||||
p_Burglaries [ MAX_PLAYERS ],
|
p_Burglaries [ MAX_PLAYERS ],
|
||||||
p_ArmyBanned [ MAX_PLAYERS char ],
|
p_ArmyBanned [ MAX_PLAYERS char ],
|
||||||
//Text3D: p_DetainedLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
Text3D: p_DetainedLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||||
//bool: p_Detained [ MAX_PLAYERS char ],
|
bool: p_Detained [ MAX_PLAYERS char ],
|
||||||
//p_DetainedBy [ MAX_PLAYERS ],
|
p_DetainedBy [ MAX_PLAYERS ],
|
||||||
p_BailTimestamp [ MAX_PLAYERS ],
|
p_BailTimestamp [ MAX_PLAYERS ],
|
||||||
p_AFKTime [ MAX_PLAYERS ],
|
p_AFKTime [ MAX_PLAYERS ],
|
||||||
bool: p_ClassSelection [ MAX_PLAYERS char ],
|
bool: p_ClassSelection [ MAX_PLAYERS char ],
|
||||||
|
@ -42,8 +42,6 @@ new
|
|||||||
/* ** Hooks ** */
|
/* ** Hooks ** */
|
||||||
hook OnScriptInit( )
|
hook OnScriptInit( )
|
||||||
{
|
{
|
||||||
TextDrawSetString( g_MotdTD, "~w~Want more ~g~money, houses, and xp~w~? Consider donating! ~y~/vip" );
|
|
||||||
|
|
||||||
g_currentXPTD = TextDrawCreate(529.000000, 405.000000, "Current XP");
|
g_currentXPTD = TextDrawCreate(529.000000, 405.000000, "Current XP");
|
||||||
TextDrawBackgroundColor(g_currentXPTD, 255);
|
TextDrawBackgroundColor(g_currentXPTD, 255);
|
||||||
TextDrawFont(g_currentXPTD, 3);
|
TextDrawFont(g_currentXPTD, 3);
|
||||||
@ -137,6 +135,7 @@ hook OnScriptInit( )
|
|||||||
TextDrawColor(g_MotdTD, -1);
|
TextDrawColor(g_MotdTD, -1);
|
||||||
TextDrawSetOutline(g_MotdTD, 1);
|
TextDrawSetOutline(g_MotdTD, 1);
|
||||||
TextDrawSetProportional(g_MotdTD, 1);
|
TextDrawSetProportional(g_MotdTD, 1);
|
||||||
|
TextDrawSetString( g_MotdTD, "~w~Want more ~g~money~w~, ~r~houses~w~, and ~b~xp~w~? Consider donating! ~y~/vip" );
|
||||||
|
|
||||||
g_ObjectLoadTD = TextDrawCreate(320.000000, 148.000000, "Loading Objects...~n~Please Wait...");
|
g_ObjectLoadTD = TextDrawCreate(320.000000, 148.000000, "Loading Objects...~n~Please Wait...");
|
||||||
TextDrawAlignment(g_ObjectLoadTD, 2);
|
TextDrawAlignment(g_ObjectLoadTD, 2);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* San Fierro: Cops and Robbers
|
* San Fierro: Cops and Robbers
|
||||||
*
|
*
|
||||||
* Original Creator: Lorenc_
|
* Original Creator: Lorenc_
|
||||||
* Contributors: Stev
|
* Contributors: Damen, Stev
|
||||||
*
|
*
|
||||||
* Thanks to: y_less/zeex/Frosha/Incognito/SA-MP team
|
* Thanks to: y_less/zeex/Frosha/Incognito/SA-MP team
|
||||||
*
|
*
|
||||||
@ -16,7 +16,7 @@
|
|||||||
#pragma option -d3
|
#pragma option -d3
|
||||||
#pragma dynamic 7200000
|
#pragma dynamic 7200000
|
||||||
|
|
||||||
//#define DEBUG_MODE
|
#define DEBUG_MODE
|
||||||
|
|
||||||
#if defined DEBUG_MODE
|
#if defined DEBUG_MODE
|
||||||
#pragma option -d3
|
#pragma option -d3
|
||||||
@ -478,7 +478,7 @@ public OnPlayerDisconnect( playerid, reason )
|
|||||||
CutSpectation( playerid );
|
CutSpectation( playerid );
|
||||||
LeavePlayerPaintball( playerid );
|
LeavePlayerPaintball( playerid );
|
||||||
RemovePlayerFromRace( playerid );
|
RemovePlayerFromRace( playerid );
|
||||||
//p_Detained { playerid } = false;
|
p_Detained { playerid } = false;
|
||||||
p_Tied { playerid } = false;
|
p_Tied { playerid } = false;
|
||||||
p_Kidnapped { playerid } = false;
|
p_Kidnapped { playerid } = false;
|
||||||
p_Wood [ playerid ] = 0;
|
p_Wood [ playerid ] = 0;
|
||||||
@ -531,7 +531,7 @@ public OnPlayerDisconnect( playerid, reason )
|
|||||||
p_PmResponder [ playerid ] = INVALID_PLAYER_ID;
|
p_PmResponder [ playerid ] = INVALID_PLAYER_ID;
|
||||||
p_ViewingStats [ playerid ] = INVALID_PLAYER_ID;
|
p_ViewingStats [ playerid ] = INVALID_PLAYER_ID;
|
||||||
p_Spectating { playerid } = false;
|
p_Spectating { playerid } = false;
|
||||||
//p_DetainedBy [ playerid ] = INVALID_PLAYER_ID;
|
p_DetainedBy [ playerid ] = INVALID_PLAYER_ID;
|
||||||
p_GangID [ playerid ] = INVALID_GANG_ID;
|
p_GangID [ playerid ] = INVALID_GANG_ID;
|
||||||
p_InfectedHIV { playerid } = false;
|
p_InfectedHIV { playerid } = false;
|
||||||
p_OwnedHouses [ playerid ] = 0;
|
p_OwnedHouses [ playerid ] = 0;
|
||||||
@ -585,8 +585,8 @@ public OnPlayerDisconnect( playerid, reason )
|
|||||||
p_AntiTextSpamCount{ playerid } = 0;
|
p_AntiTextSpamCount{ playerid } = 0;
|
||||||
Delete3DTextLabel( p_AdminLabel[ playerid ] );
|
Delete3DTextLabel( p_AdminLabel[ playerid ] );
|
||||||
p_AdminLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
p_AdminLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||||
//Delete3DTextLabel( p_DetainedLabel[ playerid ] );
|
Delete3DTextLabel( p_DetainedLabel[ playerid ] );
|
||||||
//p_DetainedLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
p_DetainedLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||||
Delete3DTextLabel( p_TiedLabel[ playerid ] );
|
Delete3DTextLabel( p_TiedLabel[ playerid ] );
|
||||||
p_TiedLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
p_TiedLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||||
DestroyDynamic3DTextLabel( p_WeedLabel[ playerid ] );
|
DestroyDynamic3DTextLabel( p_WeedLabel[ playerid ] );
|
||||||
|
Loading…
Reference in New Issue
Block a user