Merge branch 'master' of https://github.com/basicDamen/sf-cnr
This commit is contained in:
commit
0fe49d8cdc
@ -26,7 +26,7 @@ hook OnPlayerStateChange( playerid, newstate, oldstate )
|
||||
|
||||
if ( p_ac_CarWarpTime[ playerid ] > server_time )
|
||||
{
|
||||
CallLocalFunction( "OnPlayerCheatDetected", "ddd", playerid, CHEAT_TYPE_RAPIDFIRE, 0 );
|
||||
CallLocalFunction( "OnPlayerCheatDetected", "ddd", playerid, CHEAT_TYPE_CARWARP, 0 );
|
||||
return Y_HOOKS_BREAK_RETURN_1;
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define ALL_CHECKPOINTS ( 37 )
|
||||
#define ALL_CHECKPOINTS ( 50 )
|
||||
|
||||
#define CP_BANK_MENU ( 1 )
|
||||
#define CP_247_MENU ( 2 )
|
||||
@ -23,65 +23,65 @@
|
||||
#define CP_AMMUNATION_1 ( 10 )
|
||||
#define CP_AMMUNATION_2 ( 11 )
|
||||
#define CP_COUNTRY_BANK_MENU ( 12 )
|
||||
#define CP_HOSPITAL_LV ( 14 )
|
||||
#define CP_FIGHTSTYLE_LV ( 15 )
|
||||
#define CP_HOSPITAL1_LS ( 17 )
|
||||
#define CP_HOSPITAL2_LS ( 18 )
|
||||
#define CP_FIGHTSTYLE_LS ( 19 )
|
||||
#define CP_PAWNSHOP ( 20 )
|
||||
#define CP_HOSPITAL_FC ( 21 )
|
||||
#define CP_REFILL_AMMO ( 22 )
|
||||
#define CP_REFILL_AMMO_LS ( 23 )
|
||||
#define CP_REFILL_AMMO_LV ( 24 )
|
||||
/*#define CP_DROP_OFF_COP ( 28 )
|
||||
#define CP_DROP_OFF_FC ( 29 )
|
||||
#define CP_DROP_OFF_DILLIMORE ( 30 )
|
||||
#define CP_DROP_OFF_DIABLO ( 31 )
|
||||
#define CP_DROP_OFF_QUBRADOS ( 32 )
|
||||
#define CP_DROP_OFF_COP_LS ( 33 )
|
||||
#define CP_DROP_OFF_FBI_LS ( 34 )
|
||||
#define CP_DROP_OFF_FBI_LV ( 35 )
|
||||
#define CP_DROP_OFF_COP_LV ( 36 )
|
||||
#define CP_DROP_OFF_FBI ( 37 )
|
||||
#define CP_DROP_OFF_HELI ( 38 )*/
|
||||
#define CP_BIZ_TERMINAL_COKE ( 25 )
|
||||
#define CP_BIZ_TERMINAL_METH ( 26 )
|
||||
#define CP_BIZ_TERMINAL_WEED ( 27 )
|
||||
#define CP_BIZ_TERMINAL_WEAP ( 28 )
|
||||
#define CP_REWARDS_4DRAG ( 29 )
|
||||
#define CP_REWARDS_CALIG ( 30 )
|
||||
#define CP_REWARDS_VISAGE ( 31 )
|
||||
#define CP_AIRPORT_SF ( 32 )
|
||||
#define CP_AIRPORT_LS ( 33 )
|
||||
#define CP_AIRPORT_LV ( 34 )
|
||||
#define CP_CASINO_BAR ( 35 )
|
||||
#define CP_ALCATRAZ_EXPORT ( 36 )
|
||||
#define CP_HOSPITAL_LV ( 13 )
|
||||
#define CP_FIGHTSTYLE_LV ( 14 )
|
||||
#define CP_HOSPITAL1_LS ( 15 )
|
||||
#define CP_HOSPITAL2_LS ( 16 )
|
||||
#define CP_FIGHTSTYLE_LS ( 17 )
|
||||
#define CP_PAWNSHOP ( 18 )
|
||||
#define CP_HOSPITAL_FC ( 19 )
|
||||
#define CP_REFILL_AMMO ( 20 )
|
||||
#define CP_REFILL_AMMO_LS ( 21 )
|
||||
#define CP_REFILL_AMMO_LV ( 22 )
|
||||
#define CP_DROP_OFF_COP ( 23 )
|
||||
#define CP_DROP_OFF_FC ( 24 )
|
||||
#define CP_DROP_OFF_DILLIMORE ( 25 )
|
||||
#define CP_DROP_OFF_DIABLO ( 26 )
|
||||
#define CP_DROP_OFF_QUBRADOS ( 27 )
|
||||
#define CP_DROP_OFF_COP_LS ( 28 )
|
||||
#define CP_DROP_OFF_FBI_LS ( 29 )
|
||||
#define CP_DROP_OFF_FBI_LV ( 30 )
|
||||
#define CP_DROP_OFF_COP_LV ( 31 )
|
||||
#define CP_DROP_OFF_FBI ( 32 )
|
||||
#define CP_DROP_OFF_HELI ( 33 )
|
||||
#define CP_BIZ_TERMINAL_COKE ( 34 )
|
||||
#define CP_BIZ_TERMINAL_METH ( 35 )
|
||||
#define CP_BIZ_TERMINAL_WEED ( 36 )
|
||||
#define CP_BIZ_TERMINAL_WEAP ( 37 )
|
||||
#define CP_REWARDS_4DRAG ( 38 )
|
||||
#define CP_REWARDS_CALIG ( 39 )
|
||||
#define CP_REWARDS_VISAGE ( 40 )
|
||||
#define CP_AIRPORT_SF ( 41 )
|
||||
#define CP_AIRPORT_LS ( 42 )
|
||||
#define CP_AIRPORT_LV ( 43 )
|
||||
#define CP_CASINO_BAR ( 44 )
|
||||
#define CP_ALCATRAZ_EXPORT ( 45 )
|
||||
|
||||
new g_Checkpoints [ ALL_CHECKPOINTS ] = { -1, ... };
|
||||
|
||||
/* ** Hooks ** */
|
||||
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_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_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_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_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_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_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_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_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_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_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_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_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_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 );
|
||||
|
||||
// Out of SF
|
||||
//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, -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, -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, -433.3666, 2255.6064, 42.4297, 50.0);
|
||||
CreateDynamic3DTextLabel("[DROP OFF]", COLOR_GOLD, -1400.0497, 2647.2358, 55.6875, 50.0);
|
||||
|
||||
#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_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_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, 948.6036, 1811.2720, 8.6484, 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("[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("[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_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_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_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_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_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("[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, 1569.0277, -1694.1566, 5.8906, 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("[HOSPITAL]", COLOR_GOLD, 1172.0767, -1323.3257, 15.4029, 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("[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("[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, -1651.6956, 700.8394, 38.2422, 50.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, -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, 295.4524, -80.7487, 1001.5156, 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 ) ) {
|
||||
return SendError( playerid, "You can't do anything as you are in an event." ), Y_HOOKS_BREAK_RETURN_1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -97,6 +97,8 @@ static stock
|
||||
{ 3, "/giveweapon", "Giving a player a weapon" },
|
||||
{ 3, "/cc", "Clearing the main chat" },
|
||||
{ 3, "/clearchat", "Clearing the main chat" },
|
||||
{ 3, "/vc", "Creating an admin vehicle (short)" },
|
||||
{ 3, "/vdestroy", "Destroying an admin vehicle" },
|
||||
{ 3, "/vbring", "Bring a vehicle ID to you" },
|
||||
{ 3, "/vgoto", "Teleport to a vehicle ID" },
|
||||
{ 3, "/venter", "Enter a vehicle ID" },
|
||||
@ -121,7 +123,6 @@ static stock
|
||||
{ 4, "/resetwepall", "Resets all player weapons" },
|
||||
{ 4, "/giveweaponall", "Gives all players a weapon" },
|
||||
{ 4, "/circleall", "Teleports all players around in a circle of you (used for events)" },
|
||||
{ 4, "/vc", "Creating a admin vehicle (short)" },
|
||||
{ 4, "/vcreate", "Creating a admin vehicle" },
|
||||
{ 4, "/gotopos", "Teleport to a specifc location X Y Z" },
|
||||
{ 4, "/addnote", "Attach a note to a player" },
|
||||
|
@ -655,6 +655,7 @@ CMD:specoff( playerid, params[ ] )
|
||||
p_beingSpectated[ p_whomSpectating[ playerid ] ] = false;
|
||||
p_whomSpectating[ playerid ] = INVALID_PLAYER_ID;
|
||||
}
|
||||
p_AlcatrazSpec[ playerid ] = g_iTime + 10;
|
||||
p_Spectating{ playerid } = false;
|
||||
SendServerMessage( playerid, "Spectation has been closed." );
|
||||
}
|
||||
|
@ -225,11 +225,14 @@ CMD:healall( playerid, params[ ] )
|
||||
if ( p_AdminLevel[ playerid ] < 3 )
|
||||
return SendError( playerid, ADMIN_COMMAND_REJECT );
|
||||
|
||||
new admin_world = GetPlayerVirtualWorld( playerid );
|
||||
|
||||
AddAdminLogLineFormatted( "%s(%d) has healed everybody", ReturnPlayerName( playerid ), playerid );
|
||||
foreach(new i : Player) {
|
||||
if ( !p_Jailed{ i } ) SetPlayerHealth( i, p_AdminOnDuty{ i } == true ? float( INVALID_PLAYER_ID ) : 100.0 );
|
||||
new loop_world = GetPlayerVirtualWorld( i );
|
||||
if ( !p_Jailed{ i } && loop_world == admin_world ) SetPlayerHealth( i, p_AdminOnDuty{ i } == true ? float( INVALID_PLAYER_ID ) : 100.0 );
|
||||
}
|
||||
SendGlobalMessage( -1, ""COL_PINK"[ADMIN]"COL_WHITE" Everyone has been healed by %s(%d)!", ReturnPlayerName( playerid ), playerid );
|
||||
SendGlobalMessage( -1, ""COL_PINK"[ADMIN]"COL_WHITE" All players have been healed in %s's(%d) world!", ReturnPlayerName( playerid ), playerid );
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
#define DIALOG_GANG_COLOR 1027
|
||||
#define DIALOG_GANG_COLOR_INPUT 1028
|
||||
#define DIALOG_RADIO 1029
|
||||
//#define DIALOG_XPMARKET 1030
|
||||
#define DIALOG_XPMARKET 1030
|
||||
#define DIALOG_PAINTBALL 1031
|
||||
#define DIALOG_GPS 1032
|
||||
#define DIALOG_VIP_LOCKER 1033
|
||||
@ -211,6 +211,7 @@
|
||||
#define DIALOG_HOUSE_SELL 1201
|
||||
#define DIALOG_BUSINESS_SELL_CONFIRM 1202
|
||||
#define DIALOG_NEXT_PAGE_VIP 1204
|
||||
#define DIALOG_XPMARKET_SELL 1205
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
// special (xmas/easter/nye)
|
||||
// #include "irresistible\cnr\features\christmas.pwn"
|
||||
// #include "irresistible\cnr\features\eastereggs.pwn"
|
||||
#include "irresistible\cnr\features\eastereggs.pwn"
|
||||
// #include "irresistible\cnr\features\new_years_eve.pwn"
|
||||
|
||||
// other
|
||||
|
@ -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 ( 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 ( 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 ( 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." );
|
||||
|
@ -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 )
|
||||
{
|
||||
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
|
||||
iWanted = 2;
|
||||
|
@ -695,7 +695,8 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
}
|
||||
|
||||
new
|
||||
iCashMoney = floatround( g_businessData[ iBusiness ] [ E_COST ] / 2 );
|
||||
iCashMoney = floatround( g_businessData[ iBusiness ] [ E_COST ] / 2 ),
|
||||
iBankMoney = g_businessData[ iBusiness ][ E_BANK ];
|
||||
|
||||
p_OwnedBusinesses[ playerid ] --;
|
||||
g_businessData[ iBusiness ] [ E_OWNER_ID ] = 0;
|
||||
@ -704,10 +705,10 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
StopBusinessExportMission( iBusiness );
|
||||
UpdateBusinessData( iBusiness );
|
||||
UpdateBusinessTitle( iBusiness ); // No point querying (add on resale)
|
||||
GivePlayerCash( playerid, iCashMoney );
|
||||
|
||||
GivePlayerCash( playerid, iCashMoney + iBankMoney );
|
||||
SetPlayerPosEx( playerid, g_businessData[ iBusiness ] [ E_X ], g_businessData[ iBusiness ] [ E_Y ], g_businessData[ iBusiness ] [ E_Z ], 0 ), SetPlayerVirtualWorld( playerid, 0 );
|
||||
SendServerMessage( playerid, "You have successfully sold your business for "COL_GOLD"%s"COL_WHITE".", cash_format( iCashMoney ) );
|
||||
SendServerMessage( playerid, "You have successfully sold your business for "COL_GOLD"%s"COL_WHITE" and withdrawn "COL_GOLD"%i"COL_WHITE" from the business bank.", cash_format( iCashMoney ), cash_format( iBankMoney ) );
|
||||
|
||||
DeletePVar( playerid, "biz_sell_id" );
|
||||
return 1;
|
||||
@ -1543,6 +1544,7 @@ stock ResetBusiness( iBusiness, bool: hard_reset = false )
|
||||
// data
|
||||
g_businessData[ iBusiness ] [ E_PRODUCT ] = 0;
|
||||
g_businessData[ iBusiness ] [ E_SUPPLIES ] = 0;
|
||||
g_businessData[ iBusiness ] [ E_BANK ] = 0;
|
||||
|
||||
// upgrades
|
||||
g_businessData[ iBusiness ] [ E_CAR_MODEL_ID ] = 554;
|
||||
|
@ -168,7 +168,7 @@ CMD:c4( playerid, params[ ] )
|
||||
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 ( 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 ( 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." );
|
||||
|
@ -12,18 +12,3 @@
|
||||
#include "irresistible\cnr\features\cop\bail.pwn"
|
||||
#include "irresistible\cnr\features\cop\ticket.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 >
|
||||
|
||||
/* ** Variables ** */
|
||||
static stock
|
||||
bool: p_AwaitingBCAttempt [ MAX_PLAYERS char ],
|
||||
p_AwaitingBCAttemptTimer [ MAX_PLAYERS ] = { -1, ... }
|
||||
;
|
||||
|
||||
/* ** Forwards ** */
|
||||
forward OnPlayerArrested( playerid, victimid, totalarrests, totalpeople );
|
||||
@ -20,62 +16,20 @@ forward OnPlayerArrested( playerid, victimid, totalarrests, totalpeople );
|
||||
/* ** Hooks ** */
|
||||
hook OnPlayerDisconnect( playerid, reason )
|
||||
{
|
||||
|
||||
p_AwaitingBCAttempt{ playerid } = false;
|
||||
KillTimer( p_AwaitingBCAttemptTimer[ playerid ] );
|
||||
p_AwaitingBCAttemptTimer[ playerid ] = -1;
|
||||
|
||||
// Quit to Avoid - Award Handling
|
||||
AwardNearestLEO( playerid, 0 );
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerSpawn( playerid )
|
||||
{
|
||||
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 )
|
||||
hook OnPlayerEnterDynamicCP( playerid, checkpointid )
|
||||
{
|
||||
// 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 )
|
||||
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." );
|
||||
}
|
||||
return 1;
|
||||
}*/
|
||||
}
|
||||
|
||||
/* ** Commands ** */
|
||||
CMD:taze( playerid, params[ ] )
|
||||
{
|
||||
new
|
||||
pID = GetClosestPlayer( playerid );
|
||||
|
||||
return TazePlayer( pID, playerid );
|
||||
new victimid;
|
||||
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 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:arrest( playerid, params[ ] )
|
||||
{
|
||||
new
|
||||
victimid = GetClosestPlayer( playerid );
|
||||
|
||||
return ArrestPlayer( victimid, playerid );
|
||||
new victimid;
|
||||
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, "/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[ ] )
|
||||
{
|
||||
new
|
||||
victimid = GetClosestPlayer( playerid );
|
||||
new victimid;
|
||||
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[ ] )
|
||||
{
|
||||
new victimid = GetClosestPlayer( playerid );
|
||||
//if ( p_Class[ playerid ] != CLASS_POLICE ) return SendError( playerid, "This is restricted to police only." );
|
||||
new victimid;
|
||||
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 ) )
|
||||
{
|
||||
//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 ( !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." );
|
||||
@ -174,16 +251,16 @@ CMD:uncuff( playerid, params[ ] )
|
||||
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 ( 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( playerid, -1, ""COL_GREEN"[UNCUFFED]{FFFFFF} You have uncuffed %s(%d)!", ReturnPlayerName( victimid ), victimid );
|
||||
ClearAnimations( victimid );
|
||||
TogglePlayerControllable( victimid, 1 );
|
||||
p_Cuffed{ victimid } = false;
|
||||
//p_Detained{ victimid } = false;
|
||||
//Delete3DTextLabel( p_DetainedLabel[ victimid ] );
|
||||
//p_DetainedLabel[ victimid ] = Text3D: INVALID_3DTEXT_ID;
|
||||
//p_DetainedBy[ victimid ] = INVALID_PLAYER_ID;
|
||||
p_Detained{ victimid } = false;
|
||||
Delete3DTextLabel( p_DetainedLabel[ victimid ] );
|
||||
p_DetainedLabel[ victimid ] = Text3D: INVALID_3DTEXT_ID;
|
||||
p_DetainedBy[ victimid ] = INVALID_PLAYER_ID;
|
||||
KillTimer( p_CuffAbuseTimer[ victimid ] );
|
||||
SetPlayerSpecialAction( victimid, SPECIAL_ACTION_NONE );
|
||||
RemovePlayerAttachedObject( victimid, 2 );
|
||||
@ -192,12 +269,14 @@ CMD:uncuff( playerid, params[ ] )
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*CMD:detain( playerid, params[ ] )
|
||||
CMD:detain( playerid, params[ ] )
|
||||
{
|
||||
new 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 ( 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 ) )
|
||||
{
|
||||
if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player you're close to is in your team." );
|
||||
@ -225,106 +304,15 @@ CMD:uncuff( playerid, params[ ] )
|
||||
}
|
||||
else return SendError( playerid, "There are no players around to detain." );
|
||||
return 1;
|
||||
}*/
|
||||
}
|
||||
|
||||
CMD:bc( playerid, params[ ] ) return cmd_breakcuffs(playerid, params);
|
||||
CMD:breakcuffs( playerid, params[ ] )
|
||||
{
|
||||
return BreakPlayerCuffs( playerid ), 1;
|
||||
}
|
||||
|
||||
/* ** 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 )
|
||||
{
|
||||
p_QuitToAvoidTimestamp[ playerid ] = 0;
|
||||
@ -343,67 +331,6 @@ stock AwardArrest( victimid, playerid )
|
||||
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 )
|
||||
{
|
||||
if ( !IsPlayerConnected( playerid ) || !p_Tazed{ playerid } ) // || p_Detained{ playerid } == true
|
||||
@ -434,10 +361,10 @@ function Uncuff( playerid )
|
||||
ClearAnimations( playerid );
|
||||
}
|
||||
p_Cuffed{ playerid } = false;
|
||||
//p_Detained{ playerid } = false;
|
||||
//Delete3DTextLabel( p_DetainedLabel[ playerid ] );
|
||||
//p_DetainedLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||
//p_DetainedBy[ playerid ] = INVALID_PLAYER_ID;
|
||||
p_Detained{ playerid } = false;
|
||||
Delete3DTextLabel( p_DetainedLabel[ playerid ] );
|
||||
p_DetainedLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||
p_DetainedBy[ playerid ] = INVALID_PLAYER_ID;
|
||||
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 );
|
||||
@ -448,6 +375,8 @@ stock BreakPlayerCuffs( playerid )
|
||||
{
|
||||
if ( !IsPlayerConnected( playerid ) || IsPlayerDead( playerid ) ) return false;
|
||||
|
||||
if ( !IsPlayerCuffed( playerid ) ) return SendError( playerid, "You are not cuffed." );
|
||||
|
||||
if ( p_BobbyPins[ playerid ] < 1 )
|
||||
{
|
||||
ShowPlayerHelpDialog( playerid, 4000, "You can buy bobby pins at Supa Save or a 24/7 store to break cuffs." );
|
||||
@ -455,9 +384,7 @@ stock BreakPlayerCuffs( playerid )
|
||||
}
|
||||
else p_BobbyPins[ playerid ] --;
|
||||
|
||||
if ( p_AwaitingBCAttempt{ playerid } ) p_AwaitingBCAttempt{ playerid } = false;
|
||||
|
||||
new probability = 75; // success rate probability
|
||||
new probability = 50; // success rate probability
|
||||
|
||||
if ( random( 101 ) <= probability )
|
||||
{
|
||||
@ -481,22 +408,21 @@ stock BreakPlayerCuffs( playerid )
|
||||
|
||||
p_Cuffed{ playerid } = false;
|
||||
p_BulletInvulnerbility[ playerid ] = g_iTime + 5;
|
||||
p_Detained{ playerid } = false;
|
||||
Delete3DTextLabel( p_DetainedLabel[ playerid ] );
|
||||
p_DetainedLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||
p_DetainedBy[ playerid ] = INVALID_PLAYER_ID;
|
||||
}
|
||||
SendServerMessage( playerid, "You have successfully broken out of your cuffs!" );
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
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 );
|
||||
SendServerMessage( playerid, "You have snapped your bobby pin and failed to break out of your cuffs." );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function BreakPlayerCuffsAttempt( playerid ) return BreakPlayerCuffs( playerid ), 1;
|
||||
|
||||
stock AwardNearestLEO( playerid, reason )
|
||||
{
|
||||
if ( ! IsPlayerConnected( playerid ) || playerid == INVALID_PLAYER_ID || GetPlayerWantedLevel( playerid ) < 2 || IsPlayerDead( playerid ) )
|
||||
|
@ -50,12 +50,12 @@ hook OnScriptInit( )
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerEnterDynamicCP( playerid, checkpointid ) {
|
||||
/*hook OnPlayerEnterDynamicCP( playerid, checkpointid ) {
|
||||
if ( IsPlayerJailed( playerid ) ) {
|
||||
return SendError( playerid, "You're jailed, and you accessed a checkpoint. I smell a cheater." ), KickPlayerTimed( playerid ), Y_HOOKS_BREAK_RETURN_1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}*/
|
||||
|
||||
hook OnPlayerUpdateEx( playerid )
|
||||
{
|
||||
@ -65,9 +65,9 @@ hook OnPlayerUpdateEx( playerid )
|
||||
if ( IsPlayerAFK( playerid ) )
|
||||
p_AlcatrazEscapeTS[ playerid ] = g_iTime + ALCATRAZ_TIME_PAUSE; // Money farmers?
|
||||
|
||||
if ( IsPlayerInDynamicArea( playerid, g_AlcatrazArea ) )
|
||||
if ( IsPlayerInDynamicArea( playerid, g_AlcatrazArea ) && g_iTime > p_AlcatrazSpec[ playerid ] )
|
||||
{
|
||||
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 )
|
||||
{
|
||||
@ -250,20 +250,20 @@ stock JailPlayer( playerid, seconds, admin = 0 )
|
||||
PlayerTextDrawSetString ( playerid, p_JailTimeTD[ playerid ], "_" );
|
||||
PlayerTextDrawShow ( playerid, p_JailTimeTD[ playerid ] );
|
||||
|
||||
// External Variables to Jail (resetting)
|
||||
p_Cuffed { playerid } = false;
|
||||
p_InfectedHIV { playerid } = false;
|
||||
//p_Detained { playerid } = false;
|
||||
//Delete3DTextLabel ( p_DetainedLabel[ playerid ] );
|
||||
//p_DetainedLabel [ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||
//p_DetainedBy [ playerid ] = INVALID_PLAYER_ID;
|
||||
|
||||
// Primary Jail Variables
|
||||
p_Jailed { playerid } = true;
|
||||
p_JailTime [ playerid ] = seconds;
|
||||
p_AdminJailed { playerid } = admin;
|
||||
p_JailTimer [ playerid ] = SetTimerEx( "Unjail", 950, true, "d", playerid );
|
||||
|
||||
// External Variables to Jail (resetting)
|
||||
p_Cuffed { playerid } = false;
|
||||
p_InfectedHIV { playerid } = false;
|
||||
p_Detained { playerid } = false;
|
||||
Delete3DTextLabel ( p_DetainedLabel[ playerid ] );
|
||||
p_DetainedLabel [ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||
p_DetainedBy [ playerid ] = INVALID_PLAYER_ID;
|
||||
|
||||
CancelEdit ( playerid );
|
||||
RemovePlayerStolensFromHands( playerid );
|
||||
StopPlayerUsingSlotMachine ( playerid );
|
||||
|
@ -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 ] < 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 ( 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
|
||||
{
|
||||
|
@ -556,6 +556,9 @@ CMD:sync( playerid, params[ ] )
|
||||
if ( IsPlayerJailed( playerid ) )
|
||||
return SendError( playerid, "You cannot use this feature while you are jailed." );
|
||||
|
||||
if ( IsPlayerDetained( playerid ) )
|
||||
return SendError( playerid, "You cannot use this feature while you are detained." );
|
||||
|
||||
if ( IsPlayerInAnyVehicle( playerid ) )
|
||||
return SendError( playerid, "You cannot synchronize yourself in a vehicle." );
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define EASTEREGG_LABEL "[EASTER EGG]"
|
||||
#define EASTEREGG_NAME "Easter Egg"
|
||||
#define EASTEREGG_MODEL randarg( 19341, 19342, 19343, 19344, 19345 )
|
||||
#define MAX_EGGS ( 4 )
|
||||
#define MAX_EGGS ( 6 )
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_EASTEREGG_DATA
|
||||
@ -70,7 +70,8 @@ hook OnPlayerUpdateEx( playerid )
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
p_IrresistibleCoins[ playerid ] += ( iCoins = fRandomEx( 75.0, 250.0 ) );
|
||||
( iCoins = fRandomEx( 75.0, 250.0 ) );
|
||||
GivePlayerIrresistibleCoins( playerid, iCoins );
|
||||
format( szPrize, sizeof( szPrize ), "%0.2f coins", iCoins );
|
||||
}
|
||||
}
|
||||
|
@ -47,23 +47,22 @@ enum e_GANG_ZONE_DATA
|
||||
static const
|
||||
g_gangzoneData[ ] [ e_GANG_ZONE_DATA ] =
|
||||
{
|
||||
{ -1725.0, 1301.5, -1538.0, 1437.5, CITY_SF },
|
||||
{ -2868.0, 1012.5, -2768.0, 1217.5, CITY_SF },
|
||||
{ -2497.0, 932.5, -2392.0, 1069.5, CITY_SF },
|
||||
{ -2054.0, 1084.5, -1892.0, 1171.5, CITY_SF },
|
||||
{ -1569.0, 822.5, -1418.0, 1019.5, CITY_SF },
|
||||
{ -2088.0, 573.5, -2008.0, 728.5, CITY_SF },
|
||||
{ -2523.0, 571.5, -2390.0, 705.5, CITY_SF },
|
||||
{ -2766.0, 324.5, -2651.0, 426.5, CITY_SF },
|
||||
{ -2386.0, 70.5, -2273.0, 227.5, CITY_SF },
|
||||
{ -2139.0, 115.5, -2013.0, 311.5, CITY_SF },
|
||||
{ -2001.0, 69.5, -1911.0, 219.5, CITY_SF },
|
||||
{ -2096.0, -279.5, -2011.0, -111.5, CITY_SF },
|
||||
{ -2523.0, -321.5, -2264.0, -215.5, CITY_SF },
|
||||
{ -2153.0, -515.5, -1960.0, -374.5, CITY_SF },
|
||||
{ -2600.0, -68.5, -2504.0, 34.5, CITY_SF },
|
||||
{ -2245.0, 571.5, -2146.0, 727.5, CITY_SF },
|
||||
{ -1755.0, -80.5, -1658.0, 27.5, CITY_SF }
|
||||
{ -2076.0, 1036.5, -1873.0, 1088.5, CITY_SF },
|
||||
{ -2014.0, 937.5, -1873.0, 1036.5, CITY_SF },
|
||||
{ -2014.0, 829.5, -1886.0, 937.5, CITY_SF },
|
||||
{ -1873.0, 937.5, -1787.0, 1112.5, CITY_SF },
|
||||
{ -2014.0, 719.5, -1886.0, 829.5, CITY_SF },
|
||||
{ -1886.0, 829.5, -1788.0, 937.5, CITY_SF },
|
||||
{ -1886.0, 719.5, -1788.0, 829.5, CITY_SF },
|
||||
{ -1788.0, 829.5, -1723.0, 937.5, CITY_SF },
|
||||
{ -1723.0, 829.5, -1642.0, 937.5, CITY_SF },
|
||||
{ -1642.0, 829.5, -1564.0, 937.5, CITY_SF },
|
||||
{ -1564.0, 828.5, -1421.0, 1015.5, CITY_SF },
|
||||
{ -1667.0, 720.5, -1563.0, 829.5, CITY_SF },
|
||||
{ -1788.0, 719.5, -1667.0, 829.5, CITY_SF },
|
||||
{ -1787.0, 935.5, -1704.0, 1037.5, CITY_SF },
|
||||
{ -1787.0, 1037.5, -1704.0, 1112.5, CITY_SF },
|
||||
{ -2130.0, 816.5, -2014.0, 1036.5, CITY_SF }
|
||||
}
|
||||
;
|
||||
|
||||
|
@ -67,28 +67,24 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
{
|
||||
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 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 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}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 )
|
||||
{
|
||||
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
|
||||
total_level = GetPlayerTotalLevel( playerid );
|
||||
Float: total_dm_xp = GetPlayerExperience( playerid, E_DEATHMATCH );
|
||||
|
||||
switch( listitem )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
if ( total_level < 75 ) {
|
||||
return SendError( playerid, "Your total level must be at least 75 to use this (/level)." );
|
||||
}
|
||||
|
||||
if ( GetPlayerCash( playerid ) < 25000 ) {
|
||||
return SendError( playerid, "You do not have enough money for this item ($25,000)." );
|
||||
if ( total_dm_xp < 250 ) {
|
||||
return SendError( playerid, "You need at least 250 Deathmatch XP for this item." );
|
||||
}
|
||||
|
||||
if ( GetPlayerClass( playerid ) != CLASS_CIVILIAN ) {
|
||||
@ -98,9 +94,9 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
p_OffRadar{ playerid } = true;
|
||||
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." );
|
||||
|
||||
SetPlayerColor( playerid, setAlpha( GetPlayerColor( playerid ), 0x00 ) );
|
||||
@ -109,12 +105,8 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
|
||||
case 1:
|
||||
{
|
||||
if ( total_level < 50 ) {
|
||||
return SendError( playerid, "Your total level must be at least 50 to use this (/level)." );
|
||||
}
|
||||
|
||||
if ( GetPlayerCash( playerid ) < 9900 ) {
|
||||
return SendError( playerid, "You do not have enough money for this item ($9,900)." );
|
||||
if ( total_dm_xp < 100 ) {
|
||||
return SendError( playerid, "You need at least 100 Deathmatch XP for this item." );
|
||||
}
|
||||
|
||||
for ( new i = 0; i < MAX_WEAPONS; i++ )
|
||||
@ -125,8 +117,9 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
}
|
||||
}
|
||||
|
||||
GivePlayerCash( playerid, -9900 );
|
||||
SendServerMessage( playerid, "You have bought unlimited ammunition for $9,900." );
|
||||
GivePlayerExperience( playerid, E_DEATHMATCH, -100, .with_dilation = false );
|
||||
|
||||
SendServerMessage( playerid, "You have bought unlimited ammunition for 100 Deathmatch XP." );
|
||||
SetPlayerArmedWeapon( playerid, 0 );
|
||||
Beep( playerid );
|
||||
}
|
||||
@ -135,78 +128,62 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
else if ( dialogid == DIALOG_PERKS_V )
|
||||
{
|
||||
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 )
|
||||
return SendError( playerid, "You are not in any vehicle as a driver." );
|
||||
|
||||
new
|
||||
total_level = GetPlayerTotalLevel( playerid );
|
||||
Float: total_robbery_xp = GetPlayerExperience( playerid, E_ROBBERY );
|
||||
|
||||
switch( listitem )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
if ( total_level < 75 ) {
|
||||
return SendError( playerid, "Your total level must be at least 75 to use this (/level)." );
|
||||
}
|
||||
|
||||
if ( GetPlayerCash( playerid ) < 9900 ) {
|
||||
return SendError( playerid, "You do not have enough money for this item ($9,900)." );
|
||||
if ( total_robbery_xp < 180 ) {
|
||||
return SendError( playerid, "You need at least 180 Robbery XP for this item." );
|
||||
}
|
||||
|
||||
new Float: vZ, vehicleid = GetPlayerVehicleID( playerid );
|
||||
GetVehicleZAngle( vehicleid, vZ ), SetVehicleZAngle( vehicleid, vZ );
|
||||
RepairVehicle( vehicleid );
|
||||
GivePlayerCash( playerid, -9900 );
|
||||
SendServerMessage( playerid, "You have fixed and flipped your vehicle for $9,900." );
|
||||
GivePlayerExperience( playerid, E_ROBBERY, -180, .with_dilation = false );
|
||||
SendServerMessage( playerid, "You have fixed and flipped your vehicle for 180 Robbery XP." );
|
||||
PlayerPlaySound( playerid, 1133, 0.0, 0.0, 5.0 );
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
if ( total_level < 75 ) {
|
||||
return SendError( playerid, "Your total level must be at least 75 to use this (/level)." );
|
||||
}
|
||||
|
||||
if ( GetPlayerCash( playerid ) < 7500 ) {
|
||||
return SendError( playerid, "You do not have enough money for this item ($7,500)." );
|
||||
if ( total_robbery_xp < 120 ) {
|
||||
return SendError( playerid, "You need at least 120 Robbery XP for this item." );
|
||||
}
|
||||
|
||||
new vehicleid = GetPlayerVehicleID( playerid );
|
||||
PlayerPlaySound( playerid, 1133, 0.0, 0.0, 5.0 );
|
||||
RepairVehicle( vehicleid );
|
||||
GivePlayerCash( playerid, -7500 );
|
||||
SendServerMessage( playerid, "You have repaired your car for $7,500." );
|
||||
GivePlayerExperience( playerid, E_ROBBERY, -120, .with_dilation = false );
|
||||
SendServerMessage( playerid, "You have repaired your car for 120 Robbery XP." );
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
if ( total_level < 50 ) {
|
||||
return SendError( playerid, "Your total level must be at least 50 to use this (/level)." );
|
||||
}
|
||||
|
||||
if ( GetPlayerCash( playerid ) < 3000 ) {
|
||||
return SendError( playerid, "You do not have enough money for this item ($3,000)." );
|
||||
if ( total_robbery_xp < 80 ) {
|
||||
return SendError( playerid, "You need at least 80 Robbery XP for this item." );
|
||||
}
|
||||
|
||||
AddVehicleComponent( GetPlayerVehicleID( playerid ), 1010 );
|
||||
GivePlayerCash( playerid, -3000 );
|
||||
SendServerMessage( playerid, "You have installed nitro on your car for $3,000." );
|
||||
GivePlayerExperience( playerid, E_ROBBERY, -80, .with_dilation = false );
|
||||
SendServerMessage( playerid, "You have repaired your car for 80 Robbery XP." );
|
||||
PlayerPlaySound( playerid, 1133, 0.0, 0.0, 5.0 );
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
if ( total_level < 40 ) {
|
||||
return SendError( playerid, "Your total level must be at least 40 to use this (/level)." );
|
||||
}
|
||||
|
||||
if ( GetPlayerCash( playerid ) < 2500 ) {
|
||||
return SendError( playerid, "You do not have enough money for this item ($2,500)." );
|
||||
if ( total_robbery_xp < 50 ) {
|
||||
return SendError( playerid, "You need at least 50 Robbery XP for this item." );
|
||||
}
|
||||
|
||||
new Float: vZ, vehicleid = GetPlayerVehicleID( playerid );
|
||||
GetVehicleZAngle( vehicleid, vZ ), SetVehicleZAngle( vehicleid, vZ );
|
||||
GivePlayerCash( playerid, -2500 );
|
||||
SendServerMessage( playerid, "You have flipped your vehicle for $2,500." );
|
||||
GivePlayerExperience( playerid, E_ROBBERY, -50, .with_dilation = false );
|
||||
SendServerMessage( playerid, "You have repaired your car for 50 Robbery XP." );
|
||||
PlayerPlaySound( playerid, 1133, 0.0, 0.0, 5.0 );
|
||||
}
|
||||
}
|
||||
@ -223,7 +200,7 @@ CMD:perks( playerid, params[ ] )
|
||||
if ( IsPlayerInArmyVehicle( playerid ) )
|
||||
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 ** */
|
||||
|
@ -34,7 +34,7 @@ enum E_LEVELS {
|
||||
enum E_LEVEL_DATA {
|
||||
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
|
||||
@ -49,10 +49,10 @@ static const
|
||||
static const
|
||||
g_levelData [ ] [ E_LEVEL_DATA ] =
|
||||
{
|
||||
// Level Name Bar Color Level 100 Req. XP Dilation (just to confuse user)
|
||||
{ "Police", 0x3E7EFFFF, 7500.0, 20.0 }, // 7.5k arrests
|
||||
{ "Robbery", 0xF83245FF, 30000.0, 15.0 }, // 30K robberies
|
||||
{ "Deathmatch", 0xFF9233FF, 75000.0, 10.0 } // 75K kills
|
||||
// Level Name Bar Color Level 100 Req. XP Dilation Sell Value
|
||||
{ "Police", 0x3E7EFFFF, 7500.0, 20.0, 10.0 }, // 7.5k arrests
|
||||
{ "Robbery", 0xF83245FF, 30000.0, 15.0, 10.0 }, // 30K robberies
|
||||
{ "Deathmatch", 0xFF9233FF, 75000.0, 10.0, 5.0 } // 75K kills
|
||||
/*
|
||||
{ "Fireman", 10000.0, 9.0 }, // 10k fires
|
||||
{ "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 ) {
|
||||
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;
|
||||
}
|
||||
|
||||
@ -205,7 +240,7 @@ CMD:level( playerid, params[ ] )
|
||||
new
|
||||
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 ++ )
|
||||
{
|
||||
@ -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 );
|
||||
|
||||
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 );
|
||||
@ -237,6 +272,19 @@ CMD:rank( playerid, params[ ] )
|
||||
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 ** */
|
||||
thread Experience_OnLoad( playerid )
|
||||
{
|
||||
@ -279,13 +327,18 @@ thread currentUserRank( playerid, watchingid )
|
||||
}
|
||||
|
||||
/* ** 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 )
|
||||
{
|
||||
if ( ! IsPlayerLoggedIn( playerid ) || ! ( 0 <= _: level < sizeof( g_levelData ) ) )
|
||||
return 0;
|
||||
|
||||
// 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
|
||||
new next_lvl = floatround( GetPlayerLevel( playerid, level ), floatround_floor ) + 1;
|
||||
@ -309,8 +362,8 @@ stock GivePlayerExperience( playerid, E_LEVELS: level, Float: default_xp = 1.0,
|
||||
SetPlayerProgressBarValue( playerid, p_playerExpProgress[ playerid ], progress );
|
||||
}
|
||||
|
||||
// seasonal
|
||||
GivePlayerSeasonalXP( playerid, xp_earned );
|
||||
// seasonal (only adds, not including removes)
|
||||
if ( xp_earned > 0.0 ) GivePlayerSeasonalXP( playerid, xp_earned );
|
||||
|
||||
// alert user
|
||||
KillTimer( p_playerExpHideTimer[ playerid ] );
|
||||
@ -318,7 +371,7 @@ stock GivePlayerExperience( playerid, E_LEVELS: level, Float: default_xp = 1.0,
|
||||
PlayerTextDrawShow( playerid, p_playerExpTitle[ playerid ] );
|
||||
SetPlayerProgressBarColour( playerid, p_playerExpProgress[ playerid ], g_levelData[ _: level ] [ E_COLOUR ] );
|
||||
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 ] );
|
||||
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 ) ) );
|
||||
}
|
||||
|
||||
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 ** */
|
||||
stock GetSeasonalRankName( rankid, dest[ ], dest_size = sizeof( dest ) ) {
|
||||
return format( dest, dest_size, "%s", g_seasonalRanks[ rankid ] [ E_NAME ] );
|
||||
|
@ -8,11 +8,16 @@
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
#if defined SERVER_RULES_URL
|
||||
|
||||
/* ** Variables ** */
|
||||
/* ** Variables ** */
|
||||
static stock szRules [ 3300 ];
|
||||
|
||||
/* ** Commands ** */
|
||||
CMD:rules( playerid, params[ ] ) {
|
||||
return ShowPlayerRules( playerid );
|
||||
}
|
||||
|
||||
#if defined SERVER_RULES_URL
|
||||
|
||||
/* ** Forwards ** */
|
||||
public OnRulesHTTPResponse( index, response_code, data[ ] );
|
||||
|
||||
@ -31,20 +36,16 @@
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Commands ** */
|
||||
CMD:rules( playerid, params[ ] ) {
|
||||
return ShowPlayerRules( playerid );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* ** Functions ** */
|
||||
stock ShowPlayerRules( playerid )
|
||||
{
|
||||
#if !defined SERVER_RULES_URL
|
||||
/*#if !defined SERVER_RULES_URL
|
||||
#pragma unused playerid
|
||||
return 1;
|
||||
#else
|
||||
#endif*/
|
||||
format( szRules, sizeof( szRules ), "{FFFFFF}1. Show respect to every player on the server, including obeying administrators, or you will be muted.\n2. Do not spam or flood the chat, otherwise you will be muted.\n3. Do not impersonate any, whether it's a player, administrator, or the owner. You will be banned.\n4. Do not cast commands on a person repeatedly to annoy them.\n5. If you're a law enforcement officer, do not assist criminals or you will be jailed.\n6. Do not camp exteriors of buildings, spam rockets, OR spam your mini-gun at players with combat vehicles.\n7. Using water-emitting vehicles and/or effect-emitting weapons on players is considered abuse.\n8. You must park your personal vehicle near YOUR house portal OR in a parking lot, otherwise your vehicle will be moved OR deleted.\n9. The scamming limit is $10,000. Scamming higher amounts will have your account banned and truncated.\n10. Do not question other people's bans, it's not your business!\n11. Do not farm money, XP, contracts, arrests, OR kills, doing so will result in a ban and truncation.\n12. Report bugs and glitches to administration or on the forums. Do NOT abuse them or you will be banned.\n13. Do not use any hacks!\n14. Administration may suspend users unanimously so long as it is clearly evident and justified." );
|
||||
return ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, "{FFFFFF}Rules", szRules, "Okay", "" ), 1;
|
||||
#endif
|
||||
}
|
@ -26,7 +26,7 @@ static stock
|
||||
;
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) {
|
||||
/*hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) {
|
||||
new
|
||||
player_vehicle = GetPlayerVehicleID( playerid );
|
||||
|
||||
@ -40,7 +40,7 @@ hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) {
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}*/
|
||||
|
||||
hook OnPlayerDisconnect( playerid, reason ) {
|
||||
ClearPlayerSpikeStrips( playerid, .distance_check = false );
|
||||
|
@ -14,6 +14,7 @@
|
||||
#define IsPlayerGettingBlowed(%0) (p_GettingBlowjob{%0})
|
||||
#define IsPlayerLoadingObjects(%0) (p_pausedToLoad{%0})
|
||||
#define IsPlayerAdminJailed(%0) (p_AdminJailed{%0} && p_JailTime[%0])
|
||||
#define IsPlayerDetained(%0) (p_Detained{%0})
|
||||
|
||||
/* ** Variables ** */
|
||||
new
|
||||
@ -146,9 +147,9 @@ new
|
||||
p_HouseCrackingPW [ MAX_PLAYERS ],
|
||||
p_Burglaries [ MAX_PLAYERS ],
|
||||
p_ArmyBanned [ MAX_PLAYERS char ],
|
||||
//Text3D: p_DetainedLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
//bool: p_Detained [ MAX_PLAYERS char ],
|
||||
//p_DetainedBy [ MAX_PLAYERS ],
|
||||
Text3D: p_DetainedLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
bool: p_Detained [ MAX_PLAYERS char ],
|
||||
p_DetainedBy [ MAX_PLAYERS ],
|
||||
p_BailTimestamp [ MAX_PLAYERS ],
|
||||
p_AFKTime [ MAX_PLAYERS ],
|
||||
bool: p_ClassSelection [ MAX_PLAYERS char ],
|
||||
@ -171,6 +172,7 @@ new
|
||||
p_AntiExportCarSpam [ MAX_PLAYERS ],
|
||||
p_AntiMechFlipSpam [ MAX_PLAYERS ],
|
||||
bool: p_inAlcatraz [ MAX_PLAYERS char ],
|
||||
p_AlcatrazSpec [ MAX_PLAYERS ],
|
||||
Text3D: p_TiedLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
p_TiedBy [ MAX_PLAYERS ],
|
||||
p_BlowjobPrice [ MAX_PLAYERS ],
|
||||
|
@ -42,8 +42,6 @@ new
|
||||
/* ** Hooks ** */
|
||||
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");
|
||||
TextDrawBackgroundColor(g_currentXPTD, 255);
|
||||
TextDrawFont(g_currentXPTD, 3);
|
||||
@ -137,6 +135,7 @@ hook OnScriptInit( )
|
||||
TextDrawColor(g_MotdTD, -1);
|
||||
TextDrawSetOutline(g_MotdTD, 1);
|
||||
TextDrawSetProportional(g_MotdTD, 1);
|
||||
TextDrawSetString( g_MotdTD, "~w~Want more ~g~money~w~, ~r~houses~w~, and ~b~vehicles~w~? Consider donating! ~y~/vip" );
|
||||
|
||||
g_ObjectLoadTD = TextDrawCreate(320.000000, 148.000000, "Loading Objects...~n~Please Wait...");
|
||||
TextDrawAlignment(g_ObjectLoadTD, 2);
|
||||
|
@ -18,7 +18,7 @@
|
||||
#define SERVER_TWITTER "IrresistibleDev"
|
||||
|
||||
/* ** Comment line to disable feature ** */
|
||||
#define SERVER_RULES_URL "files.sfcnr.com/en_rules.txt" // used for /rules (cnr\features\server_rules.pwn)
|
||||
//#define SERVER_RULES_URL "files.sfcnr.com/en_rules.txt" // used for /rules (cnr\features\server_rules.pwn)
|
||||
#define SERVER_TWITTER_FEED_URL "files.sfcnr.com/cnr_twitter.php" // used for /twitter (cnr\commands\cmd_twitter.pwn)
|
||||
#define SERVER_HELP_API_URL "sfcnr.com/api/player/help" // used for /help (cnr\commands\cmd_help.pwn)
|
||||
#define SERVER_CHANGES_DIRECTORY "changelogs/cnr" // used for /changes (cnr\changelog.pwn)
|
||||
|
@ -3,7 +3,7 @@
|
||||
* San Fierro: Cops and Robbers
|
||||
*
|
||||
* Original Creator: Lorenc_
|
||||
* Contributors: Stev
|
||||
* Contributors: Damen, Stev
|
||||
*
|
||||
* Thanks to: y_less/zeex/Frosha/Incognito/SA-MP team
|
||||
*
|
||||
@ -478,11 +478,12 @@ public OnPlayerDisconnect( playerid, reason )
|
||||
CutSpectation( playerid );
|
||||
LeavePlayerPaintball( playerid );
|
||||
RemovePlayerFromRace( playerid );
|
||||
//p_Detained { playerid } = false;
|
||||
p_Detained { playerid } = false;
|
||||
p_Tied { playerid } = false;
|
||||
p_Kidnapped { playerid } = false;
|
||||
p_Wood [ playerid ] = 0;
|
||||
p_inAlcatraz { playerid } = false;
|
||||
p_AlcatrazSpec [ playerid ] = 0;
|
||||
p_Ropes [ playerid ] = 0;
|
||||
p_Scissors [ playerid ] = 0;
|
||||
p_Fires [ playerid ] = 0;
|
||||
@ -531,7 +532,7 @@ public OnPlayerDisconnect( playerid, reason )
|
||||
p_PmResponder [ playerid ] = INVALID_PLAYER_ID;
|
||||
p_ViewingStats [ playerid ] = INVALID_PLAYER_ID;
|
||||
p_Spectating { playerid } = false;
|
||||
//p_DetainedBy [ playerid ] = INVALID_PLAYER_ID;
|
||||
p_DetainedBy [ playerid ] = INVALID_PLAYER_ID;
|
||||
p_GangID [ playerid ] = INVALID_GANG_ID;
|
||||
p_InfectedHIV { playerid } = false;
|
||||
p_OwnedHouses [ playerid ] = 0;
|
||||
@ -585,8 +586,8 @@ public OnPlayerDisconnect( playerid, reason )
|
||||
p_AntiTextSpamCount{ playerid } = 0;
|
||||
Delete3DTextLabel( p_AdminLabel[ playerid ] );
|
||||
p_AdminLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||
//Delete3DTextLabel( p_DetainedLabel[ playerid ] );
|
||||
//p_DetainedLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||
Delete3DTextLabel( p_DetainedLabel[ playerid ] );
|
||||
p_DetainedLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||
Delete3DTextLabel( p_TiedLabel[ playerid ] );
|
||||
p_TiedLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||
DestroyDynamic3DTextLabel( p_WeedLabel[ playerid ] );
|
||||
@ -4355,6 +4356,7 @@ public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
||||
if ( IsPlayerConnected( i ) && IsPlayerSpawned( i ) && !p_Spectating{ i } && i != playerid )
|
||||
{
|
||||
ForceSpectateOnPlayer( playerid, i );
|
||||
p_AlcatrazSpec[ playerid ] = g_iTime + 10;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -4366,6 +4368,7 @@ public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
||||
if ( IsPlayerConnected( i ) && IsPlayerSpawned( i ) && !p_Spectating{ i } && i != playerid )
|
||||
{
|
||||
ForceSpectateOnPlayer( playerid, i );
|
||||
p_AlcatrazSpec[ playerid ] = g_iTime + 10;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
v11.55.182
|
||||
v11.55.180
|
||||
v11.55.174
|
||||
v11.55.168
|
||||
v11.54.157
|
||||
v11.53.154
|
||||
|
6
scriptfiles/changelogs/cnr/v11.55.174.txt
Normal file
6
scriptfiles/changelogs/cnr/v11.55.174.txt
Normal file
@ -0,0 +1,6 @@
|
||||
(+) /detain and it's dropoff points are now active.
|
||||
(/) City Harpoints have been adjusted to only fit the inner-city limits.
|
||||
(/) XP Market and /perks are now based off Deathmatch and Robbery XP.
|
||||
(*) Fixes the ID requirement for /taze, /cuff, and /arrest
|
||||
(*) Detain no longer requires an ID to be put into the parameters.
|
||||
(*) The server no longer thinks a player being detained is a cheating individual.
|
7
scriptfiles/changelogs/cnr/v11.55.180.txt
Normal file
7
scriptfiles/changelogs/cnr/v11.55.180.txt
Normal file
@ -0,0 +1,7 @@
|
||||
(+) Adds /(bc)breakcuffs back as a command.
|
||||
(/) Lowers the successful /bc attempt down from 75% to 50%.
|
||||
(/) /healall only heals players within the admin's world.
|
||||
(*) /rules has been updated.
|
||||
(*) Administrators should no longer get wanted after spectating a jailed player in Alcatraz.
|
||||
(*) Business banks are withdrawn upon selling a business.
|
||||
(-) You can no longer place vehicle spike strips with a keypress.
|
3
scriptfiles/changelogs/cnr/v11.55.182.txt
Normal file
3
scriptfiles/changelogs/cnr/v11.55.182.txt
Normal file
@ -0,0 +1,3 @@
|
||||
(+) Easter Egg treasure hunts are not happening for Easter! /treasures
|
||||
(*) Fixed an issue with being detained and then /bc'ing out of it.
|
||||
(*) Fixed an issue with /bc throwing an "Invalid Command" message when failing.
|
Loading…
Reference in New Issue
Block a user