adds check to fix casino damaging players

This commit is contained in:
Damen 2019-01-17 20:39:47 -05:00
parent 2bc361b896
commit a176b9a701
3 changed files with 27 additions and 10 deletions

View File

@ -359,3 +359,21 @@ stock IsPlayerInHighRoller( playerid )
if ( ! IsPlayerInCasino( playerid ) ) return false;
return IsPlayerInArea( playerid, 2545.383056, 2592.488037, 1569.796997, 1651.173950 );
}
stock IsPlayerInCasino( playerid ) {
new world = GetPlayerVirtualWorld( playerid );
if ( GetPlayerState( playerid ) != PLAYER_STATE_ONFOOT ) return 0;
if ( GetPlayerInterior( playerid ) == VISAGE_INTERIOR && world == VISAGE_WORLD ) return 1; // visage itself
if ( IsPlayerInRangeOfPoint( playerid, 100.0, 1993.0846, 1904.5693, 84.2848 ) && world != 0 ) return 1; // visage apartments
if ( IsPlayerInRangeOfPoint( playerid, 10.0, -792.8680, 661.2518, 19.3380 ) && world == 0 ) return 1; // roycegate mansion
return ( GetPlayerInterior( playerid ) == 10 && GetPlayerVirtualWorld( playerid ) == 23 ) || ( GetPlayerInterior( playerid ) == 1 && GetPlayerVirtualWorld( playerid ) == 82 );
}
hook OnPlayerTakeDamage( playerid, issuerid, Float:amount, weaponid, bodypart )
{
if ( IsPlayerInCasino( playerid ) ) return SendClientMessage( issuerid, -1, "You cannot damage players inside the casino." ), 0;
return true;
}

View File

@ -6893,15 +6893,6 @@ stock IsRandomDeathmatch( issuerid, damagedid )
return false;
}
stock IsPlayerInCasino( playerid ) {
new world = GetPlayerVirtualWorld( playerid );
if ( GetPlayerState( playerid ) != PLAYER_STATE_ONFOOT ) return 0;
if ( GetPlayerInterior( playerid ) == VISAGE_INTERIOR && world == VISAGE_WORLD ) return 1; // visage itself
if ( IsPlayerInRangeOfPoint( playerid, 100.0, 1993.0846, 1904.5693, 84.2848 ) && world != 0 ) return 1; // visage apartments
if ( IsPlayerInRangeOfPoint( playerid, 10.0, -792.8680, 661.2518, 19.3380 ) && world == 0 ) return 1; // roycegate mansion
return ( GetPlayerInterior( playerid ) == 10 && GetPlayerVirtualWorld( playerid ) == 23 ) || ( GetPlayerInterior( playerid ) == 1 && GetPlayerVirtualWorld( playerid ) == 82 );
}
stock SetPlayerPosition( playerid, Float: x, Float: y, Float: z, interiorid = 0, worldid = 0 )
{
new

View File

@ -1,6 +1,14 @@
(+) A percentage is showed in the top donor bar, which is the required total funding of the server for the month.
(+) Server features are shown to newly registered players.
(/) Breaking Cuffs is now at a 75% chance success rate.
(/) Jail Multiplier is now lowered from 3 to 2.
(/) /sm is no longer capped at a 90M transaction.
(/) /ic send limit has been increased from 5,000 to 10,000.
(/) Player money is saved on an inflow/outflow basis. Before, it saved only when you disconnected.
(/) You need 50 score to send private messages in the server.
(/) Players can no longer damage eachother within casinos.
(*) Bank Money changes now trigger it to be saved. Fixing IC & Stock selling issue.
(*) Fireworks purchasing is now functional and grants you the item upon purchase.
(*) Fireworks purchasing is now functional and grants you the item upon purchase.
(*) Fixed issue with cop chat behaving abnormally.
(*) You cannot use /sync in jail.
(-) Knives have been removed due to abuse.