This commit is contained in:
Dusan 2019-06-17 14:45:08 +02:00
parent 829b2ed39f
commit 371582cd37
3 changed files with 12 additions and 18 deletions

View File

@ -180,7 +180,7 @@ CMD:arrest( playerid, params[ ] )
if ( GetPlayerState( playerid ) == PLAYER_STATE_WASTED ) return SendError( playerid, "You cannot use this command since you are dead." ); 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 ) * ( COP_ARREST_PAY_PER_WANTED ); new totalCash = ( p_WantedLevel[ victimid ] < MAX_WANTED_LVL ? p_WantedLevel[ victimid ] : MAX_WANTED_LVL ) * ( COP_ARREST_PAY_PER_WANTED );
new totalSeconds = p_WantedLevel[ victimid ] * ( JAIL_SECONDS_MULTIPLIER ); new totalSeconds = p_WantedLevel[ victimid ] * ( JAIL_SECONDS_MULTIPLIER );
if ( GetPlayerLevel( victimid, E_POLICE ) >= 75 ) { if ( GetPlayerLevel( victimid, E_POLICE ) >= 75.0 ) {
totalSeconds = floatround( float( totalSeconds ) * 0.5 ); totalSeconds = floatround( float( totalSeconds ) * 0.5 );
} }
GivePlayerScore( playerid, 2 ); GivePlayerScore( playerid, 2 );
@ -399,7 +399,7 @@ stock BreakPlayerCuffs( playerid )
} }
else p_BobbyPins[ playerid ] --; else p_BobbyPins[ playerid ] --;
new Float: probability = fRandomEx( 0, 100 ); new Float: probability = fRandomEx( 0.0, 100.0 );
// multiply success rate every 25 levels (only 1, 2, 3, 4x) // multiply success rate every 25 levels (only 1, 2, 3, 4x)
probability *= GetPlayerLevel( playerid, E_POLICE ) / 25.0 + 1.0; probability *= GetPlayerLevel( playerid, E_POLICE ) / 25.0 + 1.0;

View File

@ -32,7 +32,7 @@ CMD:bail( playerid, params[ ] )
else if ( GetPVarInt( pID, "bail_antispam" ) > g_iTime ) return SendError( playerid, "You must wait 10 seconds before offering a bail to this player." ); else if ( GetPVarInt( pID, "bail_antispam" ) > g_iTime ) return SendError( playerid, "You must wait 10 seconds before offering a bail to this player." );
else else
{ {
equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ pID ] ) * GetPlayerLevel( playerid, E_POLICE ) / 100 + 1.0 ); equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ pID ] ) * ( GetPlayerLevel( pID, E_POLICE ) / 100.0 + 1.0 ) );
if ( p_JailTime[ pID ] >= ALCATRAZ_TIME_WANTED ) equa *= 2; if ( p_JailTime[ pID ] >= ALCATRAZ_TIME_WANTED ) equa *= 2;
p_BailOfferer[ pID ] = playerid; p_BailOfferer[ pID ] = playerid;
p_BailTimestamp[ pID ] = g_iTime + 120; p_BailTimestamp[ pID ] = g_iTime + 120;
@ -46,7 +46,7 @@ CMD:bail( playerid, params[ ] )
CMD:acceptbail( playerid, params[ ] ) CMD:acceptbail( playerid, params[ ] )
{ {
new new
equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ playerid ] ) * GetPlayerLevel( playerid, E_POLICE ) / 100 + 1.0 ); equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ pID ] ) * ( GetPlayerLevel( pID, E_POLICE ) / 100.0 + 1.0 ) );
if ( p_JailTime[ playerid ] >= ALCATRAZ_TIME_WANTED ) if ( p_JailTime[ playerid ] >= ALCATRAZ_TIME_WANTED )
equa *= 2; equa *= 2;

View File

@ -538,7 +538,7 @@ stock createRobberyLootInstance( playerid, robberyid, type )
random_chance = 100.0; random_chance = 100.0;
} }
if ( GetPlayerLevel( playerid, E_POLICE ) >= 50 ) { if ( GetPlayerLevel( playerid, E_POLICE ) >= 50.0 ) {
random_chance = 100.0; random_chance = 100.0;
} }
@ -607,20 +607,14 @@ stock createRobberyLootInstance( playerid, robberyid, type )
else if ( business_id != -1 ) else if ( business_id != -1 )
GetZoneFromCoordinates( szLocation, g_businessData[ business_id ] [ E_X ], g_businessData[ business_id ] [ E_Y ], g_businessData[ business_id ] [ E_Z ] ); GetZoneFromCoordinates( szLocation, g_businessData[ business_id ] [ E_X ], g_businessData[ business_id ] [ E_Y ], g_businessData[ business_id ] [ E_Z ] );
if ( GetPlayerLevel( playerid, E_POLICE ) < 50 ) if ( GetPlayerInterior( playerid ) != 0 )
{
if ( GetPlayerInterior( playerid ) != 0 ) {
SendClientMessageToCops( -1, ""COL_BLUE"[ROBBERY]"COL_WHITE" %s has failed robbing %s"COL_WHITE" near %s.", ReturnPlayerName( playerid ), g_robberyData[ robberyid ] [ E_NAME ], szLocation ); SendClientMessageToCops( -1, ""COL_BLUE"[ROBBERY]"COL_WHITE" %s has failed robbing %s"COL_WHITE" near %s.", ReturnPlayerName( playerid ), g_robberyData[ robberyid ] [ E_NAME ], szLocation );
} else { else
SendClientMessageToCops( -1, ""COL_BLUE"[ROBBERY]"COL_WHITE" %s has failed robbing %s"COL_WHITE".", ReturnPlayerName( playerid ), g_robberyData[ robberyid ] [ E_NAME ] ); SendClientMessageToCops( -1, ""COL_BLUE"[ROBBERY]"COL_WHITE" %s has failed robbing %s"COL_WHITE".", ReturnPlayerName( playerid ), g_robberyData[ robberyid ] [ E_NAME ] );
}
SendClientMessage( playerid, -1, ""COL_GREY"[SERVER]"COL_WHITE" No loot, and the alarm went off. Cops have been alerted." ); SendClientMessage( playerid, -1, ""COL_GREY"[SERVER]"COL_WHITE" No loot, and the alarm went off. Cops have been alerted." );
GivePlayerWantedLevel( playerid, 6 ); GivePlayerWantedLevel( playerid, 6 );
CreateCrimeReport( playerid ); CreateCrimeReport( playerid );
} else {
SendClientMessage( playerid, -1, ""COL_GREY"[SERVER]"COL_WHITE" No loot could be found. Cops have not been alerted as your police level is high." );
}
} }
g_robberyData[ robberyid ] [ E_ROB_TIME ] = g_iTime + MAX_ROBBERY_WAIT; g_robberyData[ robberyid ] [ E_ROB_TIME ] = g_iTime + MAX_ROBBERY_WAIT;
g_robberyData[ robberyid ] [ E_ROBBED ] = true; g_robberyData[ robberyid ] [ E_ROBBED ] = true;