move gate code to gate module

This commit is contained in:
Lorenc Pekaj 2018-10-17 03:22:15 +11:00
parent 84c6e464f5
commit 3955ed0982
2 changed files with 7 additions and 1 deletions

View File

@ -34,6 +34,12 @@ static stock
; ;
/* ** Hooks ** */ /* ** Hooks ** */
hook OnScriptInit( )
{
mysql_function_query( dbHandle, "SELECT * FROM `GATES`", true, "OnGatesLoad", "" );
return 1;
}
hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
{ {
if ( PRESSED( KEY_LOOK_BEHIND ) ) // MMB to open gate if ( PRESSED( KEY_LOOK_BEHIND ) ) // MMB to open gate

View File

@ -549,7 +549,7 @@ public OnGameModeInit()
// mysql_function_query( dbHandle, "SELECT * FROM `BRIBES`", true, "OnBribeLoad", "" ); // mysql_function_query( dbHandle, "SELECT * FROM `BRIBES`", true, "OnBribeLoad", "" );
mysql_function_query( dbHandle, "SELECT * FROM `APARTMENTS`", true, "OnApartmentLoad", "" ); mysql_function_query( dbHandle, "SELECT * FROM `APARTMENTS`", true, "OnApartmentLoad", "" );
// mysql_function_query( dbHandle, "SELECT * FROM `FURNITURE`", true, "OnFurnitureLoad", "" ); // mysql_function_query( dbHandle, "SELECT * FROM `FURNITURE`", true, "OnFurnitureLoad", "" );
mysql_function_query( dbHandle, "SELECT * FROM `GATES`", true, "OnGatesLoad", "" ); //mysql_function_query( dbHandle, "SELECT * FROM `GATES`", true, "OnGatesLoad", "" );
//mysql_function_query( dbHandle, "SELECT * FROM `ENTRANCES`", true, "OnEntrancesLoad", "" ); //mysql_function_query( dbHandle, "SELECT * FROM `ENTRANCES`", true, "OnEntrancesLoad", "" );
//mysql_function_query( dbHandle, "SELECT * FROM `CASINO_POOLS`", true, "OnCasinoPoolsLoad", "" ); //mysql_function_query( dbHandle, "SELECT * FROM `CASINO_POOLS`", true, "OnCasinoPoolsLoad", "" );
//mysql_function_query( dbHandle, "SELECT * FROM `BUSINESSES`", true, "OnBusinessLoad", "" ); //mysql_function_query( dbHandle, "SELECT * FROM `BUSINESSES`", true, "OnBusinessLoad", "" );