commit
4a4c88d956
@ -13,19 +13,5 @@
|
||||
/* ** Variables ** */
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnPlayerText( playerid, text[ ] )
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
|
@ -74,6 +74,7 @@ static stock
|
||||
{ 2, "/kick", "Kicking a player from the server" },
|
||||
|
||||
/* ** Level 3 Commands ** */
|
||||
{ 3, "/banlog", "Finding ban information about a player" },
|
||||
{ 3, "/smlog", "Cash transaction log from a player" },
|
||||
{ 3, "/iclog", "IC transaction log from a player" },
|
||||
{ 3, "/resetwep", "Resetting weapons from a player" },
|
||||
|
@ -536,6 +536,55 @@ CMD:ban( playerid, params [ ] )
|
||||
return 1;
|
||||
}
|
||||
|
||||
CMD:banlog( playerid, params[ ] )
|
||||
{
|
||||
new
|
||||
iName[ MAX_PLAYER_NAME ];
|
||||
|
||||
if ( p_AdminLevel[ playerid ] < 3 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
|
||||
else if ( sscanf( params, "s[24]", iName ) ) return SendUsage( playerid, "/banlog [PLAYER_NAME]" );
|
||||
else
|
||||
{
|
||||
format( szNormalString, sizeof( szNormalString ) , "SELECT * FROM `BANS` WHERE `NAME`='%s' LIMIT 1", iName );
|
||||
mysql_function_query( dbHandle, szNormalString, true, "OnPlayerBanLog", "ds", playerid, iName );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
thread OnPlayerBanLog( playerid, const Name[ ] )
|
||||
{
|
||||
new
|
||||
rows = cache_get_row_count( );
|
||||
|
||||
if ( ! rows ) {
|
||||
return SendError( playerid, "This player isn't banned." );
|
||||
}
|
||||
|
||||
static
|
||||
ban_ip[ 16 ],
|
||||
ban_reason[ 80 ],
|
||||
ban_by[ 24 ],
|
||||
ban_date,
|
||||
ban_expire
|
||||
;
|
||||
|
||||
for ( new row = 0; row < rows; row ++ )
|
||||
{
|
||||
cache_get_field_content_int( row, "DATE", ban_date );
|
||||
cache_get_field_content_int( row, "EXPIRE", ban_expire );
|
||||
cache_get_field_content( row, "IP", ban_ip );
|
||||
cache_get_field_content( row, "REASON", ban_reason );
|
||||
cache_get_field_content( row, "BANBY", ban_by );
|
||||
|
||||
if ( ! ban_expire )
|
||||
format( szHugeString, sizeof( szHugeString ), ""COL_ORANGE"Ban Infomation:\n\n"COL_GREY"Userame: "COL_WHITE"%s\n"COL_GREY"IP Address: "COL_WHITE"%s\n"COL_GREY"Reason: "COL_WHITE"%s\n"COL_GREY"Banned by: "COL_WHITE"%s\n"COL_GREY"Expires: "COL_WHITE"Never\n", Name, ban_ip, ban_reason, ban_by );
|
||||
else
|
||||
format( szHugeString, sizeof( szHugeString ), ""COL_ORANGE"Ban Infomation:\n\n"COL_GREY"Userame: "COL_WHITE"%s\n"COL_GREY"IP Address: "COL_WHITE"%s\n"COL_GREY"Reason: "COL_WHITE"%s\n"COL_GREY"Banned by: "COL_WHITE"%s\n"COL_GREY"Expires: "COL_WHITE"%s\n", Name, ban_ip, ban_reason, ban_by, secondstotime( ban_expire - g_iTime ) );
|
||||
}
|
||||
|
||||
return ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, ""COL_WHITE"Ban Search", szHugeString, "Close", "" ), 1;
|
||||
}
|
||||
|
||||
CMD:bring( playerid, params[ ] )
|
||||
{
|
||||
new
|
||||
|
@ -15,9 +15,9 @@
|
||||
#include "irresistible\cnr\features\vehicles\_vehicles.pwn"
|
||||
#include "irresistible\cnr\features\business\_business.pwn"
|
||||
#include "irresistible\cnr\features\gangs\_gangs.pwn"
|
||||
#include "irresistible\cnr\features\minijobs\_minijobs.pwn"
|
||||
#include "irresistible\cnr\features\cop\_cop.pwn"
|
||||
#include "irresistible\cnr\features\robbery\_robbery.pwn"
|
||||
#include "irresistible\cnr\features\minijobs\_minijobs.pwn"
|
||||
#include "irresistible\cnr\features\player_items\_player_items.pwn"
|
||||
#include "irresistible\cnr\features\visage\_visage.pwn"
|
||||
|
||||
|
@ -194,6 +194,7 @@ new
|
||||
g_businessActors [ MAX_BUSINESSES ] [ MAX_BIZ_ACTORS ],
|
||||
g_isBusinessVehicle [ MAX_VEHICLES ] = { -1, ... },
|
||||
g_businessVehicle [ MAX_BUSINESSES ] = { INVALID_VEHICLE_ID, ... },
|
||||
g_businessMemberIndex [ MAX_PLAYERS ] [ MAX_BUSINESS_MEMBERS ],
|
||||
bool: g_businessVehicleUnlocked [ MAX_BUSINESSES ] [ MAX_BIZ_VEH_MODELS char ],
|
||||
Iterator: business < MAX_BUSINESSES >
|
||||
//g_BusinessUpdateTickCount = 0
|
||||
@ -1029,12 +1030,15 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
if ( listitem == 0 )
|
||||
return ShowPlayerDialog( playerid, DIALOG_BUSINESS_ADD_MEMBER, DIALOG_STYLE_INPUT, ""COL_GREY"Business System", ""COL_WHITE"Type the name of the player you wish to add as a member.", "Add", "Back" );
|
||||
|
||||
for( new i, x = 1; i < MAX_BUSINESS_MEMBERS; i ++ )
|
||||
for( new i, x = 1; i < MAX_BUSINESS_MEMBERS; i ++ )
|
||||
{
|
||||
if ( g_businessData[ businessid ] [ E_MEMBERS ] [ i ] )
|
||||
{
|
||||
if ( x == listitem )
|
||||
{
|
||||
if ( g_Debugging ) {
|
||||
printf( "[business remove member] {listitem: %d, user: %d, businessid: %d}", x, g_businessData[ businessid ] [ E_MEMBERS ] [ i ], businessid );
|
||||
}
|
||||
// alert player if online
|
||||
foreach (new p : Player) if ( g_businessData[ businessid ] [ E_MEMBERS ] [ i ] == p_AccountID[ p ] ) {
|
||||
SendServerMessage( p, "You have been removed as a member of "COL_GREY"%s"COL_WHITE".", g_businessData[ businessid ] [ E_NAME ] );
|
||||
@ -1675,6 +1679,8 @@ stock UpdateBusinessData( businessid )
|
||||
for ( new i = 0; i < MAX_BUSINESS_MEMBERS; i ++ )
|
||||
format( members, sizeof( members ), "%s%d ", members, g_businessData[ businessid ] [ E_MEMBERS ] [ i ] );
|
||||
|
||||
print( members );
|
||||
|
||||
format( szLargeString, sizeof( szLargeString ), "UPDATE `BUSINESSES` SET `OWNER_ID`=%d,`NAME`='%s',`SUPPLIES`=%d,`PRODUCT`=%d,`MEMBERS`='%s',`PROD_TIMESTAMP`=%d,`BANK`=%d,`SECURITY`=%d WHERE `ID`=%d",
|
||||
g_businessData[ businessid ] [ E_OWNER_ID ], mysql_escape( g_businessData[ businessid ] [ E_NAME ] ), g_businessData[ businessid ] [ E_SUPPLIES ], g_businessData[ businessid ] [ E_PRODUCT ],
|
||||
members, g_businessData[ businessid ] [ E_PROD_TIMESTAMP ], g_businessData[ businessid ] [ E_BANK ], g_businessData[ businessid ] [ E_SECURITY_LEVEL ], businessid );
|
||||
@ -2026,7 +2032,7 @@ stock ShowBusinessMembers( playerid, businessid )
|
||||
format( szMembers, sizeof( szMembers ), "%s,%d", szMembers, g_businessData[ businessid ] [ E_MEMBERS ] [ i ] );
|
||||
}
|
||||
|
||||
format( szBigString, sizeof( szBigString ), "SELECT `NAME` FROM `USERS` WHERE `ID` IN (%s)", szMembers );
|
||||
format( szBigString, sizeof( szBigString ), "SELECT `ID`, `NAME` FROM `USERS` WHERE `ID` IN (%s) ORDER BY `ID`", szMembers );
|
||||
mysql_function_query( dbHandle, szBigString, true, "OnShowBusinessMembers", "dd", playerid, businessid );
|
||||
return 1;
|
||||
}
|
||||
|
@ -362,16 +362,16 @@ CMD:duel( playerid, params[ ] )
|
||||
new
|
||||
targetid;
|
||||
|
||||
if ( sscanf( params[7], "u", targetid) )
|
||||
if ( sscanf( params[ 7 ], "u", targetid ) )
|
||||
return SendUsage( playerid, "/duel accept [PLAYER_ID]");
|
||||
|
||||
if ( !IsPlayerConnected( targetid ))
|
||||
if ( !IsPlayerConnected( targetid ) )
|
||||
return SendError( playerid, "You do not have any duel invitations to accept.");
|
||||
|
||||
if ( gettime() > p_duelInvitation[ targetid ][ playerid ] )
|
||||
if ( gettime( ) > p_duelInvitation[ targetid ][ playerid ] )
|
||||
return SendError( playerid, "You have not been invited by %s to duel or it has expired.");
|
||||
|
||||
if ( IsPlayerDueling( playerid ))
|
||||
if ( IsPlayerDueling( playerid ) )
|
||||
return SendError( playerid, "You cannot accept this invite as you are currently dueling.");
|
||||
|
||||
if ( GetDistanceBetweenPlayers( playerid, targetid ) > 25.0)
|
||||
@ -380,15 +380,15 @@ CMD:duel( playerid, params[ ] )
|
||||
new
|
||||
waged_amount = g_duelData[ targetid ][ E_BET ];
|
||||
|
||||
if (g_duelData[ targetid ][ E_BET ] != 0)
|
||||
if ( g_duelData[ targetid ][ E_BET ] != 0 )
|
||||
{
|
||||
if ( GetPlayerCash( targetid ) < waged_amount)
|
||||
if ( GetPlayerCash( targetid ) < waged_amount )
|
||||
{
|
||||
SendClientMessageFormatted( targetid, -1, ""COL_DUEL"[DUEL]"COL_WHITE" %s has accepted but you don't have money to wage (%s).", ReturnPlayerName( playerid ), cash_format( waged_amount ) );
|
||||
SendClientMessageFormatted( playerid, -1, ""COL_DUEL"[DUEL]"COL_WHITE" You have accepted %s's duel invitation but they don't have money.", ReturnPlayerName( targetid ) );
|
||||
return 1;
|
||||
}
|
||||
else if ( GetPlayerCash( playerid ) < waged_amount)
|
||||
else if ( GetPlayerCash( playerid ) < waged_amount )
|
||||
{
|
||||
SendClientMessageFormatted( playerid, -1, ""COL_DUEL"[DUEL]"COL_WHITE" %s requires you to wage %s.", ReturnPlayerName( targetid ), cash_format( waged_amount ) );
|
||||
SendClientMessageFormatted( targetid, -1, ""COL_DUEL"[DUEL]"COL_WHITE" %s has accepted the duel invitation but they don't have money to wage.", ReturnPlayerName( playerid ) );
|
||||
@ -451,9 +451,9 @@ CMD:duel( playerid, params[ ] )
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
else if (strmatch(params, "cancel"))
|
||||
else if ( strmatch( params, "cancel" ) )
|
||||
{
|
||||
if ( ClearDuelInvites( playerid ))
|
||||
if ( ClearDuelInvites( playerid ) )
|
||||
{
|
||||
return SendServerMessage( playerid, "You have cancelled every duel offer that you have made." );
|
||||
}
|
||||
@ -486,7 +486,7 @@ stock IsPlayerDueling( playerid ) {
|
||||
return p_playerDueling{ playerid };
|
||||
}
|
||||
|
||||
stock ShowPlayerDuelMenu(playerid)
|
||||
stock ShowPlayerDuelMenu( playerid )
|
||||
{
|
||||
if ( p_Class[ playerid ] != CLASS_CIVILIAN )
|
||||
return SendError( playerid, "You can only use this feature whist being a civilian.");
|
||||
@ -496,7 +496,7 @@ stock ShowPlayerDuelMenu(playerid)
|
||||
|
||||
format( szBigString, sizeof(szBigString),
|
||||
"Player\t"COL_GREY"%s\nHealth\t"COL_GREY"%.2f%%\nArmour\t"COL_GREY"%.2f%%\nPrimary Weapon\t"COL_GREY"%s\nSecondary Weapon\t"COL_GREY"%s\nLocation\t"COL_GREY"%s\nWager\t"COL_GREY"%s\n"COL_GOLD"Send Invite\t"COL_GOLD">>>",
|
||||
(!IsPlayerConnected(g_duelData[ playerid ][ E_PLAYER ]) ? (""COL_RED"No-one") : (ReturnPlayerName( g_duelData[ playerid ][ E_PLAYER ] ) ) ),
|
||||
( ! IsPlayerConnected( g_duelData[ playerid ][ E_PLAYER ] ) ? ( ""COL_RED"No-one" ) : ( ReturnPlayerName( g_duelData[ playerid ][ E_PLAYER ] ) ) ),
|
||||
g_duelData[ playerid ][ E_HEALTH ],
|
||||
g_duelData[ playerid ][ E_ARMOUR ],
|
||||
ReturnWeaponName( g_duelData[ playerid ][ E_WEAPON ][ 0 ] ),
|
||||
@ -505,13 +505,13 @@ stock ShowPlayerDuelMenu(playerid)
|
||||
cash_format( g_duelData[ playerid ][ E_BET ] )
|
||||
);
|
||||
|
||||
ShowPlayerDialog(playerid, DIALOG_DUEL, DIALOG_STYLE_TABLIST, ""COL_WHITE"Duel Settings", szBigString, "Select", "Cancel");
|
||||
ShowPlayerDialog( playerid, DIALOG_DUEL, DIALOG_STYLE_TABLIST, ""COL_WHITE"Duel Settings", szBigString, "Select", "Cancel" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
static stock forfeitPlayerDuel(playerid)
|
||||
{
|
||||
if ( !IsPlayerDueling( playerid ))
|
||||
if ( !IsPlayerDueling( playerid ) )
|
||||
return 0;
|
||||
|
||||
ClearDuelInvites( playerid );
|
||||
@ -519,22 +519,22 @@ static stock forfeitPlayerDuel(playerid)
|
||||
new
|
||||
winnerid = g_duelData[ playerid ][ E_PLAYER ];
|
||||
|
||||
if ( ! IsPlayerConnected( winnerid ) || ! IsPlayerDueling( winnerid ))
|
||||
if ( ! IsPlayerConnected( winnerid ) || ! IsPlayerDueling( winnerid ) )
|
||||
return 0;
|
||||
|
||||
// begin wager info
|
||||
new
|
||||
amount_waged = g_duelData[ playerid ][ E_BET ];
|
||||
|
||||
SpawnPlayer(winnerid);
|
||||
ClearDuelInvites(winnerid);
|
||||
SpawnPlayer( winnerid );
|
||||
ClearDuelInvites( winnerid );
|
||||
|
||||
// decrement rounds
|
||||
g_duelData[ playerid ][ E_ROUNDS ] --;
|
||||
g_duelData[ winnerid ][ E_ROUNDS ] = g_duelData[ playerid ][ E_ROUNDS ];
|
||||
|
||||
// check if theres a remaining round
|
||||
if (g_duelData[ playerid ][ E_ROUNDS ] == 0)
|
||||
if ( g_duelData[ playerid ][ E_ROUNDS ] == 0)
|
||||
{
|
||||
if ( 0 < amount_waged < 10000000 )
|
||||
{
|
||||
@ -552,10 +552,10 @@ static stock forfeitPlayerDuel(playerid)
|
||||
return 1;
|
||||
}
|
||||
|
||||
function OnDuelTimer(targetid)
|
||||
function OnDuelTimer( targetid )
|
||||
{
|
||||
new
|
||||
playerid = g_duelData[targetid][ E_PLAYER ];
|
||||
playerid = g_duelData[ targetid ][ E_PLAYER ];
|
||||
|
||||
g_duelData[ targetid ][ E_COUNTDOWN ] --;
|
||||
|
||||
@ -574,7 +574,7 @@ function OnDuelTimer(targetid)
|
||||
}
|
||||
else
|
||||
{
|
||||
format(szSmallString, sizeof(szSmallString), "~w~%d", g_duelData[ targetid ][ E_COUNTDOWN ]);
|
||||
format( szSmallString, sizeof( szSmallString ), "~w~%d", g_duelData[ targetid ][ E_COUNTDOWN ] );
|
||||
GameTextForPlayer( targetid, szSmallString, 1500, 4 );
|
||||
GameTextForPlayer( playerid, szSmallString, 1500, 4 );
|
||||
|
||||
|
@ -128,9 +128,19 @@ hook OnServerGameDayEnd( )
|
||||
hook OnPlayerDriveVehicle( playerid, vehicleid )
|
||||
{
|
||||
new
|
||||
modelid = GetVehicleModel( vehicleid );
|
||||
modelid = GetVehicleModel( vehicleid ),
|
||||
Float: total_experience;
|
||||
|
||||
GetPlayerTotalExperience( playerid, total_experience );
|
||||
|
||||
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" );
|
||||
}
|
||||
return 1;
|
||||
|
@ -304,9 +304,10 @@ CMD:gang( playerid, params[ ] )
|
||||
if ( !strcmp( params, "offlinekick", false, 11 ) )
|
||||
{
|
||||
new
|
||||
p_Name[ 24 ];
|
||||
iGang = p_GangID[ playerid ],
|
||||
p_Name[ MAX_PLAYER_NAME ];
|
||||
|
||||
if ( ! IsPlayerGangLeader( playerid, p_GangID[ playerid ], .only_leader = 1 ) )
|
||||
if ( ! IsPlayerGangLeader( playerid, p_GangID[ playerid ] ) )
|
||||
return SendError( playerid, "You are not the gang leader." );
|
||||
|
||||
if ( sscanf( params[ 12 ], "s[24]", p_Name ) )
|
||||
@ -314,8 +315,8 @@ CMD:gang( playerid, params[ ] )
|
||||
|
||||
trimString( p_Name );
|
||||
|
||||
mysql_format( dbHandle, szNormalString, 128, "SELECT `ID`, `NAME`, `GANG_ID` FROM `USERS` WHERE `NAME`='%e' AND `GANG_ID`=%d", p_Name, p_GangID[ playerid ] );
|
||||
mysql_tquery( dbHandle, szNormalString, "OnGangKickOffline", "dd", playerid, p_GangID[ playerid ] );
|
||||
mysql_format( dbHandle, szNormalString, 128, "SELECT `ID`, `NAME`, `GANG_ID` FROM `USERS` WHERE `NAME`='%e' AND `GANG_ID`=%d", p_Name, g_gangData[ iGang ][ E_SQL_ID ] );
|
||||
mysql_tquery( dbHandle, szNormalString, "OnGangKickOffline", "dd", playerid, g_gangData[ iGang ][ E_SQL_ID ] );
|
||||
return 1;
|
||||
}
|
||||
else if ( !strcmp( params, "turfs", false, 5 ) )
|
||||
@ -737,6 +738,7 @@ thread OnListClans( playerid )
|
||||
thread OnGangKickOffline( playerid, gangid )
|
||||
{
|
||||
new
|
||||
static_gangid = p_GangID[ playerid ],
|
||||
rows = cache_get_row_count( );
|
||||
|
||||
if ( rows )
|
||||
@ -760,6 +762,10 @@ thread OnGangKickOffline( playerid, gangid )
|
||||
// verify player is in gang
|
||||
new player_gangid = cache_get_field_content_int( 0, "GANG_ID", dbHandle );
|
||||
|
||||
if ( IsPlayerGangLeader( playerid, player_gangid, .only_leader = 1 ) ) {
|
||||
return SendError( playerid, "You cannot kick this player from the gang." );
|
||||
}
|
||||
|
||||
if ( player_gangid != gangid ) {
|
||||
return SendError( playerid, "This player is not in your gang." );
|
||||
}
|
||||
@ -768,7 +774,7 @@ thread OnGangKickOffline( playerid, gangid )
|
||||
mysql_single_query( sprintf( "DELETE FROM `GANG_COLEADERS` WHERE `USER_ID`=%d", player_accid ) );
|
||||
mysql_single_query( sprintf( "UPDATE `USERS` SET `GANG_ID`=-1 WHERE `ID`=%d", player_accid ) );
|
||||
|
||||
SendClientMessageToGang( gangid, g_gangData[ gangid ] [ E_COLOR ], "[GANG]{FFFFFF} %s has left the gang (KICKED)", player_name );
|
||||
SendClientMessageToGang( static_gangid, g_gangData[ static_gangid ] [ E_COLOR ], "[GANG]{FFFFFF} %s has left the gang (KICKED)", player_name );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -27,17 +27,20 @@ hook OnPlayerUpdateEx( playerid )
|
||||
|
||||
hook OnPlayerSpawn( playerid )
|
||||
{
|
||||
// Toggle Anti Spawn Kill
|
||||
DisableRemoteVehicleCollisions( playerid, p_AdminOnDuty{ playerid } );
|
||||
SetPlayerHealth( playerid, INVALID_PLAYER_ID );
|
||||
Delete3DTextLabel( p_SpawnKillLabel[ playerid ] );
|
||||
p_SpawnKillLabel[ playerid ] = Create3DTextLabel( "Spawn Protected!", COLOR_GOLD, 0.0, 0.0, 0.0, 15.0, 0 );
|
||||
p_AntiSpawnKill[ playerid ] = g_iTime + 15;
|
||||
Attach3DTextLabelToPlayer( p_SpawnKillLabel[ playerid ], playerid, 0.0, 0.0, 0.3 );
|
||||
p_AntiSpawnKillEnabled{ playerid } = true;
|
||||
if ( ! IsPlayerInPaintBall( playerid ) )
|
||||
{
|
||||
// Toggle Anti Spawn Kill
|
||||
DisableRemoteVehicleCollisions( playerid, p_AdminOnDuty{ playerid } );
|
||||
SetPlayerHealth( playerid, INVALID_PLAYER_ID );
|
||||
Delete3DTextLabel( p_SpawnKillLabel[ playerid ] );
|
||||
p_SpawnKillLabel[ playerid ] = Create3DTextLabel( "Spawn Protected!", COLOR_GOLD, 0.0, 0.0, 0.0, 15.0, 0 );
|
||||
p_AntiSpawnKill[ playerid ] = g_iTime + 15;
|
||||
Attach3DTextLabelToPlayer( p_SpawnKillLabel[ playerid ], playerid, 0.0, 0.0, 0.3 );
|
||||
p_AntiSpawnKillEnabled{ playerid } = true;
|
||||
|
||||
// Toggle Passive Mode
|
||||
SetPlayerPassiveMode( playerid );
|
||||
// Toggle Passive Mode
|
||||
SetPlayerPassiveMode( playerid );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define MAX_SETTINGS ( 13 )
|
||||
#define MAX_SETTINGS ( 14 )
|
||||
|
||||
#define SETTING_BAILOFFERS ( 0 )
|
||||
#define SETTING_EVENT_TP ( 1 )
|
||||
@ -24,13 +24,14 @@
|
||||
#define SETTING_TOP_DONOR ( 10 )
|
||||
#define SETTING_WEAPON_PICKUP ( 11 )
|
||||
#define SETTING_PASSIVE_MODE ( 12 )
|
||||
#define SETTING_CHAT_ID ( 13 )
|
||||
|
||||
/* ** Variables ** */
|
||||
static stock
|
||||
g_PlayerSettings [ MAX_SETTINGS ] [ 24 ] = {
|
||||
{ "Prevent Bail Offers" }, { "Prevent Event Teleports" }, { "Prevent Gang Invites" }, { "Prevent Chat Prefixes" }, { "Prevent Ransom Offers" },
|
||||
{ "Prevent Auto-Save" }, { "Display Connection Log" }, { "Display Hitmarker" }, { "Set V.I.P Skin" }, { "Hide Total Coin Bar" }, { "Hide Last Donor Text" },
|
||||
{ "Manual Pickup Weapon" }, { "Prevent Passive Mode" }
|
||||
{ "Manual Pickup Weapon" }, { "Prevent Passive Mode" }, { "Display Chat ID's" }
|
||||
},
|
||||
bool: p_PlayerSettings [ MAX_PLAYERS ] [ MAX_SETTINGS char ]
|
||||
;
|
||||
@ -160,7 +161,7 @@ CMD:passive( playerid, params[ ] )
|
||||
return 1;
|
||||
}
|
||||
|
||||
CMD:passivelist( playerid, params[ ])
|
||||
CMD:passivelist( playerid, params[ ] )
|
||||
{
|
||||
new
|
||||
count = 0;
|
||||
@ -187,7 +188,6 @@ stock IsPlayerSettingToggled( playerid, settingid ) {
|
||||
return p_PlayerSettings[ playerid ] { settingid };
|
||||
}
|
||||
|
||||
|
||||
stock IsPlayerVIPSkinToggled( playerid ) {
|
||||
return p_PlayerSettings[ playerid ] { SETTING_VIPSKIN };
|
||||
}
|
||||
|
@ -10,20 +10,17 @@
|
||||
//#include < physics_dynamic >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define POCKET_RADIUS 0.09
|
||||
#define POOL_TIMER_SPEED 30
|
||||
#define DEFAULT_AIM 0.38
|
||||
#define POCKET_RADIUS ( 0.09 )
|
||||
#define POOL_TIMER_SPEED ( 30 )
|
||||
#define DEFAULT_AIM ( 0.38 )
|
||||
#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_BALLS (16) // do not modify
|
||||
|
||||
//#define DIALOG_POOL_WAGER 3284
|
||||
#define MAX_POOL_TABLES ( 48 )
|
||||
#define MAX_POOL_BALLS ( 16 ) // do not modify
|
||||
|
||||
/* ** Macros ** */
|
||||
#define SendPoolMessage(%0,%1) \
|
||||
SendClientMessageFormatted(%0, -1, "{4B8774}[POOL] {E5861A}" # %1)
|
||||
#define SendPoolMessage(%0,%1) SendClientMessageFormatted(%0, -1, "{4B8774}[POOL] {E5861A}" # %1)
|
||||
|
||||
/* ** Constants (do not modify) ** */
|
||||
enum E_POOL_BALL_TYPE {
|
||||
@ -133,14 +130,14 @@ forward PlayPoolSound ( poolid, soundid );
|
||||
hook OnScriptInit( )
|
||||
{
|
||||
// textdraws
|
||||
g_PoolTextdraw = TextDrawCreate(529.000000, 218.000000, "Power");
|
||||
TextDrawBackgroundColor(g_PoolTextdraw, 255);
|
||||
TextDrawFont(g_PoolTextdraw, 1);
|
||||
TextDrawLetterSize(g_PoolTextdraw, 0.300000, 1.299998);
|
||||
TextDrawColor(g_PoolTextdraw, -1);
|
||||
TextDrawSetOutline(g_PoolTextdraw, 1);
|
||||
TextDrawSetProportional(g_PoolTextdraw, 1);
|
||||
TextDrawSetSelectable(g_PoolTextdraw, 0);
|
||||
g_PoolTextdraw = TextDrawCreate( 529.000000, 218.000000, "Power" );
|
||||
TextDrawBackgroundColor( g_PoolTextdraw, 255 );
|
||||
TextDrawFont( g_PoolTextdraw, 1 );
|
||||
TextDrawLetterSize( g_PoolTextdraw, 0.300000, 1.299998 );
|
||||
TextDrawColor( g_PoolTextdraw, -1 );
|
||||
TextDrawSetOutline( g_PoolTextdraw, 1 );
|
||||
TextDrawSetProportional( g_PoolTextdraw, 1 );
|
||||
TextDrawSetSelectable( g_PoolTextdraw, 0 );
|
||||
|
||||
// create static pooltables
|
||||
CreatePoolTableEx( 510.10159, -84.83590, 998.9375, 90.00000, POOL_SKIN_DEFAULT, 11, 7, 54, 55, 56, 50, 52, 51, 15, 10, 21, 58, 48, 17, 36, 41, 22 );
|
||||
|
@ -117,7 +117,7 @@ hook OnPlayerDisconnect( playerid, reason )
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined DEBUG_MODE
|
||||
#if !defined DEBUG_MODE
|
||||
// prevent player from leaking rcon password
|
||||
hook OnPlayerText( playerid, text[ ] )
|
||||
{
|
||||
|
@ -1934,6 +1934,18 @@ public OnPlayerText( playerid, text[ ] )
|
||||
new
|
||||
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 ( !p_PlayerLogged{ playerid } )
|
||||
return SendError( playerid, "You must be logged in to talk." ), 0;
|
||||
|
||||
#if !defined DEBUG_MODE
|
||||
GetServerVarAsString( "rcon_password", szNormalString, sizeof( szNormalString ) ); // Anti-rcon spam poop
|
||||
if ( strfind( text, szNormalString, true ) != -1 )
|
||||
return SendError( playerid, "An error occured, please try again." ), 0;
|
||||
#endif
|
||||
|
||||
if ( textContainsIP( text ) )
|
||||
return SendServerMessage( playerid, "Please do not advertise." ), 0;
|
||||
|
||||
@ -1967,7 +1979,6 @@ public OnPlayerText( playerid, text[ ] )
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! IsPlayerSettingToggled( playerid, SETTING_CHAT_PREFIXES ) )
|
||||
{
|
||||
switch( text[ 0 ] )
|
||||
@ -2000,6 +2011,12 @@ public OnPlayerText( playerid, text[ ] )
|
||||
}
|
||||
}
|
||||
DCC_SendChannelMessageFormatted( discordGeneralChan, "**%s(%d):** %s", ReturnPlayerName( playerid ), playerid, text ); // p_Class[ playerid ] == CLASS_POLICE ? 12 : 4
|
||||
|
||||
foreach ( new iPlayer : Player )
|
||||
{
|
||||
if ( IsPlayerSettingToggled( iPlayer, SETTING_CHAT_ID ) )
|
||||
return SendClientMessageFormatted( iPlayer, GetPlayerColor( playerid ), "%s(%d): "COL_WHITE"%s", ReturnPlayerName( playerid ), playerid, text ), 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user