Merge pull request #8 from zeelorenc/master

Merge
This commit is contained in:
Dusan 2019-06-03 13:25:35 +02:00 committed by GitHub
commit 7fe5a21de8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 10 deletions

View File

@ -376,6 +376,11 @@ stock SavePlayerData( playerid, bool: logout = false )
if ( IsPlayerCuffed( playerid ) || IsPlayerTazed( playerid ) || IsPlayerTied( playerid ) || p_LeftCuffed{ playerid } || p_QuitToAvoidTimestamp[ playerid ] > g_iTime )
bQuitToAvoid = true;
#if defined __cloudy_event_system
if ( IsPlayerInEvent( playerid ) )
bQuitToAvoid = false;
#endif
format( Query, sizeof( Query ), "UPDATE `USERS` SET `SCORE`=%d,`ADMINLEVEL`=%d,`OWNEDHOUSES`=%d,`KILLS`=%d,`DEATHS`=%d,`VIP_PACKAGE`=%d,`OWNEDCARS`=%d,`LASTLOGGED`=%d,`VIP_EXPIRE`=%d,`LAST_SKIN`=%d,`BURGLARIES`=%d,`UPTIME`=%d,`ARRESTS`=%d,`CITY`=%d,`METH`=%d,`SODA`=%d,`ACID`=%d,`GAS`=%d,",
GetPlayerScore( playerid ), p_AdminLevel[ playerid ],
p_OwnedHouses[ playerid ], p_Kills[ playerid ],

View File

@ -440,6 +440,11 @@ stock AwardNearestLEO( playerid, reason )
if ( ! IsPlayerConnected( playerid ) || playerid == INVALID_PLAYER_ID || GetPlayerWantedLevel( playerid ) < 2 || IsPlayerDead( playerid ) )
return false;
#if defined __cloudy_event_system
if ( IsPlayerInEvent( playerid ) )
return false;
#endif
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 closestLEO = GetClosestPlayerEx( playerid, CLASS_POLICE, radius );

View File

@ -26,7 +26,8 @@ static stock
{ -2767.3765, 1257.077, 11.7703, 0xFFFF, "{FFFFFF}You can mine ores and store your ores in dunes for exportation! Grab the spade and hit the ore!" }, // Mining
{ 1954.71890, 1038.251, 992.859, 0xFFFF, "{FFFFFF}Test out your luck on the slot machines, maybe you might win the mega jackpot!" }, // Slots
{ 1955.69070, 1005.167, 992.468, 0xFFFF, "{FFFFFF}Roulette can payout up to $3.5M! Single bets return 35x your money whereas outside bets can return 2x to 3x!" }, // Roulette
{ 2085.5896, 1239.4589, 414.745, 0xFFFF, "{FFFFFF}Buy materials at a convience store and cook meth! Aim and shoot each ingredient to add them as you /meth cook!" } // Meth Cook
{ 2085.5896, 1239.4589, 414.745, 0xFFFF, "{FFFFFF}Buy materials at a convience store and cook meth! Aim and shoot each ingredient to add them as you /meth cook!" }, // Meth Cook
{ -1486.1608, 701.3732, 7.17900, 0xFFFF, "{FFFFFF}Get a boat and sail around the sea to get a fish every few seconds of sailing." } // Fishing
}
;

View File

@ -421,12 +421,12 @@ static stock InitializeServerVehicles( )
#if defined __cloudy_fishing_system
// SF Fishing Boats
AddStaticVehicle( 453, -2994.639892, 492.919006, 0.108999, 359.498992, -1, -1 );
AddStaticVehicle( 453, -2982.639892, 492.919006, -0.921999, 359.437011, -1, -1 );
AddStaticVehicle( 453, -2953.639892, 492.919006, -0.823000, 359.410003, -1, -1 );
AddStaticVehicle( 453, -2941.639892, 492.919006, -0.828999, 359.394989, -1, -1 );
AddStaticVehicle( 453, -2959.639892, 492.919006, -0.564000, 359.359985, -1, -1 );
AddStaticVehicle( 453, -2970.639892, 492.919006, -0.374000, 359.475006, -1, -1 );
AddStaticVehicle( 453, -1474.0452, 671.4551, -0.4139, 270.0, 56, 56 ); //
AddStaticVehicle( 453, -1474.0452, 678.4317, -0.1675, 270.0, 56, 56 ); //
AddStaticVehicle( 453, -1474.0452, 684.5461, -0.4814, 270.0, 56, 56 ); //
AddStaticVehicle( 453, -1474.0452, 690.5830, -0.1199, 270.0, 56, 56 ); //
AddStaticVehicle( 453, -1474.0452, 698.4171, -0.4731, 270.0, 56, 56 ); //
AddStaticVehicle( 453, -1474.0452, 704.5991, -0.4769, 270.0, 56, 56 ); //
#endif
// //

View File

@ -845,8 +845,14 @@ public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float: fX, Float:
return 1; // fcnpc
// Cop shoots innocent, they /q - so jail
#if defined __cloudy_event_system
if ( p_Class[ playerid ] == CLASS_POLICE && p_WantedLevel[ hitid ] > 2 && ! IsPlayerInEvent( playerid ) && ! IsPlayerInEvent( hitid ) )
#else
if ( p_Class[ playerid ] == CLASS_POLICE && p_WantedLevel[ hitid ] > 2 )
#endif
{
p_QuitToAvoidTimestamp[ hitid ] = g_iTime + 3;
}
if ( p_Class[ playerid ] == CLASS_POLICE && p_Class[ hitid ] != CLASS_POLICE && !p_WantedLevel[ hitid ] && GetPlayerState( hitid ) != PLAYER_STATE_WASTED && ! IsPlayerInEvent( playerid ) && ! IsPlayerInBattleRoyale( playerid ) )
return ShowPlayerHelpDialog( playerid, 2000, "You cannot hurt innocent civilians, you're a ~b~cop~w~~h~!" ), 0;