move more server settings to config/server.pwn

This commit is contained in:
Lorenc Pekaj 2018-10-17 03:28:19 +11:00
parent 3955ed0982
commit eda738d00e
2 changed files with 23 additions and 21 deletions

View File

@ -10,10 +10,31 @@
/* ** Definitions ** */ /* ** Definitions ** */
#define FILE_BUILD "v11.40.120" #define FILE_BUILD "v11.40.120"
#define SERVER_NAME "San Fierro Cops And Robbers (0.3.7)" #define SERVER_NAME "San Fierro Cops And Robbers (0.3.7)"
#define SERVER_MODE_TEXT "Cops And Robbers / DM / Gangs"
#define SERVER_MAP "San Fierro"
#define SERVER_LANGUAGE "English"
#define SERVER_WEBSITE "www.sfcnr.com" #define SERVER_WEBSITE "www.sfcnr.com"
#define SERVER_IP "54.36.127.43:7777" #define SERVER_IP "54.36.127.43:7777"
/* ** Hooks ** */
hook OnScriptInit( )
{
SetGameModeText( SERVER_MODE_TEXT );
SetServerRule( "hostname", SERVER_NAME );
SetServerRule( "language", SERVER_LANGUAGE );
SetServerRule( "mapname", SERVER_MAP );
UsePlayerPedAnims( );
AllowInteriorWeapons( 0 );
EnableStuntBonusForAll( 0 );
DisableInteriorEnterExits( );
return 1;
}
/* ** Functions ** */ /* ** Functions ** */
stock IsPlayerLeadMaintainer( playerid ) stock IsPlayerLeadMaintainer( playerid )
{ {

View File

@ -319,16 +319,6 @@ main()
public OnGameModeInit() public OnGameModeInit()
{ {
SetGameModeText( "Cops And Robbers / DM / Gangs" );
SetServerRule( "hostname", SERVER_NAME );
SetServerRule( "language", "English" );
SetServerRule( "mapname", "San Fierro" );
UsePlayerPedAnims( );
AllowInteriorWeapons( 0 );
EnableStuntBonusForAll( 0 );
DisableInteriorEnterExits( );
#if defined DEBUG_MODE #if defined DEBUG_MODE
mysql_log( LOG_ERROR | LOG_WARNING ); mysql_log( LOG_ERROR | LOG_WARNING );
#endif #endif
@ -10604,20 +10594,11 @@ public OnPlayerClickPlayer(playerid, clickedplayerid, source)
// Functions // // Functions //
///////////////////////// /////////////////////////
stock SetServerRule( rule[ ], value[ ] ) stock SetServerRule( const rule[ ], const value[ ] )
{ {
new string[ 80 ]; return SendRconCommand( sprintf( "%s %s", rule, value ) );
format( string, sizeof( string ), "%s %s", rule, value );
SendRconCommand( string );
} }
/*stock ReturnPlayerName( playerid )
{
GetPlayerName( playerid, szSmallString, MAX_PLAYER_NAME );
if ( !IsPlayerConnected( playerid ) ) szSmallString = "No-one";
return szSmallString;
}*/
stock SetPlayerPosToPrison( playerid ) stock SetPlayerPosToPrison( playerid )
{ {
static const static const