Merge pull request #1 from basicDamen/passive-mode-removal
Passive Mode Removal, LEO CMD Health Check, and Adjustments
This commit is contained in:
commit
992cbdd83e
@ -210,7 +210,6 @@
|
|||||||
#define DIALOG_COMPONENTS_SELL 1200
|
#define DIALOG_COMPONENTS_SELL 1200
|
||||||
#define DIALOG_HOUSE_SELL 1201
|
#define DIALOG_HOUSE_SELL 1201
|
||||||
#define DIALOG_BUSINESS_SELL_CONFIRM 1202
|
#define DIALOG_BUSINESS_SELL_CONFIRM 1202
|
||||||
//#define DIALOG_PASSIVE_MODE 1203
|
|
||||||
#define DIALOG_NEXT_PAGE_VIP 1204
|
#define DIALOG_NEXT_PAGE_VIP 1204
|
||||||
|
|
||||||
/* ** Hooks ** */
|
/* ** Hooks ** */
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include "irresistible\cnr\features\ammunation.pwn"
|
#include "irresistible\cnr\features\ammunation.pwn"
|
||||||
#include "irresistible\cnr\features\game_day.pwn"
|
#include "irresistible\cnr\features\game_day.pwn"
|
||||||
#include "irresistible\cnr\features\movie_mode.pwn"
|
#include "irresistible\cnr\features\movie_mode.pwn"
|
||||||
#include "irresistible\cnr\features\passive_mode.pwn"
|
#include "irresistible\cnr\features\anti-spawn_kill.pwn"
|
||||||
#include "irresistible\cnr\features\server_rules.pwn"
|
#include "irresistible\cnr\features\server_rules.pwn"
|
||||||
#include "irresistible\cnr\features\toys.pwn"
|
#include "irresistible\cnr\features\toys.pwn"
|
||||||
#include "irresistible\cnr\features\fps.pwn"
|
#include "irresistible\cnr\features\fps.pwn"
|
||||||
|
68
gamemodes/irresistible/cnr/features/anti-spawn_kill.pwn
Normal file
68
gamemodes/irresistible/cnr/features/anti-spawn_kill.pwn
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
* Irresistible Gaming (c) 2018
|
||||||
|
* Developed by Lorenc - adjusted by Damen to remove passive mode
|
||||||
|
* Module: cnr\features\anti-spawn_kill.pwn
|
||||||
|
* Purpose: anti-spawn kill
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ** Includes ** */
|
||||||
|
#include < YSI\y_hooks >
|
||||||
|
|
||||||
|
/* ** Variables ** */
|
||||||
|
static stock
|
||||||
|
Text3D: p_SpawnKillLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||||
|
p_AntiSpawnKill [ MAX_PLAYERS ],
|
||||||
|
bool: p_AntiSpawnKillEnabled [ MAX_PLAYERS char ]
|
||||||
|
;
|
||||||
|
|
||||||
|
/* ** Hooks ** */
|
||||||
|
hook OnPlayerUpdateEx( playerid )
|
||||||
|
{
|
||||||
|
// Remove Anti-Spawn Kill
|
||||||
|
if ( p_AntiSpawnKillEnabled{ playerid } && g_iTime > p_AntiSpawnKill[ playerid ] ) {
|
||||||
|
DisablePlayerSpawnProtection( playerid );
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
hook OnPlayerSpawn( playerid )
|
||||||
|
{
|
||||||
|
if ( ! IsPlayerInPaintBall( playerid ) )
|
||||||
|
{
|
||||||
|
// Toggle Anti Spawn Kill
|
||||||
|
DisableRemoteVehicleCollisions( playerid, p_AdminOnDuty{ playerid } );
|
||||||
|
SetPlayerHealth( playerid, INVALID_PLAYER_ID );
|
||||||
|
Delete3DTextLabel( p_SpawnKillLabel[ playerid ] );
|
||||||
|
p_SpawnKillLabel[ playerid ] = Create3DTextLabel( "Spawn Protected!", COLOR_GOLD, 0.0, 0.0, 0.0, 15.0, 0 );
|
||||||
|
p_AntiSpawnKill[ playerid ] = g_iTime + 15;
|
||||||
|
Attach3DTextLabelToPlayer( p_SpawnKillLabel[ playerid ], playerid, 0.0, 0.0, 0.3 );
|
||||||
|
p_AntiSpawnKillEnabled{ playerid } = true;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
hook OnPlayerDisconnect( playerid, reason )
|
||||||
|
{
|
||||||
|
Delete3DTextLabel( p_SpawnKillLabel[ playerid ] );
|
||||||
|
p_SpawnKillLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||||
|
p_AntiSpawnKillEnabled{ playerid } = false;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ** Functions ** */
|
||||||
|
stock DisablePlayerSpawnProtection( playerid, Float: default_health = 100.0 )
|
||||||
|
{
|
||||||
|
if ( p_AntiSpawnKillEnabled{ playerid } )
|
||||||
|
{
|
||||||
|
SetPlayerHealth( playerid, p_AdminOnDuty{ playerid } ? float( INVALID_PLAYER_ID ) : default_health );
|
||||||
|
DisableRemoteVehicleCollisions( playerid, p_AdminOnDuty{ playerid } );
|
||||||
|
Delete3DTextLabel( p_SpawnKillLabel[ playerid ] );
|
||||||
|
p_SpawnKillLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||||
|
p_AntiSpawnKillEnabled{ playerid } = false;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
stock IsPlayerSpawnProtected( playerid ) {
|
||||||
|
return p_AntiSpawnKillEnabled{ playerid };
|
||||||
|
}
|
@ -320,7 +320,6 @@ hook SetPlayerRandomSpawn( playerid )
|
|||||||
SetPlayerPos( playerid, X, Y, Z - 2.0 );
|
SetPlayerPos( playerid, X, Y, Z - 2.0 );
|
||||||
SetPlayerVirtualWorld( playerid, BR_GetWorld( lobbyid ) );
|
SetPlayerVirtualWorld( playerid, BR_GetWorld( lobbyid ) );
|
||||||
|
|
||||||
ResetPlayerPassiveMode( playerid, true );
|
|
||||||
DisablePlayerSpawnProtection( playerid, .default_health = br_lobbyData[ lobbyid ] [ E_HEALTH ] );
|
DisablePlayerSpawnProtection( playerid, .default_health = br_lobbyData[ lobbyid ] [ E_HEALTH ] );
|
||||||
|
|
||||||
SetPlayerHealth( playerid, br_lobbyData[ lobbyid ] [ E_HEALTH ] );
|
SetPlayerHealth( playerid, br_lobbyData[ lobbyid ] [ E_HEALTH ] );
|
||||||
@ -822,7 +821,6 @@ static stock BattleRoyale_RespawnPlayer( playerid )
|
|||||||
SetPlayerPos( playerid, BR_CHECKPOINT_POS[ 0 ], BR_CHECKPOINT_POS[ 1 ], BR_CHECKPOINT_POS[ 2 ] );
|
SetPlayerPos( playerid, BR_CHECKPOINT_POS[ 0 ], BR_CHECKPOINT_POS[ 1 ], BR_CHECKPOINT_POS[ 2 ] );
|
||||||
SetPlayerVirtualWorld( playerid, 0 );
|
SetPlayerVirtualWorld( playerid, 0 );
|
||||||
SetPlayerInterior( playerid, 0 );
|
SetPlayerInterior( playerid, 0 );
|
||||||
SetPlayerPassiveMode( playerid );
|
|
||||||
|
|
||||||
// reset the respawn variable
|
// reset the respawn variable
|
||||||
p_waitingForRespawn{ playerid } = false;
|
p_waitingForRespawn{ playerid } = false;
|
||||||
|
@ -506,13 +506,6 @@ hook OnPlayerDriveVehicle( playerid, vehicleid )
|
|||||||
{
|
{
|
||||||
if ( g_isBusinessVehicle[ vehicleid ] != -1 && Iter_Contains( business, g_isBusinessVehicle[ vehicleid ] ) )
|
if ( g_isBusinessVehicle[ vehicleid ] != -1 && Iter_Contains( business, g_isBusinessVehicle[ vehicleid ] ) )
|
||||||
{
|
{
|
||||||
if ( IsPlayerPassive( playerid ) )
|
|
||||||
{
|
|
||||||
ShowPlayerHelpDialog( playerid, 2000, "Passive players cannot enter business vehicles." );
|
|
||||||
SyncObject( playerid );
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
new
|
new
|
||||||
businessid = g_isBusinessVehicle[ vehicleid ];
|
businessid = g_isBusinessVehicle[ vehicleid ];
|
||||||
|
|
||||||
|
@ -174,7 +174,6 @@ CMD:c4( playerid, params[ ] )
|
|||||||
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." );
|
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." );
|
||||||
if ( IsPlayerInCasino( playerid ) ) return SendError( playerid, "You cannot use this command since you're in a casino." );
|
if ( IsPlayerInCasino( playerid ) ) return SendError( playerid, "You cannot use this command since you're in a casino." );
|
||||||
if ( IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an arena." );
|
if ( IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an arena." );
|
||||||
if ( IsPlayerPassive( playerid ) ) return SendError( playerid, "You cannot use this command as an innocent player in passive mode." );
|
|
||||||
if ( p_C4Amount[ playerid ] < 1 ) return SendError( playerid, "You don't have any C4's" );
|
if ( p_C4Amount[ playerid ] < 1 ) return SendError( playerid, "You don't have any C4's" );
|
||||||
|
|
||||||
#if defined __cnr__chuffsec
|
#if defined __cnr__chuffsec
|
||||||
|
@ -243,6 +243,7 @@ stock TazePlayer( victimid, playerid )
|
|||||||
if ( IsPlayerInAnyVehicle( victimid ) ) return SendError( playerid, "This player is in a vehicle " );
|
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 ( 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 ( IsPlayerTazed( victimid ) ) return SendError( playerid, "This player is already tazed." );
|
||||||
|
if ( ReturnPlayerHealth( victimid ) <= 0.0 ) return SendError( playerid, "This player is dead." );
|
||||||
//if ( IsPlayerCuffed( victimid ) ) return SendError( playerid, "This player is already cuffed." );
|
//if ( IsPlayerCuffed( victimid ) ) return SendError( playerid, "This player is already cuffed." );
|
||||||
//if ( IsPlayerDetained( victimid ) ) return SendError( playerid, "This player is already detained." );
|
//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 ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." );
|
||||||
@ -296,6 +297,7 @@ stock ArrestPlayer( victimid, playerid )
|
|||||||
if ( p_WantedLevel[ victimid ] == 0 ) return SendError( playerid, "This player is innocent!" );
|
if ( p_WantedLevel[ victimid ] == 0 ) return SendError( playerid, "This player is innocent!" );
|
||||||
if ( !IsPlayerCuffed( victimid ) ) return SendError( playerid, "This player is not cuffed." );
|
if ( !IsPlayerCuffed( victimid ) ) return SendError( playerid, "This player is not cuffed." );
|
||||||
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You are kidnapped, you cannot do this." );
|
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You are kidnapped, you cannot do this." );
|
||||||
|
if ( ReturnPlayerHealth( victimid ) <= 0.0 ) return SendError( playerid, "This player is dead." );
|
||||||
//if ( IsPlayerDetained( victimid ) ) return SendError( playerid, "This player is detained, you cannot arrest them." );
|
//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 ( 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 ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." );
|
||||||
@ -356,6 +358,7 @@ stock CuffPlayer( victimid, playerid )
|
|||||||
if ( p_WantedLevel[ victimid ] == 0 ) return SendError( playerid, "This player is innocent!" );
|
if ( p_WantedLevel[ victimid ] == 0 ) return SendError( playerid, "This player is innocent!" );
|
||||||
if ( p_WantedLevel[ victimid ] < 6 ) return SendError( playerid, "This person isn't worth cuffing, ticket them." );
|
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 ( IsPlayerInAnyVehicle( victimid ) ) return SendError( playerid, "This player is in a vehicle " );
|
||||||
|
if ( ReturnPlayerHealth( victimid ) <= 0.0 ) return SendError( playerid, "This player is dead." );
|
||||||
//if ( IsPlayerDetained( victimid ) ) return SendError( playerid, "This player is already detained." );
|
//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 ( 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 ( IsPlayerCuffed( victimid ) ) return SendError( playerid, "This player is already cuffed." );
|
||||||
@ -443,7 +446,7 @@ function Uncuff( playerid )
|
|||||||
|
|
||||||
stock BreakPlayerCuffs( playerid )
|
stock BreakPlayerCuffs( playerid )
|
||||||
{
|
{
|
||||||
if ( !IsPlayerConnected( playerid ) ) return false;
|
if ( !IsPlayerConnected( playerid ) || ReturnPlayerHealth( playerid ) <= 0 ) return false;
|
||||||
|
|
||||||
if ( p_BobbyPins[ playerid ] < 1 )
|
if ( p_BobbyPins[ playerid ] < 1 )
|
||||||
{
|
{
|
||||||
@ -496,7 +499,7 @@ function BreakPlayerCuffsAttempt( playerid ) return BreakPlayerCuffs( playerid )
|
|||||||
|
|
||||||
stock AwardNearestLEO( playerid, reason )
|
stock AwardNearestLEO( playerid, reason )
|
||||||
{
|
{
|
||||||
if ( ! IsPlayerConnected( playerid ) || playerid == INVALID_PLAYER_ID || GetPlayerWantedLevel( playerid ) < 2 )
|
if ( ! IsPlayerConnected( playerid ) || playerid == INVALID_PLAYER_ID || GetPlayerWantedLevel( playerid ) < 2 || ReturnPlayerHealth( playerid ) <= 0 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
new Float: radius = ( IsPlayerInAnyVehicle( playerid ) ? 150.0 : 75.0 ); // If player is in a vehicle, increase radius due to ability to get farther quicker.
|
new Float: radius = ( IsPlayerInAnyVehicle( playerid ) ? 150.0 : 75.0 ); // If player is in a vehicle, increase radius due to ability to get farther quicker.
|
||||||
|
@ -565,9 +565,6 @@ CMD:sync( playerid, params[ ] )
|
|||||||
if ( GetPlayerWeapon( playerid ) == WEAPON_SNIPER )
|
if ( GetPlayerWeapon( playerid ) == WEAPON_SNIPER )
|
||||||
return SendError( playerid, "You cannot synchronize yourself holding a sniper." );
|
return SendError( playerid, "You cannot synchronize yourself holding a sniper." );
|
||||||
|
|
||||||
if ( IsPlayerPassive( playerid ) )
|
|
||||||
return SendError( playerid, "You cannot use this feature while in passive mode." );
|
|
||||||
|
|
||||||
if ( IsPlayerInBattleRoyale( playerid ) )
|
if ( IsPlayerInBattleRoyale( playerid ) )
|
||||||
return SendError( playerid, "You cannot use this command while in Battle Royale." );
|
return SendError( playerid, "You cannot use this command while in Battle Royale." );
|
||||||
|
|
||||||
|
@ -545,7 +545,7 @@ stock Turf_IsAbleToTakeover( i ) {
|
|||||||
Float: Z;
|
Float: Z;
|
||||||
|
|
||||||
GetPlayerPos( i, Z, Z, Z );
|
GetPlayerPos( i, Z, Z, Z );
|
||||||
return p_Class[ i ] == CLASS_CIVILIAN && ! IsPlayerSpawnProtected( i ) && ! IsPlayerPassive( i ) && ! IsPlayerAdminOnDuty( i ) && GetPlayerState( i ) != PLAYER_STATE_SPECTATING && ! IsPlayerAFK( i ) && Z <= 250.0;
|
return p_Class[ i ] == CLASS_CIVILIAN && ! IsPlayerSpawnProtected( i ) && ! IsPlayerAdminOnDuty( i ) && GetPlayerState( i ) != PLAYER_STATE_SPECTATING && ! IsPlayerAFK( i ) && Z <= 250.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
stock Turf_HideAllGangZones( playerid )
|
stock Turf_HideAllGangZones( playerid )
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include < YSI\y_hooks >
|
#include < YSI\y_hooks >
|
||||||
|
|
||||||
/* ** Definitions ** */
|
/* ** Definitions ** */
|
||||||
#define MAX_SETTINGS ( 13 )
|
#define MAX_SETTINGS ( 12 )
|
||||||
|
|
||||||
#define SETTING_BAILOFFERS ( 0 )
|
#define SETTING_BAILOFFERS ( 0 )
|
||||||
#define SETTING_EVENT_TP ( 1 )
|
#define SETTING_EVENT_TP ( 1 )
|
||||||
@ -23,14 +23,13 @@
|
|||||||
#define SETTING_COINS_BAR ( 9 )
|
#define SETTING_COINS_BAR ( 9 )
|
||||||
#define SETTING_TOP_DONOR ( 10 )
|
#define SETTING_TOP_DONOR ( 10 )
|
||||||
#define SETTING_WEAPON_PICKUP ( 11 )
|
#define SETTING_WEAPON_PICKUP ( 11 )
|
||||||
#define SETTING_PASSIVE_MODE ( 12 )
|
|
||||||
|
|
||||||
/* ** Variables ** */
|
/* ** Variables ** */
|
||||||
static stock
|
static stock
|
||||||
g_PlayerSettings [ MAX_SETTINGS ] [ 24 ] = {
|
g_PlayerSettings [ MAX_SETTINGS ] [ 24 ] = {
|
||||||
{ "Prevent Bail Offers" }, { "Prevent Event Teleports" }, { "Prevent Gang Invites" }, { "Prevent Chat Prefixes" }, { "Prevent Ransom Offers" },
|
{ "Prevent Bail Offers" }, { "Prevent Event Teleports" }, { "Prevent Gang Invites" }, { "Prevent Chat Prefixes" }, { "Prevent Ransom Offers" },
|
||||||
{ "Display User ID In Chat" }, { "Display Connection Log" }, { "Display Hitmarker" }, { "Set V.I.P Skin" }, { "Hide Total Coin Bar" }, { "Hide Last Donor Text" },
|
{ "Display User ID In Chat" }, { "Display Connection Log" }, { "Display Hitmarker" }, { "Set V.I.P Skin" }, { "Hide Total Coin Bar" }, { "Hide Last Donor Text" },
|
||||||
{ "Manual Pickup Weapon" }, { "Prevent Passive Mode" }
|
{ "Manual Pickup Weapon" }
|
||||||
},
|
},
|
||||||
bool: p_PlayerSettings [ MAX_PLAYERS ] [ MAX_SETTINGS char ]
|
bool: p_PlayerSettings [ MAX_PLAYERS ] [ MAX_SETTINGS char ]
|
||||||
;
|
;
|
||||||
@ -38,7 +37,6 @@ static stock
|
|||||||
/* ** Hooks ** */
|
/* ** Hooks ** */
|
||||||
hook OnPlayerRegister( playerid )
|
hook OnPlayerRegister( playerid )
|
||||||
{
|
{
|
||||||
TogglePlayerSetting( playerid, SETTING_PASSIVE_MODE, true ); // remove passive mode by default
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,10 +72,6 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
|||||||
HidePlayerTogglableTextdraws( playerid, .force = false );
|
HidePlayerTogglableTextdraws( playerid, .force = false );
|
||||||
ShowPlayerTogglableTextdraws( playerid, .force = false );
|
ShowPlayerTogglableTextdraws( playerid, .force = false );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*else if ( settingid == SETTING_PASSIVE_MODE ) {
|
|
||||||
ResetPlayerPassiveMode( playerid, .passive_disabled = true ); // avoid abusing
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
else // setting is not being toggled
|
else // setting is not being toggled
|
||||||
{
|
{
|
||||||
@ -85,9 +79,6 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
|||||||
HidePlayerTogglableTextdraws( playerid, .force = false );
|
HidePlayerTogglableTextdraws( playerid, .force = false );
|
||||||
ShowPlayerTogglableTextdraws( playerid, .force = false );
|
ShowPlayerTogglableTextdraws( playerid, .force = false );
|
||||||
}
|
}
|
||||||
/*else if ( settingid == SETTING_PASSIVE_MODE ) {
|
|
||||||
ResetPlayerPassiveMode( playerid, .passive_disabled = true ); // avoid abusing
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TogglePlayerSetting( playerid, settingid, ! p_PlayerSettings[ playerid ] { settingid } );
|
TogglePlayerSetting( playerid, settingid, ! p_PlayerSettings[ playerid ] { settingid } );
|
||||||
@ -165,36 +156,6 @@ CMD:controlpanel( playerid, params[ ] )
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
CMD:rpmode( playerid, params[ ] ) return cmd_passive( playerid, params );
|
|
||||||
CMD:passivemode( playerid, params[ ] ) return cmd_passive( playerid, params );
|
|
||||||
CMD:passive( playerid, params[ ] )
|
|
||||||
{
|
|
||||||
CallLocalFunction( "OnDialogResponse", "dddds", playerid, DIALOG_CP_MENU, 1, SETTING_PASSIVE_MODE + 1, "ignore" ); // cunning way
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
CMD:passivelist( playerid, params[ ] )
|
|
||||||
{
|
|
||||||
new
|
|
||||||
count = 0;
|
|
||||||
|
|
||||||
szBigString[ 0 ] = '\0';
|
|
||||||
|
|
||||||
foreach ( new i : Player )
|
|
||||||
{
|
|
||||||
if ( IsPlayerPassive( i ) )
|
|
||||||
{
|
|
||||||
format( szBigString, sizeof( szBigString ), "%s%s(%d)\n", szBigString, ReturnPlayerName( i ), i );
|
|
||||||
count ++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( count == 0 )
|
|
||||||
return SendError( playerid, "There is currently no players in passive mode." );
|
|
||||||
else
|
|
||||||
return ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_LIST, ""COL_WHITE"Passive List", szBigString, "Close", "" ), 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ** Functions ** */
|
/* ** Functions ** */
|
||||||
static stock ShowPlayerTogglableTextdraws( playerid, bool: force = false )
|
static stock ShowPlayerTogglableTextdraws( playerid, bool: force = false )
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,7 @@ hook OnServerGameDayEnd( )
|
|||||||
for ( new playerid = 0; playerid < sizeof( ignored_players ); playerid ++ )
|
for ( new playerid = 0; playerid < sizeof( ignored_players ); playerid ++ )
|
||||||
{
|
{
|
||||||
// remove unconnected / npcs / aod / low score
|
// remove unconnected / npcs / aod / low score
|
||||||
if ( ! IsPlayerConnected( playerid ) || IsPlayerNPC( playerid ) || IsPlayerAdminOnDuty( playerid ) || GetPlayerScore( playerid ) < 25 || IsPlayerAFK( playerid ) || IsPlayerPassive( playerid ) )
|
if ( ! IsPlayerConnected( playerid ) || IsPlayerNPC( playerid ) || IsPlayerAdminOnDuty( playerid ) || GetPlayerScore( playerid ) < 25 || IsPlayerAFK( playerid ) )
|
||||||
{
|
{
|
||||||
ignored_players[ playerid ] = playerid;
|
ignored_players[ playerid ] = playerid;
|
||||||
continue;
|
continue;
|
||||||
|
@ -68,7 +68,6 @@ static stock
|
|||||||
{ "{8ADE47}Stephanie:"COL_WHITE" Race your friends in a street race or outrun race by using "COL_GREY"/race"COL_WHITE"!" },
|
{ "{8ADE47}Stephanie:"COL_WHITE" Race your friends in a street race or outrun race by using "COL_GREY"/race"COL_WHITE"!" },
|
||||||
{ "{8ADE47}Stephanie:"COL_WHITE" Want 3 days of free V.I.P? Add an "COL_GREY"/email"COL_WHITE" to your account!" },
|
{ "{8ADE47}Stephanie:"COL_WHITE" Want 3 days of free V.I.P? Add an "COL_GREY"/email"COL_WHITE" to your account!" },
|
||||||
{ "{8ADE47}Stephanie:"COL_WHITE" Contribute to our feature "COL_GREY"/crowdfunds"COL_WHITE"! Early supporters get benefits!" },
|
{ "{8ADE47}Stephanie:"COL_WHITE" Contribute to our feature "COL_GREY"/crowdfunds"COL_WHITE"! Early supporters get benefits!" },
|
||||||
{ "{8ADE47}Stephanie:"COL_WHITE" Don't want to be interrupted as an innocent player? Enter passive mode with "COL_GREY"/passive"COL_WHITE"!" },
|
|
||||||
{ "{8ADE47}Stephanie:"COL_WHITE" You can buy premium player homes using "COL_GREY"/estate"COL_WHITE"!" },
|
{ "{8ADE47}Stephanie:"COL_WHITE" You can buy premium player homes using "COL_GREY"/estate"COL_WHITE"!" },
|
||||||
{ "{8ADE47}Stephanie:"COL_WHITE" You can buy Irresistible Coins from players using "COL_GREY"/ic buy"COL_WHITE"!" },
|
{ "{8ADE47}Stephanie:"COL_WHITE" You can buy Irresistible Coins from players using "COL_GREY"/ic buy"COL_WHITE"!" },
|
||||||
{ "{8ADE47}Stephanie:"COL_WHITE" Buy a secure wallet to reduce the amount of money you drop when you die!" }
|
{ "{8ADE47}Stephanie:"COL_WHITE" Buy a secure wallet to reduce the amount of money you drop when you die!" }
|
||||||
|
@ -146,10 +146,6 @@ hook OnPlayerPickUpDynPickup( playerid, pickupid )
|
|||||||
{
|
{
|
||||||
if ( g_weaponDropData[ dropid ] [ E_PICKUP ] == pickupid )
|
if ( g_weaponDropData[ dropid ] [ E_PICKUP ] == pickupid )
|
||||||
{
|
{
|
||||||
// if player is in passive mode cannot pickup weapons, ammo
|
|
||||||
if ( IsPlayerPassive( playerid ) )
|
|
||||||
return ShowPlayerHelpDialog( playerid, 2500, "You cannot pick up dropped items in ~r~passive mode." );
|
|
||||||
|
|
||||||
if ( g_weaponDropData[ dropid ] [ E_WEAPON_ID ] == WEAPON_HEALTH )
|
if ( g_weaponDropData[ dropid ] [ E_WEAPON_ID ] == WEAPON_HEALTH )
|
||||||
{
|
{
|
||||||
new
|
new
|
||||||
|
@ -203,10 +203,7 @@ new
|
|||||||
p_TazingImmunity [ MAX_PLAYERS ],
|
p_TazingImmunity [ MAX_PLAYERS ],
|
||||||
p_PlayerAltBind [ MAX_PLAYERS ] = { -1, ... },
|
p_PlayerAltBind [ MAX_PLAYERS ] = { -1, ... },
|
||||||
p_PlayerAltBindTick [ MAX_PLAYERS ],
|
p_PlayerAltBindTick [ MAX_PLAYERS ],
|
||||||
p_AimedAtPolice [ MAX_PLAYERS ],
|
p_AimedAtPolice [ MAX_PLAYERS ]
|
||||||
bool: p_PassiveModeDisabled [ MAX_PLAYERS char ],
|
|
||||||
//p_PassiveModeExpireTimer [ MAX_PLAYERS ] = { -1, ... },
|
|
||||||
Text3D: p_PassiveModeLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID }
|
|
||||||
;
|
;
|
||||||
|
|
||||||
/* ** Getters And Setters** */
|
/* ** Getters And Setters** */
|
||||||
|
@ -16,7 +16,6 @@ new
|
|||||||
Text: g_AchievementTD [ 4 ] = { Text: INVALID_TEXT_DRAW, ... },
|
Text: g_AchievementTD [ 4 ] = { Text: INVALID_TEXT_DRAW, ... },
|
||||||
Text: g_AdminLogTD = Text: INVALID_TEXT_DRAW,
|
Text: g_AdminLogTD = Text: INVALID_TEXT_DRAW,
|
||||||
Text: g_AdminOnDutyTD = Text: INVALID_TEXT_DRAW,
|
Text: g_AdminOnDutyTD = Text: INVALID_TEXT_DRAW,
|
||||||
Text: g_PassiveModeTD = Text: INVALID_TEXT_DRAW,
|
|
||||||
Text: g_DoubleXPTD = Text: INVALID_TEXT_DRAW,
|
Text: g_DoubleXPTD = Text: INVALID_TEXT_DRAW,
|
||||||
Text: g_currentXPTD = Text: INVALID_TEXT_DRAW,
|
Text: g_currentXPTD = Text: INVALID_TEXT_DRAW,
|
||||||
Text: g_CurrentRankTD = Text: INVALID_TEXT_DRAW,
|
Text: g_CurrentRankTD = Text: INVALID_TEXT_DRAW,
|
||||||
@ -166,13 +165,6 @@ hook OnScriptInit( )
|
|||||||
TextDrawSetOutline(g_AdminOnDutyTD, 1);
|
TextDrawSetOutline(g_AdminOnDutyTD, 1);
|
||||||
TextDrawSetProportional(g_AdminOnDutyTD, 1);
|
TextDrawSetProportional(g_AdminOnDutyTD, 1);
|
||||||
|
|
||||||
g_PassiveModeTD = TextDrawCreate(555.000000, 66.500000, "PASSIVE MODE" );
|
|
||||||
TextDrawBackgroundColor(g_PassiveModeTD, 255);
|
|
||||||
TextDrawFont(g_PassiveModeTD, 1);
|
|
||||||
TextDrawLetterSize(g_PassiveModeTD, 0.180000, 0.899999);
|
|
||||||
TextDrawColor(g_PassiveModeTD, COLOR_GREEN);
|
|
||||||
TextDrawSetOutline(g_PassiveModeTD, 1);
|
|
||||||
TextDrawSetProportional(g_PassiveModeTD, 1);
|
|
||||||
return Y_HOOKS_CONTINUE_RETURN_1;
|
return Y_HOOKS_CONTINUE_RETURN_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,14 +47,8 @@ stock CNR_SetPlayerWantedLevel( playerid, level )
|
|||||||
{
|
{
|
||||||
PlayerTextDrawSetString( playerid, p_WantedLevelTD[ playerid ], sprintf( "] %d ]", p_WantedLevel[ playerid ] ) );
|
PlayerTextDrawSetString( playerid, p_WantedLevelTD[ playerid ], sprintf( "] %d ]", p_WantedLevel[ playerid ] ) );
|
||||||
if ( ! IsPlayerMovieMode( playerid ) ) PlayerTextDrawShow( playerid, p_WantedLevelTD[ playerid ] );
|
if ( ! IsPlayerMovieMode( playerid ) ) PlayerTextDrawShow( playerid, p_WantedLevelTD[ playerid ] );
|
||||||
ResetPlayerPassiveMode( playerid, .passive_disabled = true ); // remove passive mode if the player is wanted
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( IsPlayerInAnyVehicle( playerid ) )
|
|
||||||
{
|
|
||||||
new vehicleID = GetPlayerVehicleID( playerid );
|
|
||||||
GivePassivePassengersWanted( playerid, vehicleID );
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PlayerTextDrawHide( playerid, p_WantedLevelTD[ playerid ] );
|
PlayerTextDrawHide( playerid, p_WantedLevelTD[ playerid ] );
|
||||||
@ -81,11 +75,6 @@ stock GivePlayerWantedLevel( playerid, level )
|
|||||||
{
|
{
|
||||||
if ( ! IsPlayerConnected( playerid ) || IsPlayerNPC( playerid ) || IsPlayerJailed( playerid ) || IsPlayerDueling( playerid ) || level == 0 )
|
if ( ! IsPlayerConnected( playerid ) || IsPlayerNPC( playerid ) || IsPlayerJailed( playerid ) || IsPlayerDueling( playerid ) || level == 0 )
|
||||||
return 0;
|
return 0;
|
||||||
else if ( IsPlayerInAnyVehicle( playerid ) )
|
|
||||||
{
|
|
||||||
new vehicleID = GetPlayerVehicleID( playerid );
|
|
||||||
GivePassivePassengersWanted( playerid, vehicleID );
|
|
||||||
}
|
|
||||||
|
|
||||||
new
|
new
|
||||||
current_wanted = GetPlayerWantedLevel( playerid );
|
current_wanted = GetPlayerWantedLevel( playerid );
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
-- CREATE A MIGRATION ENTRY
|
||||||
|
INSERT INTO `DB_MIGRATIONS` (`MIGRATION`) VALUES ('20190401_cnr_remove_passive_mode');
|
||||||
|
|
||||||
|
-- BEGIN
|
||||||
|
|
||||||
|
-- -- REMOVE PASSIVE MODE SETTING
|
||||||
|
DELETE FROM `SETTINGS` WHERE SETTING_ID = 12;
|
@ -931,10 +931,6 @@ public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float: fX, Float:
|
|||||||
|
|
||||||
return ShowPlayerHelpDialog( playerid, 2000, "You cannot damage an innocent player's vehicle unless they have wanted players alongside them!" ), 0;
|
return ShowPlayerHelpDialog( playerid, 2000, "You cannot damage an innocent player's vehicle unless they have wanted players alongside them!" ), 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Passive Players can't damage normal players vehicles
|
|
||||||
if ( IsPlayerPassive( playerid ) )
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1060,10 +1056,6 @@ public OnPlayerTakePlayerDamage( playerid, issuerid, &Float: amount, weaponid, b
|
|||||||
if ( p_Class[ playerid ] == CLASS_POLICE && IsPlayerInAnyVehicle( playerid ) && GetVehicleModel( GetPlayerVehicleID( playerid ) ) == 432 )
|
if ( p_Class[ playerid ] == CLASS_POLICE && IsPlayerInAnyVehicle( playerid ) && GetVehicleModel( GetPlayerVehicleID( playerid ) ) == 432 )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// Passive players cannot damage with vehicles
|
|
||||||
if ( IsPlayerPassive( issuerid ) && IsPlayerInAnyVehicle( issuerid ) )
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
// Anti RDM and gang member damage
|
// Anti RDM and gang member damage
|
||||||
if ( ! IsPlayerInEvent( playerid ) && ! IsPlayerInPaintBall( playerid ) && ! IsPlayerBoxing( playerid ) && ! IsPlayerDueling( playerid ) && ! IsPlayerInBattleRoyale( playerid ) )
|
if ( ! IsPlayerInEvent( playerid ) && ! IsPlayerInPaintBall( playerid ) && ! IsPlayerBoxing( playerid ) && ! IsPlayerDueling( playerid ) && ! IsPlayerInBattleRoyale( playerid ) )
|
||||||
{
|
{
|
||||||
@ -1071,19 +1063,6 @@ public OnPlayerTakePlayerDamage( playerid, issuerid, &Float: amount, weaponid, b
|
|||||||
return ShowPlayerHelpDialog( issuerid, 2000, "You cannot damage your homies!" ), 0;
|
return ShowPlayerHelpDialog( issuerid, 2000, "You cannot damage your homies!" ), 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Passive mode enabled for player?
|
|
||||||
if ( IsPlayerPassive( issuerid ) ) {
|
|
||||||
/*if ( p_PassiveModeExpireTimer[ issuerid ] == -1 ) {
|
|
||||||
p_PassiveModeExpireTimer[ issuerid ] = PassiveMode_Reset( issuerid, 4 ); // it will just set it to anything but -1 for now
|
|
||||||
}*/
|
|
||||||
return ShowPlayerHelpDialog( issuerid, 2000, "~r~You cannot deathmatch with /passive enabled." ), 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Passive mode enabled for damaged id?
|
|
||||||
if ( IsPlayerPassive( playerid ) ) {
|
|
||||||
return ShowPlayerHelpDialog( issuerid, 2000, "This player has passive mode ~g~enabled." ), 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Anti Random Deathmatch
|
// Anti Random Deathmatch
|
||||||
if ( IsRandomDeathmatch( issuerid, playerid ) ) {
|
if ( IsRandomDeathmatch( issuerid, playerid ) ) {
|
||||||
return ShowPlayerHelpDialog( issuerid, 2000, "This player cannot be ~r~random deathmatched." ), 0;
|
return ShowPlayerHelpDialog( issuerid, 2000, "This player cannot be ~r~random deathmatched." ), 0;
|
||||||
@ -2013,8 +1992,6 @@ CMD:robitems( playerid, params[ ] )
|
|||||||
else if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." );
|
else if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." );
|
||||||
else if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." );
|
else if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." );
|
||||||
else if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." );
|
else if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." );
|
||||||
else if ( IsPlayerPassive( victimid ) ) return SendError( playerid, "You cannot use this command on passive mode players." );
|
|
||||||
else if ( IsPlayerPassive( playerid ) ) return SendError( playerid, "You cannot use this command as a passive mode player." );
|
|
||||||
|
|
||||||
SetPVarInt( playerid, "robitems_timestamp", g_iTime + 60 );
|
SetPVarInt( playerid, "robitems_timestamp", g_iTime + 60 );
|
||||||
GivePlayerWantedLevel( playerid, 4 );
|
GivePlayerWantedLevel( playerid, 4 );
|
||||||
@ -2968,8 +2945,6 @@ CMD:sellgun( playerid, params[ ] )
|
|||||||
else if ( p_Jailed{ pID } ) return SendError( playerid, "This player is jailed, you cannot sell weapons to him." );
|
else if ( p_Jailed{ pID } ) return SendError( playerid, "This player is jailed, you cannot sell weapons to him." );
|
||||||
else if ( IsPlayerInPaintBall( pID ) || IsPlayerDueling( pID ) ) return SendError( playerid, "You can't sell weapons in an arena." );
|
else if ( IsPlayerInPaintBall( pID ) || IsPlayerDueling( pID ) ) return SendError( playerid, "You can't sell weapons in an arena." );
|
||||||
else if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an event." );
|
else if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an event." );
|
||||||
else if ( IsPlayerPassive( pID ) ) return SendError( playerid, "You cannot use this command on passive mode players." );
|
|
||||||
else if ( IsPlayerPassive( playerid ) ) return SendError( playerid, "You cannot use this command as a passive mode player." );
|
|
||||||
else if ( GetDistanceBetweenPlayers( playerid, pID ) < 5.0 )
|
else if ( GetDistanceBetweenPlayers( playerid, pID ) < 5.0 )
|
||||||
{
|
{
|
||||||
SendClientMessageFormatted( pID, -1, ""COL_ORANGE"[WEAPON DEAL]{FFFFFF} %s(%d) wishes to sell you weapons. "COL_ORANGE"/viewguns{FFFFFF} to view the available weapons.", ReturnPlayerName( playerid ), playerid );
|
SendClientMessageFormatted( pID, -1, ""COL_ORANGE"[WEAPON DEAL]{FFFFFF} %s(%d) wishes to sell you weapons. "COL_ORANGE"/viewguns{FFFFFF} to view the available weapons.", ReturnPlayerName( playerid ), playerid );
|
||||||
@ -3598,8 +3573,6 @@ CMD:kidnap( playerid, params[ ] )
|
|||||||
else if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." );
|
else if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." );
|
||||||
else if ( IsPlayerInMinigame( playerid ) ) return SendError( playerid, "You cannot use this command at the moment." );
|
else if ( IsPlayerInMinigame( playerid ) ) return SendError( playerid, "You cannot use this command at the moment." );
|
||||||
else if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." );
|
else if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." );
|
||||||
else if ( IsPlayerPassive( victimid ) ) return SendError( playerid, "You cannot use this command on passive mode players." );
|
|
||||||
else if ( IsPlayerPassive( playerid ) ) return SendError( playerid, "You cannot use this command as a passive mode player." );
|
|
||||||
else if ( p_KidnapImmunity[ victimid ] > g_iTime ) return SendError( playerid, "This player cannot be kidnapped for another %s.", secondstotime( p_KidnapImmunity[ victimid ] - g_iTime ) );
|
else if ( p_KidnapImmunity[ victimid ] > g_iTime ) return SendError( playerid, "This player cannot be kidnapped for another %s.", secondstotime( p_KidnapImmunity[ victimid ] - g_iTime ) );
|
||||||
else if ( PutPlayerInEmptyVehicleSeat( p_LastVehicle[ playerid ], victimid ) == -1 ) return SendError( playerid, "Failed to place the player inside a full of player vehicle." );
|
else if ( PutPlayerInEmptyVehicleSeat( p_LastVehicle[ playerid ], victimid ) == -1 ) return SendError( playerid, "Failed to place the player inside a full of player vehicle." );
|
||||||
SendClientMessageFormatted( victimid, -1, ""COL_RED"[KIDNAPPED]{FFFFFF} You have been kidnapped by %s(%d)!", ReturnPlayerName( playerid ), playerid );
|
SendClientMessageFormatted( victimid, -1, ""COL_RED"[KIDNAPPED]{FFFFFF} You have been kidnapped by %s(%d)!", ReturnPlayerName( playerid ), playerid );
|
||||||
@ -3671,8 +3644,6 @@ CMD:tie( playerid, params[ ] )
|
|||||||
else if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an event." );
|
else if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an event." );
|
||||||
else if ( IsPlayerInPlayerGang( playerid, victimid ) ) return SendError( playerid, "You cannot use this command on your homies!" );
|
else if ( IsPlayerInPlayerGang( playerid, victimid ) ) return SendError( playerid, "You cannot use this command on your homies!" );
|
||||||
else if ( IsPlayerSpawnProtected( victimid ) ) return SendError( playerid, "You cannot use this command on spawn protected players." );
|
else if ( IsPlayerSpawnProtected( victimid ) ) return SendError( playerid, "You cannot use this command on spawn protected players." );
|
||||||
else if ( IsPlayerPassive( playerid ) ) return SendError( playerid, "You cannot use this command as a passive mode player." );
|
|
||||||
else if ( IsPlayerPassive( victimid ) ) return SendError( playerid, "You cannot use this command on passive mode players." );
|
|
||||||
else if ( IsPlayerInCasino( victimid ) && ! p_WantedLevel[ victimid ] ) return SendError( playerid, "The innocent person you're trying to tie is in a casino." );
|
else if ( IsPlayerInCasino( victimid ) && ! p_WantedLevel[ victimid ] ) return SendError( playerid, "The innocent person you're trying to tie is in a casino." );
|
||||||
|
|
||||||
// remove rope after attempt
|
// remove rope after attempt
|
||||||
@ -3856,8 +3827,6 @@ CMD:rob( playerid, params[ ] )
|
|||||||
else if ( p_ClassSelection{ victimid } ) return SendError( playerid, "This player is currently in class selection." );
|
else if ( p_ClassSelection{ victimid } ) return SendError( playerid, "This player is currently in class selection." );
|
||||||
else if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an event." );
|
else if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an event." );
|
||||||
else if ( IsPlayerInPlayerGang( playerid, victimid ) ) return SendError( playerid, "You cannot use this command on your homies!" );
|
else if ( IsPlayerInPlayerGang( playerid, victimid ) ) return SendError( playerid, "You cannot use this command on your homies!" );
|
||||||
else if ( IsPlayerPassive( victimid ) ) return SendError( playerid, "You cannot use this command on passive mode players." );
|
|
||||||
else if ( IsPlayerPassive( playerid ) ) return SendError( playerid, "You cannot use this command as a passive mode player." );
|
|
||||||
|
|
||||||
new
|
new
|
||||||
iRandom = random( 101 );
|
iRandom = random( 101 );
|
||||||
@ -3940,8 +3909,6 @@ CMD:rape( playerid, params[ ] )
|
|||||||
else if ( IsPlayerInCasino( victimid ) && ! p_WantedLevel[ victimid ] ) return SendError( playerid, "The innocent person you're trying to rape is in a casino." );
|
else if ( IsPlayerInCasino( victimid ) && ! p_WantedLevel[ victimid ] ) return SendError( playerid, "The innocent person you're trying to rape is in a casino." );
|
||||||
else if ( IsPlayerLoadingObjects( victimid ) ) return SendError( playerid, "This player is in a object-loading state." );
|
else if ( IsPlayerLoadingObjects( victimid ) ) return SendError( playerid, "This player is in a object-loading state." );
|
||||||
else if ( IsPlayerSpawnProtected( victimid ) ) return SendError( playerid, "This player is in a anti-spawn-kill state." );
|
else if ( IsPlayerSpawnProtected( victimid ) ) return SendError( playerid, "This player is in a anti-spawn-kill state." );
|
||||||
else if ( IsPlayerPassive( victimid ) ) return SendError( playerid, "You cannot use this command on passive mode players." );
|
|
||||||
else if ( IsPlayerPassive( playerid ) ) return SendError( playerid, "You cannot use this command as a passive mode player." );
|
|
||||||
else if ( p_ClassSelection{ victimid } ) return SendError( playerid, "This player is currently in class selection." );
|
else if ( p_ClassSelection{ victimid } ) return SendError( playerid, "This player is currently in class selection." );
|
||||||
else if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an event." );
|
else if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an event." );
|
||||||
else if ( IsPlayerAFK( victimid ) && GetPlayerState( playerid ) != PLAYER_STATE_WASTED ) return SendError( playerid, "This player is in an AFK state." );
|
else if ( IsPlayerAFK( victimid ) && GetPlayerState( playerid ) != PLAYER_STATE_WASTED ) return SendError( playerid, "This player is in an AFK state." );
|
||||||
@ -4811,11 +4778,6 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
|||||||
|
|
||||||
TogglePlayerControllable( playerid, 1 );
|
TogglePlayerControllable( playerid, 1 );
|
||||||
|
|
||||||
/* Passive Mode - Removed E:\SF-CNR\gamemodes\sf-cnr.pwn
|
|
||||||
if ( ! p_JobSet{ playerid } ) {
|
|
||||||
ShowPlayerDialog( playerid, DIALOG_PASSIVE_MODE, DIALOG_STYLE_LIST, "{FFFFFF}What is your type of style?", "{555555}Choose Below Below:\nI Like Roleplaying\nI Like Deathmatching", "Select", "" );
|
|
||||||
}*/
|
|
||||||
|
|
||||||
p_JobSet{ playerid } = true;
|
p_JobSet{ playerid } = true;
|
||||||
|
|
||||||
//if ( !p_CitySet{ playerid } )
|
//if ( !p_CitySet{ playerid } )
|
||||||
@ -4832,19 +4794,6 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if ( dialogid == DIALOG_PASSIVE_MODE )
|
|
||||||
{
|
|
||||||
if ( ! response || ! listitem ) {
|
|
||||||
ShowPlayerDialog( playerid, DIALOG_PASSIVE_MODE, DIALOG_STYLE_LIST, "{FFFFFF}What is your type of style?", "{555555}Choose Below Below:\nI Like Roleplaying\nI Like Deathmatching", "Select", "" );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( listitem == 1 ) {
|
|
||||||
SendServerMessage( playerid, "Since you like roleplay, passive mode has been automatically enabled for you!" );
|
|
||||||
} else if ( listitem == 2 ) {
|
|
||||||
CallLocalFunction( "OnDialogResponse", "dddds", playerid, DIALOG_CP_MENU, 1, SETTING_PASSIVE_MODE + 1, "ignore" ); // cunning way
|
|
||||||
SendServerMessage( playerid, "Since you like deathmatch, passive mode has been automatically enabled for you!" );
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
if ( dialogid == DIALOG_HOUSES )
|
if ( dialogid == DIALOG_HOUSES )
|
||||||
{
|
{
|
||||||
if ( ! response )
|
if ( ! response )
|
||||||
@ -6906,9 +6855,6 @@ stock IsRandomDeathmatch( issuerid, damagedid )
|
|||||||
if ( IsPlayerBoxing( issuerid ) )
|
if ( IsPlayerBoxing( issuerid ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ( IsPlayerPassive( damagedid ) )
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if ( ! IsPlayerInCasino( issuerid ) || ! IsPlayerInCasino( damagedid ) )
|
if ( ! IsPlayerInCasino( issuerid ) || ! IsPlayerInCasino( damagedid ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -7168,5 +7114,11 @@ stock IsPlayerBelowSeaLevel( playerid )
|
|||||||
|
|
||||||
GetPlayerPos( playerid, z, z, z );
|
GetPlayerPos( playerid, z, z, z );
|
||||||
|
|
||||||
return z < 0.0;
|
return z < -2.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
stock ReturnPlayerHealth( playerid )
|
||||||
|
{
|
||||||
|
new Float: health;
|
||||||
|
return GetPlayerHealth( playerid, health );
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user