Merge branch 'fixes' of https://bitbucket.org/lorenc/cnr into fixes

This commit is contained in:
Stev 2018-12-25 22:45:36 +00:00
commit 25f67e8bdb
5 changed files with 54 additions and 46 deletions

View File

@ -17,13 +17,6 @@ hook OnPlayerText( playerid, text[ ] )
{ {
if ( ! IsPlayerNPC( playerid ) ) { if ( ! IsPlayerNPC( playerid ) ) {
if ( GetPlayerScore( playerid ) < 10 ) {
return SendServerMessage( playerid, "You need at least 10 score to talk. "COL_GREY"Use /ask or /report to talk to an admin in the meanwhile." ), Y_HOOKS_BREAK_RETURN_1;
}
if ( ! IsPlayerLoggedIn( playerid ) ) {
return SendError( playerid, "You must be logged in to talk." ), Y_HOOKS_BREAK_RETURN_1;
}
} }
return Y_HOOKS_CONTINUE_RETURN_1; return Y_HOOKS_CONTINUE_RETURN_1;
} }

View File

@ -128,9 +128,19 @@ hook OnServerGameDayEnd( )
hook OnPlayerDriveVehicle( playerid, vehicleid ) hook OnPlayerDriveVehicle( playerid, vehicleid )
{ {
new new
modelid = GetVehicleModel( vehicleid ); modelid = GetVehicleModel( vehicleid ),
Float: total_experience;
GetPlayerTotalExperience( playerid, total_experience );
if ( modelid == 407 ) { if ( modelid == 407 ) {
if ( total_experience < 2500 )
{
RemovePlayerFromVehicle( playerid );
return SendServerMessage( playerid, "You must have 2,500XP to use a Firetruck." );
}
ShowPlayerHelpDialog( playerid, 2500, "You can see where fires are using ~g~/fires" ); ShowPlayerHelpDialog( playerid, 2500, "You can see where fires are using ~g~/fires" );
} }
return 1; return 1;

View File

@ -10,20 +10,17 @@
//#include < physics_dynamic > //#include < physics_dynamic >
/* ** Definitions ** */ /* ** Definitions ** */
#define POCKET_RADIUS 0.09 #define POCKET_RADIUS ( 0.09 )
#define POOL_TIMER_SPEED 30 #define POOL_TIMER_SPEED ( 30 )
#define DEFAULT_AIM 0.38 #define DEFAULT_AIM ( 0.38 )
#define DEFAULT_POOL_STRING "Pool Table\n{FFFFFF}Press ENTER To Play" #define DEFAULT_POOL_STRING "Pool Table\n{FFFFFF}Press ENTER To Play"
#define POOL_FEE_RATE 0.02 #define POOL_FEE_RATE ( 0.02 )
#define MAX_POOL_TABLES 48 #define MAX_POOL_TABLES ( 48 )
#define MAX_POOL_BALLS ( 16 ) // do not modify #define MAX_POOL_BALLS ( 16 ) // do not modify
//#define DIALOG_POOL_WAGER 3284
/* ** Macros ** */ /* ** Macros ** */
#define SendPoolMessage(%0,%1) \ #define SendPoolMessage(%0,%1) SendClientMessageFormatted(%0, -1, "{4B8774}[POOL] {E5861A}" # %1)
SendClientMessageFormatted(%0, -1, "{4B8774}[POOL] {E5861A}" # %1)
/* ** Constants (do not modify) ** */ /* ** Constants (do not modify) ** */
enum E_POOL_BALL_TYPE { enum E_POOL_BALL_TYPE {

View File

@ -1934,6 +1934,14 @@ public OnPlayerText( playerid, text[ ] )
new new
time = g_iTime; time = g_iTime;
if ( GetPlayerScore( playerid ) < 10 ) {
return SendServerMessage( playerid, "You need at least 10 score to talk. "COL_GREY"Use /ask or /report to talk to an admin in the meanwhile." ), 0;
}
if ( ! IsPlayerLoggedIn( playerid ) ) {
return SendError( playerid, "You must be logged in to talk." ), 0;
}
if ( textContainsIP( text ) ) if ( textContainsIP( text ) )
return SendServerMessage( playerid, "Please do not advertise." ), 0; return SendServerMessage( playerid, "Please do not advertise." ), 0;