2018-09-19 05:43:05 +00:00
|
|
|
/*
|
|
|
|
* Irresistible Gaming (c) 2018
|
2018-12-12 08:21:57 +00:00
|
|
|
* Developed by Lorenc
|
2018-09-19 05:43:05 +00:00
|
|
|
* Module: server.pwn
|
|
|
|
* Purpose: server related definitions
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ** Includes ** */
|
|
|
|
#include < YSI\y_hooks >
|
|
|
|
|
|
|
|
/* ** Definitions ** */
|
2018-12-27 06:45:46 +00:00
|
|
|
#define FILE_BUILD "v11.45.130"
|
2018-10-16 16:28:19 +00:00
|
|
|
|
2018-09-19 05:43:05 +00:00
|
|
|
#define SERVER_NAME "San Fierro Cops And Robbers (0.3.7)"
|
2018-10-16 16:28:19 +00:00
|
|
|
#define SERVER_MODE_TEXT "Cops And Robbers / DM / Gangs"
|
|
|
|
#define SERVER_MAP "San Fierro"
|
|
|
|
#define SERVER_LANGUAGE "English"
|
|
|
|
|
2018-09-19 05:43:05 +00:00
|
|
|
#define SERVER_WEBSITE "www.sfcnr.com"
|
|
|
|
#define SERVER_IP "54.36.127.43:7777"
|
2018-10-10 02:51:56 +00:00
|
|
|
|
2018-12-22 23:24:17 +00:00
|
|
|
#define SERVER_TWITTER "IrresistibleDev"
|
|
|
|
|
2018-12-22 23:20:13 +00:00
|
|
|
/* ** Comment line to disable feature ** */
|
2018-12-22 23:29:27 +00:00
|
|
|
#define SERVER_RULES_URL "files.sfcnr.com/en_rules.txt" // used for /rules (cnr\features\server_rules.pwn)
|
|
|
|
#define SERVER_TWITTER_FEED_URL "files.sfcnr.com/cnr_twitter.php" // used for /twitter (cnr\commands\cmd_twitter.pwn)
|
|
|
|
#define SERVER_CHANGES_FILE "updates.txt" // used for /changes (cnr\commands\cmd_changes.pwn)
|
2018-12-22 23:13:49 +00:00
|
|
|
|
2018-10-16 16:28:19 +00:00
|
|
|
/* ** 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;
|
|
|
|
}
|
|
|
|
|
2018-10-10 02:51:56 +00:00
|
|
|
/* ** Functions ** */
|
2018-10-16 15:59:36 +00:00
|
|
|
stock IsPlayerLeadMaintainer( playerid )
|
|
|
|
{
|
2018-10-10 02:51:56 +00:00
|
|
|
return GetPlayerAccountID( playerid ) == 1; // limits money, coin, xp spawning to this user
|
|
|
|
}
|
|
|
|
|
|
|
|
stock IsPlayerServerMaintainer( playerid )
|
|
|
|
{
|
|
|
|
new
|
|
|
|
account_id = GetPlayerAccountID( playerid );
|
|
|
|
|
|
|
|
return IsPlayerLeadMaintainer( playerid ) || account_id == 277833 || account_id == 758617; // same as lead maintainer, just cant spawn money/xp/coins
|
|
|
|
}
|
2018-10-16 15:59:36 +00:00
|
|
|
|
|
|
|
stock IsPlayerUnderCover( playerid ) // StefiTV852, Shepard23, JamesComey
|
|
|
|
{
|
|
|
|
new
|
|
|
|
account_id = GetPlayerAccountID( playerid );
|
|
|
|
|
2018-11-22 14:57:25 +00:00
|
|
|
return ( account_id == 917827 || account_id == 917829 || account_id == 921105 ) && IsPlayerLoggedIn( playerid );
|
2018-10-16 15:59:36 +00:00
|
|
|
}
|