duel arena, discord url, public gangs via /gangs, increase speed of progress bars

This commit is contained in:
Lorenc Pekaj 2018-06-27 18:12:26 +10:00
parent cf301ac290
commit e7d3b3f105
10 changed files with 938 additions and 265 deletions

View File

@ -142,7 +142,7 @@ new bool: False = false;
#define CreateBillboard(%0,%1,%2,%3,%4) SetDynamicObjectMaterialText(CreateDynamicObject(7246,%1,%2,%3,0,0,%4),0,(%0),120,"Arial",24,0,-1,-16777216,1) #define CreateBillboard(%0,%1,%2,%3,%4) SetDynamicObjectMaterialText(CreateDynamicObject(7246,%1,%2,%3,0,0,%4),0,(%0),120,"Arial",24,0,-1,-16777216,1)
/* ** Configuration ** */ /* ** Configuration ** */
#define FILE_BUILD "v11.25.80" #define FILE_BUILD "v11.30.90"
#define SERVER_NAME "San Fierro Cops And Robbers (0.3.7)" #define SERVER_NAME "San Fierro Cops And Robbers (0.3.7)"
#define SERVER_WEBSITE "www.irresistiblegaming.com" #define SERVER_WEBSITE "www.irresistiblegaming.com"
#define SERVER_IP "192.169.82.202:7777" #define SERVER_IP "192.169.82.202:7777"
@ -207,23 +207,6 @@ enum E_DONATION_DATA
#define JOB_DIRTY_MECHANIC ( 7 ) #define JOB_DIRTY_MECHANIC ( 7 )
#define JOB_BURGLAR ( 8 ) #define JOB_BURGLAR ( 8 )
/* ** Class ID's ** */
static const CLASS_NAMES [ ] [ ] = { "Civilian", "Police", "FBI", "Army", "CIA", "Paramedic", "Fireman" };
static const CLASS_COLORS [ ] = { 0xC0C0C0FF, 0x3E7EFFFF, 0x0035FFFF, 0x954BFFFF, 0x191970FF, 0x4DFF4DFF, 0xA83434FF };
static CLASS_CIVILIAN_RANGE [ 2 ];
static CLASS_POLICE_RANGE [ 2 ];
static CLASS_FBI_RANGE [ 2 ];
static CLASS_CIA_RANGE [ 2 ];
static CLASS_FIRE_RANGE [ 2 ];
static CLASS_MEDIC_RANGE [ 2 ];
static CLASS_ARMY_RANGE;
#define CLASS_CIVILIAN ( 0 )
#define CLASS_POLICE ( 1 )
#define CLASS_FIREMAN ( 2 )
#define CLASS_MEDIC ( 3 )
/* ** Checkpoints ** */ /* ** Checkpoints ** */
#define ALL_CHECKPOINTS ( 40 ) #define ALL_CHECKPOINTS ( 40 )
@ -1310,7 +1293,7 @@ new
bool: p_isMining [ MAX_PLAYERS char ], bool: p_isMining [ MAX_PLAYERS char ],
g_orePrices [ ] = { 675, 900, 600, 2750, 3000, 3500, 4000, 2200, 2300, 1200 }, g_orePrices [ ] = { 675, 900, 600, 2750, 3000, 3500, 4000, 2200, 2300, 1200 },
g_oreMiningTime [ ] = { 200, 280, 160, 680, 720, 760, 800, 640, 656, 400 }, g_oreMiningTime [ ] = { 2000, 2800, 1600, 6800, 7200, 7600, 8000, 6400, 6560, 4000 },
g_oreQuanities [ ] = { 8, 8, 8, 8, 5, 3, 3, 5, 5, 6 }, g_oreQuanities [ ] = { 8, 8, 8, 8, 5, 3, 3, 5, 5, 6 },
// Iterator // Iterator
@ -1999,24 +1982,24 @@ new
enum E_SHOP_DATA enum E_SHOP_DATA
{ {
bool: E_SAVABLE, E_NAME[ 24 ], E_USAGE[ 32 ], bool: E_SAVABLE, E_NAME[ 24 ], E_USAGE[ 32 ],
E_LIMIT, E_PRICE E_LIMIT, E_PRICE, E_ID
}; };
new new
g_shopItemData[ ] [ E_SHOP_DATA ] = g_shopItemData[ ] [ E_SHOP_DATA ] =
{ {
{ true , "Drain Cleaner", "Caustic Soda", LIMIT_CS, 150 }, // 0 { true , "Drain Cleaner", "Caustic Soda", LIMIT_CS, 150, 1 }, // 0
{ true , "Stone Cleaner", "Muriatic Acid", LIMIT_MU, 250 }, // 1 { true , "Stone Cleaner", "Muriatic Acid", LIMIT_MU, 250, 2 }, // 1
{ true , "Gas Tank", "Hydrogen Chloride", LIMIT_HCL, 300 }, // 2 { true , "Gas Tank", "Hydrogen Chloride", LIMIT_HCL, 300, 3 }, // 2
{ false, "Chastity Belt", "Preventation of Aids", LIMIT_ONE, 500 }, // 3 { false, "Chastity Belt", "Protection from aids", LIMIT_ONE, 500, 4 }, // 3
{ false, "Secure Wallet", "Less Being Robbed Chance", LIMIT_ONE, 600 }, // 4 { false, "Secure Wallet", "Protection from robberies", LIMIT_ONE, 600, 5 }, // 4
{ true , "Scissors", "/cuttie", LIMIT_SCISSORS, 750 }, // 5 { true , "Scissors", "Automatically cut ties", LIMIT_SCISSORS, 1000, 6 }, // 5
{ true , "Bobby Pin", "Automatically break cuffs", LIMIT_PINS, 1200 }, // 6 [1000] -makecopgreatagain { true , "Rope", "/tie", LIMIT_ROPES, 1500, 7 }, // 8 [1500]
{ false, "Money Case", "Increases Robbing Amount", LIMIT_ONE, 1500 }, // 7 [1250] { true , "Bobby Pin", "Automatically break cuffs", LIMIT_PINS, 2500, 8 }, // 6 [1000] -makecopgreatagain
{ true , "Rope", "/tie", LIMIT_ROPES, 1750 }, // 8 [1500] { true , "Aluminium Foil", "Automatically deflect EMP", LIMIT_FOIL, 2500, 9 }, // 9
{ true , "Aluminium Foil", "Deflects EMP", LIMIT_FOIL, 1750 }, // 9 { false, "Money Case", "Increases robbing amount", LIMIT_ONE, 3000, 10 }, // 7 [1250]
{ true , "Thermal Drill", "Halves Safe Cracking Time", LIMIT_ONE, 5000 }, // 10 { true , "Thermal Drill", "Halves safe cracking time", LIMIT_ONE, 5000, 11 }, // 10
{ true , "Metal Melter", "/breakout", LIMIT_MELTER, 7500 } // 11 { true , "Metal Melter", "/breakout", LIMIT_MELTER, 7500, 12 } // 11
} }
; ;
@ -2150,7 +2133,7 @@ new
/* ** Jail System ** */ /* ** Jail System ** */
#define JAIL_SECONDS_MULTIPLIER ( 5 ) #define JAIL_SECONDS_MULTIPLIER ( 5 )
#define ALCATRAZ_REQUIRED_TIME ( 300 ) #define ALCATRAZ_REQUIRED_TIME ( 150 )
#define ALCATRAZ_TIME_PAUSE ( 5 ) #define ALCATRAZ_TIME_PAUSE ( 5 )
#define ALCATRAZ_TIME_WANTED ( 600 ) #define ALCATRAZ_TIME_WANTED ( 600 )
@ -3275,6 +3258,7 @@ public OnGameModeInit()
AddServerVariable( "proxyban", "0", GLOBAL_VARTYPE_INT ); AddServerVariable( "proxyban", "0", GLOBAL_VARTYPE_INT );
AddServerVariable( "hitman_budget", "0", GLOBAL_VARTYPE_INT ); AddServerVariable( "hitman_budget", "0", GLOBAL_VARTYPE_INT );
AddServerVariable( "connectsong", "http://files.irresistiblegaming.com/game_sounds/Stevie%20Wonder%20-%20Skeletons.mp3", GLOBAL_VARTYPE_STRING ); AddServerVariable( "connectsong", "http://files.irresistiblegaming.com/game_sounds/Stevie%20Wonder%20-%20Skeletons.mp3", GLOBAL_VARTYPE_STRING );
AddServerVariable( "discordurl", "http://irresistiblegaming.com", GLOBAL_VARTYPE_STRING );
/* ** CIVILIAN ** */ /* ** CIVILIAN ** */
CLASS_CIVILIAN_RANGE[ 0 ] = AddPlayerClass( 119, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 0 CLASS_CIVILIAN_RANGE[ 0 ] = AddPlayerClass( 119, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 0
@ -5331,7 +5315,7 @@ public OnServerUpdate( )
cur = gangid; cur = gangid;
printf("Removed Gang From Cache Gang Id %d Since No Ppl", g_gangData[ gangid ] [ E_SQL_ID ] ); printf("Removed Gang From Cache Gang Id %d Since No Ppl", g_gangData[ gangid ] [ E_SQL_ID ] );
DestroyGang( gangid, .soft_delete = true, .iter_remove = false ); DestroyGang( gangid, true, .iter_remove = false );
Iter_SafeRemove( gangs, cur, gangid ); Iter_SafeRemove( gangs, cur, gangid );
} }
else g_gangData[ gangid ] [ E_SOFT_DELETE_TS ] = 0; else g_gangData[ gangid ] [ E_SOFT_DELETE_TS ] = 0;
@ -6930,7 +6914,7 @@ public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:f
return 0; return 0;
// Anti Random Deathmatch // Anti Random Deathmatch
if ( IsRandomDeathmatch( playerid, iDriver ) && !IsPlayerInPaintBall( playerid ) && !IsPlayerInEvent( playerid ) ) if ( IsRandomDeathmatch( playerid, iDriver ) && ! IsPlayerInPaintBall( playerid ) && ! IsPlayerInEvent( playerid ) && ! IsPlayerDueling( playerid ) )
return 0; return 0;
if ( p_WantedLevel[ playerid ] <= 2 && p_Class[ playerid ] != CLASS_POLICE && p_Class[ iDriver ] == CLASS_POLICE && GetPVarInt( playerid, "ShotCopWantedCD" ) < g_iTime ) if ( p_WantedLevel[ playerid ] <= 2 && p_Class[ playerid ] != CLASS_POLICE && p_Class[ iDriver ] == CLASS_POLICE && GetPVarInt( playerid, "ShotCopWantedCD" ) < g_iTime )
@ -6948,7 +6932,7 @@ public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:f
stock CreateExplosiveBullet( playerid ) { stock CreateExplosiveBullet( playerid ) {
if ( IsPlayerInCasino( playerid ) || IsPlayerInPaintBall( playerid ) || IsPlayerInEvent( playerid ) ) if ( IsPlayerInCasino( playerid ) || IsPlayerInPaintBall( playerid ) || IsPlayerInEvent( playerid ) || IsPlayerDueling( playerid ) )
return; return;
if ( GetPVarInt( playerid, "explosive_rounds" ) == 1 && p_ExplosiveBullets[ playerid ] > 0 ) if ( GetPVarInt( playerid, "explosive_rounds" ) == 1 && p_ExplosiveBullets[ playerid ] > 0 )
@ -7129,7 +7113,7 @@ public OnPlayerTakePlayerDamage( playerid, issuerid, &Float: amount, weaponid, b
return 0; return 0;
// Anti RDM and gang member damage // Anti RDM and gang member damage
if ( ! IsPlayerInEvent( playerid ) && ! IsPlayerInPaintBall( playerid ) && ! IsPlayerBoxing( playerid ) ) if ( ! IsPlayerInEvent( playerid ) && ! IsPlayerInPaintBall( playerid ) && ! IsPlayerBoxing( playerid ) && ! IsPlayerDueling( playerid ) )
{ {
if ( IsPlayerInPlayerGang( issuerid, playerid ) ) if ( IsPlayerInPlayerGang( issuerid, playerid ) )
return ShowPlayerHelpDialog( issuerid, 2000, "You cannot damage your homies!" ), 0; return ShowPlayerHelpDialog( issuerid, 2000, "You cannot damage your homies!" ), 0;
@ -7420,32 +7404,14 @@ public OnPlayerDeath( playerid, killerid, reason )
} }
/* ** Tax And Medical Fees ** */ /* ** Tax And Medical Fees ** */
// check if player has any money
if ( GetPlayerTotalCash( playerid ) > 0 ) if ( GetPlayerTotalCash( playerid ) > 0 )
{ {
new medical_fees = p_inPaintBall{ playerid } ? 0 : 100; new medical_fees = ( IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) || IsPlayerInEvent( playerid ) ) ? 0 : 100;
if ( medical_fees ) { if ( medical_fees ) {
ShowPlayerHelpDialog( playerid, 5000, sprintf( "~w~You have paid ~r~%s~w~ in medical fees", number_format( medical_fees ) ) ); ShowPlayerHelpDialog( playerid, 5000, sprintf( "~w~You have paid ~r~%s~w~ in medical fees", number_format( medical_fees ) ) );
GivePlayerCash( playerid, -medical_fees ); GivePlayerCash( playerid, -medical_fees );
} }
/*if ( ( p_Uptime[ playerid ] > p_TaxTime[ playerid ] && p_inPaintBall{ playerid } != true ) && player_tax > 0 )
{
GivePlayerCash( playerid, -player_tax );
// save to database
p_TaxTime[ playerid ] = ( p_TaxTime[ playerid ] > p_Uptime[ playerid ] ? p_TaxTime[ playerid ] : p_Uptime[ playerid ] ) + 1800;
mysql_single_query( sprintf( "UPDATE `USERS` SET `TAX_TIME`=%d WHERE `ID`=%d", p_TaxTime[ playerid ], p_AccountID[ playerid ] ) );
// event bank
if ( player_tax > 10000 ) UpdateServerVariable( "eventbank", GetGVarInt( "eventbank" ) + floatround( float( player_tax ) * 0.10 ), 0.0, "", GLOBAL_VARTYPE_INT );
// format string
if ( strlen( szTaxable ) ) format( szTaxable, sizeof( szTaxable ), "%s and ~r~%s~w~ in tax", szTaxable, number_format( player_tax ) );
else format( szTaxable, sizeof( szTaxable ), "~w~You have paid ~r~%s~w~ in tax", number_format( player_tax ) );
}*/
} }
/* ** End Of Tax And Medical Fees ** */ /* ** End Of Tax And Medical Fees ** */
@ -10098,7 +10064,7 @@ CMD:robitems( playerid, params[ ] )
if ( IsPlayerCuffed( playerid ) ) return SendError( playerid, "You cannot use this command since you're cuffed." ); if ( IsPlayerCuffed( playerid ) ) return SendError( playerid, "You cannot use this command since you're cuffed." );
if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You cannot use this command since you're tied." ); if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You cannot use this command since you're tied." );
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." ); if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." );
if ( IsPlayerInPaintBall( playerid ) ) return SendError( playerid, "You cannot use this command since you're inside the paintball arena." ); if ( IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) ) return SendError( playerid, "You cannot use this command since you're inside an arena." );
if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You cannot use this command inside a vehicle." ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You cannot use this command inside a vehicle." );
if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." ); if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." );
if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." ); if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." );
@ -10182,7 +10148,7 @@ CMD:bruteforce( playerid, params[ ] )
g_houseData[ i ] [ E_BEING_CRACKED ] = true; g_houseData[ i ] [ E_BEING_CRACKED ] = true;
p_HouseCrackingPW[ playerid ] = i; p_HouseCrackingPW[ playerid ] = i;
SetPVarInt( playerid, "last_bruteforce", g_iTime + 30 ); SetPVarInt( playerid, "last_bruteforce", g_iTime + 30 );
ShowProgressBar( playerid, "Brute Forcing Password", PROGRESS_BRUTEFORCE, 500, COLOR_BLUE ); ShowProgressBar( playerid, "Brute Forcing Password", PROGRESS_BRUTEFORCE, 5000, COLOR_BLUE );
return 1; return 1;
} }
} }
@ -10262,7 +10228,7 @@ CMD:burglar( playerid, params[ ] )
g_businessData[ handle ] [ E_BEING_CRACKED ] = true; g_businessData[ handle ] [ E_BEING_CRACKED ] = true;
SetPVarInt( playerid, "crackpw_biz", handle ); SetPVarInt( playerid, "crackpw_biz", handle );
SetPVarInt( playerid, "crackpw_cool", g_iTime + 40 ); SetPVarInt( playerid, "crackpw_cool", g_iTime + 40 );
ShowProgressBar( playerid, "Cracking Password", PROGRESS_CRACKING_BIZ, 750, COLOR_WHITE ); ShowProgressBar( playerid, "Cracking Password", PROGRESS_CRACKING_BIZ, 7500, COLOR_WHITE );
return 1; return 1;
} }
} }
@ -10289,7 +10255,7 @@ CMD:burglar( playerid, params[ ] )
g_houseData[ i ] [ E_BEING_CRACKED ] = true; g_houseData[ i ] [ E_BEING_CRACKED ] = true;
p_HouseCrackingPW[ playerid ] = i; p_HouseCrackingPW[ playerid ] = i;
SetPVarInt( playerid, "crackpw_cool", g_iTime + 40 ); SetPVarInt( playerid, "crackpw_cool", g_iTime + 40 );
ShowProgressBar( playerid, "Cracking Password", PROGRESS_CRACKING, 750, COLOR_WHITE ); ShowProgressBar( playerid, "Cracking Password", PROGRESS_CRACKING, 7500, COLOR_WHITE );
return 1; return 1;
} }
} }
@ -10480,7 +10446,7 @@ CMD:ransom( playerid, params[ ] )
if ( !IsPlayerTied( victimid ) ) return SendError( playerid, "This player must be tied in order to create a ransom." ); if ( !IsPlayerTied( victimid ) ) return SendError( playerid, "This player must be tied in order to create a ransom." );
if ( IsPlayerCuffed( playerid ) ) return SendError( playerid, "You cannot use this command while you're cuffed." ); if ( IsPlayerCuffed( playerid ) ) return SendError( playerid, "You cannot use this command while you're cuffed." );
if ( IsPlayerTazed( playerid ) ) return SendError( playerid, "You cannot use this command while you're tazed." ); if ( IsPlayerTazed( playerid ) ) return SendError( playerid, "You cannot use this command while you're tazed." );
if ( IsPlayerInPaintBall( playerid ) ) return SendError( playerid, "You cannot use this command since you're inside the paintball arena." ); if ( IsPlayerInPaintBall( playerid ) ) return SendError( playerid, "You cannot use this command since you're inside an arena." );
SendClientMessageFormatted( victimid, -1, ""COL_RED"[RANSOM]{FFFFFF} You have been offered a ransom of "COL_GOLD"%s"COL_WHITE" for your release. Use /ransompay to pay the ransom.", number_format( amount ) ); SendClientMessageFormatted( victimid, -1, ""COL_RED"[RANSOM]{FFFFFF} You have been offered a ransom of "COL_GOLD"%s"COL_WHITE" for your release. Use /ransompay to pay the ransom.", number_format( amount ) );
SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[RANSOM]{FFFFFF} You have offered a ransom to %s(%d) of "COL_GOLD"%s"COL_WHITE".", ReturnPlayerName( victimid ), victimid, number_format( amount ) ); SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[RANSOM]{FFFFFF} You have offered a ransom to %s(%d) of "COL_GOLD"%s"COL_WHITE".", ReturnPlayerName( victimid ), victimid, number_format( amount ) );
@ -11340,7 +11306,8 @@ CMD:weed( playerid, params[ ] )
if ( p_Class[ playerid ] != CLASS_CIVILIAN ) return SendError( playerid, "You are not a civilian." ); if ( p_Class[ playerid ] != CLASS_CIVILIAN ) return SendError( playerid, "You are not a civilian." );
if ( IsPlayerTied( playerid ) || IsPlayerTazed( playerid ) || IsPlayerCuffed( playerid ) || IsPlayerJailed( playerid ) || IsPlayerInPaintBall( playerid ) ) return SendError( playerid, "You cannot use this command at the moment." ); if ( IsPlayerTied( playerid ) || IsPlayerTazed( playerid ) || IsPlayerCuffed( playerid ) || IsPlayerJailed( playerid ) || IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) )
return SendError( playerid, "You cannot use this command at the moment." );
if ( isnull( params ) ) return SendUsage( playerid, "/weed [COLLECT/SELL/BUY/USE]" ); if ( isnull( params ) ) return SendUsage( playerid, "/weed [COLLECT/SELL/BUY/USE]" );
else if ( strmatch( params, "collect" ) ) else if ( strmatch( params, "collect" ) )
@ -11412,7 +11379,7 @@ CMD:weed( playerid, params[ ] )
; ;
if ( GetPlayerCash( playerid ) < iCost ) return SendError( playerid, "You need %s to buy %d grams of weed.", number_format( iCost ), iGrams ); if ( GetPlayerCash( playerid ) < iCost ) return SendError( playerid, "You need %s to buy %d grams of weed.", number_format( iCost ), iGrams );
else if ( IsPlayerInPaintBall( dealerid ) ) return SendError( playerid, "Your dealer cannot deal while he's in paintball." ); else if ( IsPlayerInPaintBall( dealerid ) || IsPlayerDueling( dealerid ) ) return SendError( playerid, "Your dealer cannot deal in an arena." );
else if ( p_Class[ dealerid ] != CLASS_CIVILIAN ) return p_WeedDealer[ playerid ] = INVALID_PLAYER_ID, SendError( playerid, "This deal has ended, the dealer is not a civilian." ); else if ( p_Class[ dealerid ] != CLASS_CIVILIAN ) return p_WeedDealer[ playerid ] = INVALID_PLAYER_ID, SendError( playerid, "This deal has ended, the dealer is not a civilian." );
else if ( !JobEquals( dealerid, JOB_DRUG_DEALER ) ) return SendError( playerid, "Your dealer no longer does drugs." ); else if ( !JobEquals( dealerid, JOB_DRUG_DEALER ) ) return SendError( playerid, "Your dealer no longer does drugs." );
else if ( !p_WeedGrams[ dealerid ] ) return p_WeedDealer[ playerid ] = INVALID_PLAYER_ID, SendError( playerid, "Your dealer doesn't have any more weed." ); else if ( !p_WeedGrams[ dealerid ] ) return p_WeedDealer[ playerid ] = INVALID_PLAYER_ID, SendError( playerid, "Your dealer doesn't have any more weed." );
@ -12114,7 +12081,7 @@ CMD:viewguns( playerid, params[ ] )
if ( !IsPlayerConnected( p_WeaponDealer[ playerid ] ) ) return p_WeaponDealer[ playerid ] = INVALID_PLAYER_ID, SendError( playerid, "Your weapon dealer isn't available." ); if ( !IsPlayerConnected( p_WeaponDealer[ playerid ] ) ) return p_WeaponDealer[ playerid ] = INVALID_PLAYER_ID, SendError( playerid, "Your weapon dealer isn't available." );
else if ( g_iTime > p_WeaponDealTick[ playerid ] ) return SendError( playerid, "Your last weapon deal has expired." ); else if ( g_iTime > p_WeaponDealTick[ playerid ] ) return SendError( playerid, "Your last weapon deal has expired." );
else if ( IsPlayerInPaintBall( playerid ) ) return SendError( playerid, "You can't buy weapons in paintball." ); else if ( IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) ) return SendError( playerid, "You can't buy weapons in an arena." );
else else
{ {
p_WeaponDealing{ playerid } = true; p_WeaponDealing{ playerid } = true;
@ -12139,7 +12106,7 @@ CMD:sellgun( playerid, params[ ] )
else if ( p_WeaponDealing{ pID } == true ) return SendError( playerid, "This player is currently busy." ); else if ( p_WeaponDealing{ pID } == true ) return SendError( playerid, "This player is currently busy." );
else if ( p_Jailed{ playerid } ) return SendError( playerid, "You cannot sell weapons while you're in jail." ); else if ( p_Jailed{ playerid } ) return SendError( playerid, "You cannot sell weapons while you're in jail." );
else if ( p_Jailed{ pID } ) return SendError( playerid, "This player is jailed, you cannot sell weapons to him." ); else if ( p_Jailed{ pID } ) return SendError( playerid, "This player is jailed, you cannot sell weapons to him." );
else if ( IsPlayerInPaintBall( pID ) ) return SendError( playerid, "You can't sell weapons in paintball." ); else if ( IsPlayerInPaintBall( pID ) || IsPlayerDueling( pID ) ) return SendError( playerid, "You can't sell weapons in an arena." );
else if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an event." ); else if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an event." );
else if ( GetDistanceBetweenPlayers( playerid, pID ) < 5.0 ) else if ( GetDistanceBetweenPlayers( playerid, pID ) < 5.0 )
{ {
@ -12240,7 +12207,8 @@ CMD:bail( playerid, params[ ] )
else if ( GetPVarInt( pID, "bail_antispam" ) > g_iTime ) return SendError( playerid, "You must wait 10 seconds before offering a bail to this player." ); else if ( GetPVarInt( pID, "bail_antispam" ) > g_iTime ) return SendError( playerid, "You must wait 10 seconds before offering a bail to this player." );
else else
{ {
equa = 25 * p_JailTime[ pID ]; equa = 30 * p_JailTime[ pID ];
if ( p_JailTime[ pID ] >= ALCATRAZ_TIME_WANTED ) equa *= 2;
p_BailOfferer[ pID ] = playerid; p_BailOfferer[ pID ] = playerid;
p_BailTimestamp[ pID ] = g_iTime + 120; p_BailTimestamp[ pID ] = g_iTime + 120;
SetPVarInt( pID, "bail_antispam", g_iTime + 1 ); SetPVarInt( pID, "bail_antispam", g_iTime + 1 );
@ -12253,8 +12221,11 @@ CMD:bail( playerid, params[ ] )
CMD:acceptbail( playerid, params[ ] ) CMD:acceptbail( playerid, params[ ] )
{ {
new new
equa = 25 * p_JailTime[ playerid ] equa = 30 * p_JailTime[ playerid ];
;
if ( p_JailTime[ playerid ] >= ALCATRAZ_TIME_WANTED )
equa *= 2;
if ( GetPlayerCash( playerid ) < equa ) return p_BailOfferer[ playerid ] = INVALID_PLAYER_ID, SendError( playerid, "You don't have enough to be bailed." ); if ( GetPlayerCash( playerid ) < equa ) return p_BailOfferer[ playerid ] = INVALID_PLAYER_ID, SendError( playerid, "You don't have enough to be bailed." );
else if ( IsPlayerAdminJailed( playerid ) ) return p_BailOfferer[ playerid ] = INVALID_PLAYER_ID, SendError( playerid, "You have been admin jailed, therefore disallowing this." ); else if ( IsPlayerAdminJailed( playerid ) ) return p_BailOfferer[ playerid ] = INVALID_PLAYER_ID, SendError( playerid, "You have been admin jailed, therefore disallowing this." );
else if ( !IsPlayerJailed( playerid ) ) return SendError( playerid, "You're not jailed!" ); else if ( !IsPlayerJailed( playerid ) ) return SendError( playerid, "You're not jailed!" );
@ -12337,7 +12308,7 @@ CMD:bj( playerid, params[ ] )
else if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot offer blowjobs in jail." ); else if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot offer blowjobs in jail." );
else if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." ); else if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." );
else if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." ); else if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." );
else if ( IsPlayerInPaintBall( playerid ) ) return SendError( playerid, "You don't know how to give oral sex in paintball." ); else if ( IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) ) return SendError( playerid, "You cannot use this command at an arena." );
else if ( GetDistanceBetweenPlayers( playerid, pID ) < 4.0 ) else if ( GetDistanceBetweenPlayers( playerid, pID ) < 4.0 )
{ {
if ( IsPlayerJailed( pID ) ) return SendError( playerid, "This player is jailed. He may be paused." ); if ( IsPlayerJailed( pID ) ) return SendError( playerid, "This player is jailed. He may be paused." );
@ -13538,7 +13509,7 @@ CMD:kidnap( playerid, params[ ] )
if ( IsPlayerKidnapped( victimid ) ) return SendError( playerid, "This player is already kidnapped!" ); if ( IsPlayerKidnapped( victimid ) ) return SendError( playerid, "This player is already kidnapped!" );
if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." ); if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." );
if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." ); if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." );
if ( IsPlayerInPaintBall( playerid ) ) return SendError( playerid, "You cannot use this command since you're inside the paintball arena." ); if ( IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) ) return SendError( playerid, "You cannot use this command at an arena." );
if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." ); if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." );
if ( p_KidnapImmunity[ victimid ] > g_iTime ) return SendError( playerid, "This player cannot be kidnapped for another %s.", secondstotime( p_KidnapImmunity[ victimid ] - g_iTime ) ); if ( p_KidnapImmunity[ victimid ] > g_iTime ) return SendError( playerid, "This player cannot be kidnapped for another %s.", secondstotime( p_KidnapImmunity[ victimid ] - g_iTime ) );
if ( PutPlayerInEmptyVehicleSeat( p_LastVehicle[ playerid ], victimid ) == -1 ) return SendError( playerid, "Failed to place the player inside a full of player vehicle." ); if ( PutPlayerInEmptyVehicleSeat( p_LastVehicle[ playerid ], victimid ) == -1 ) return SendError( playerid, "Failed to place the player inside a full of player vehicle." );
@ -13604,7 +13575,7 @@ CMD:tie( playerid, params[ ] )
if ( IsPlayerCuffed( victimid ) ) return SendError( playerid, "The person you're trying to tie is cuffed." ); if ( IsPlayerCuffed( victimid ) ) return SendError( playerid, "The person you're trying to tie is cuffed." );
if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." ); if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." );
if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." ); if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." );
if ( IsPlayerInPaintBall( playerid ) ) return SendError( playerid, "You cannot use this command since you're inside the paintball arena." ); if ( IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) ) return SendError( playerid, "You cannot use this command at an arena." );
if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." ); if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." );
if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." ); if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." );
if ( IsPlayerLoadingObjects( victimid ) ) return SendError( playerid, "This player is in a object-loading state." ); if ( IsPlayerLoadingObjects( victimid ) ) return SendError( playerid, "This player is in a object-loading state." );
@ -13955,7 +13926,7 @@ CMD:rob( playerid, params[ ] )
if ( IsPlayerCuffed( playerid ) ) return SendError( playerid, "You cannot use this command since you're cuffed." ); if ( IsPlayerCuffed( playerid ) ) return SendError( playerid, "You cannot use this command since you're cuffed." );
if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You cannot use this command since you're tied." ); if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You cannot use this command since you're tied." );
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." ); if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." );
if ( IsPlayerInPaintBall( playerid ) ) return SendError( playerid, "You cannot use this command since you're inside the paintball arena." ); if ( IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) ) return SendError( playerid, "You cannot use this command since you're inside an arena." );
if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." ); if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." );
if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." ); if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." );
if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." ); if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." );
@ -14024,7 +13995,7 @@ CMD:rape( playerid, params[ ] )
if ( IsPlayerCuffed( playerid ) ) return SendError( playerid, "You cannot use this command since you're cuffed." ); if ( IsPlayerCuffed( playerid ) ) return SendError( playerid, "You cannot use this command since you're cuffed." );
if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You cannot use this command since you're tied." ); if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You cannot use this command since you're tied." );
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." ); if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." );
if ( IsPlayerInPaintBall( playerid ) ) return SendError( playerid, "You cannot use this command since you're inside the paintball arena." ); if ( IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) ) return SendError( playerid, "You cannot use this command since you're inside an arena." );
if ( p_Jailed{ playerid } == true ) return SendError( playerid, "You cannot rape in jail." ); if ( p_Jailed{ playerid } == true ) return SendError( playerid, "You cannot rape in jail." );
if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." ); if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." );
if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." ); if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." );
@ -14097,7 +14068,7 @@ CMD:c4( playerid, params[ ] )
if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You cannot use this command since you're tied." ); if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You cannot use this command since you're tied." );
if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." ); if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." );
if ( IsPlayerInCasino( playerid ) ) return SendError( playerid, "You cannot use this command since you're in a casino." ); if ( IsPlayerInCasino( playerid ) ) return SendError( playerid, "You cannot use this command since you're in a casino." );
if ( IsPlayerInPaintBall( playerid ) ) return SendError( playerid, "You cannot use this command since you're in paintball." ); if ( IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an arena." );
if ( p_C4Amount[ playerid ] < 1 ) return SendError( playerid, "You don't have any C4's" ); if ( p_C4Amount[ playerid ] < 1 ) return SendError( playerid, "You don't have any C4's" );
#if ENABLED_SECURE_TRUCK == true #if ENABLED_SECURE_TRUCK == true
@ -14500,15 +14471,12 @@ CMD:gang( playerid, params[ ] )
else if ( gID < 0 || gID >= MAX_GANGS ) return SendError( playerid, "Invalid Gang ID." ); else if ( gID < 0 || gID >= MAX_GANGS ) return SendError( playerid, "Invalid Gang ID." );
else if ( !Iter_Contains( gangs, gID ) ) return SendError( playerid, "Invalid Gang ID." ); else if ( !Iter_Contains( gangs, gID ) ) return SendError( playerid, "Invalid Gang ID." );
else if ( p_gangInvited[ playerid ] [ gID ] == false ) return SendError( playerid, "You haven't been invited to this gang." ); else if ( p_gangInvited[ playerid ] [ gID ] == false ) return SendError( playerid, "You haven't been invited to this gang." );
else if ( hasTickcountPassed( p_gangInviteTick[ playerid ], 120000 ) ) return p_gangInvited[ playerid ] [ gID ] = false, SendError( playerid, "This invite has expired, each invite only lasts for 2 minutes." ); else if ( g_iTime > p_gangInviteTick[ playerid ] ) return p_gangInvited[ playerid ] [ gID ] = false, SendError( playerid, "This invite has expired, each invite only lasts for 2 minutes." );
else if ( p_GangID[ playerid ] != INVALID_GANG_ID ) return SendError( playerid, "You are already inside a gang." ); else if ( p_GangID[ playerid ] != INVALID_GANG_ID ) return SendError( playerid, "You are already inside a gang." );
else else
{ {
p_GangID[ playerid ] = gID;
p_gangInvited[ playerid ] [ gID ] = false; p_gangInvited[ playerid ] [ gID ] = false;
if ( p_WantedLevel[ playerid ] < 1 ) SetPlayerColor( playerid, g_gangData[ gID ] [ E_COLOR ] ); SetPlayerGang( playerid, gID );
mysql_single_query( sprintf( "UPDATE `USERS` SET `GANG_ID`=%d WHERE `ID`=%d", g_gangData[ gID ] [ E_SQL_ID ], p_AccountID[ playerid ] ) );
SendClientMessageToGang( gID, g_gangData[ p_GangID[ playerid ] ] [ E_COLOR ], "[GANG]{FFFFFF} %s(%d) has joined the gang.", ReturnPlayerName( playerid ), playerid );
} }
return 1; return 1;
} }
@ -14532,7 +14500,7 @@ CMD:gang( playerid, params[ ] )
return SendError( playerid, "You are not the gang leader." ); return SendError( playerid, "You are not the gang leader." );
p_gangInvited[ pID ] [ p_GangID[ playerid ] ] = true; p_gangInvited[ pID ] [ p_GangID[ playerid ] ] = true;
p_gangInviteTick[ pID ] = GetTickCount( ); p_gangInviteTick[ pID ] = g_iTime + 120;
GameTextForPlayer( pID, sprintf( "~n~~y~~h~/gang join %d", p_GangID[ playerid ] ), 2000, 4 ); GameTextForPlayer( pID, sprintf( "~n~~y~~h~/gang join %d", p_GangID[ playerid ] ), 2000, 4 );
format( szNormalString, sizeof( szNormalString ), "[GANG]{FFFFFF} %s(%d) has invited you to join %s, to join type \"/gang join %d\"", ReturnPlayerName( playerid ), playerid, g_gangData[ p_GangID[ playerid ] ] [ E_NAME ], p_GangID[ playerid ] ); format( szNormalString, sizeof( szNormalString ), "[GANG]{FFFFFF} %s(%d) has invited you to join %s, to join type \"/gang join %d\"", ReturnPlayerName( playerid ), playerid, g_gangData[ p_GangID[ playerid ] ] [ E_NAME ], p_GangID[ playerid ] );
SendClientMessage( pID, g_gangData[ p_GangID[ playerid ] ] [ E_COLOR ], szNormalString ); SendClientMessage( pID, g_gangData[ p_GangID[ playerid ] ] [ E_COLOR ], szNormalString );
@ -14576,7 +14544,7 @@ CMD:gang( playerid, params[ ] )
gangid = p_GangID[ playerid ]; gangid = p_GangID[ playerid ];
if ( gangid == INVALID_GANG_ID ) return SendError( playerid, "You are not inside any gang." ); if ( gangid == INVALID_GANG_ID ) return SendError( playerid, "You are not inside any gang." );
else if ( !IsPlayerGangLeader( playerid, gangid ) ) return SendError( playerid, "You are not the gang leader." ); else if ( ! IsPlayerGangLeader( playerid, gangid ) ) return SendError( playerid, "You are not a gang leader." );
else else
{ {
// Reset all gang invites // Reset all gang invites
@ -14638,7 +14606,7 @@ CMD:acmds( playerid, params[ ] )
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 4: /addnote, /removenote" ); SendClientMessage( playerid, COLOR_WHITE, " LEVEL 4: /addnote, /removenote" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 5: /createhouse, /destroyhouse, /respawnallv, /achangename, /toggleviewpm, /unban(ip)" ); SendClientMessage( playerid, COLOR_WHITE, " LEVEL 5: /createhouse, /destroyhouse, /respawnallv, /achangename, /toggleviewpm, /unban(ip)" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 5: /createcar, /destroycar, /stripcarmods, /createbribe, /destroybribe, /doublexp, /(h/v)adminsell" ); SendClientMessage( playerid, COLOR_WHITE, " LEVEL 5: /createcar, /destroycar, /stripcarmods, /createbribe, /destroybribe, /doublexp, /(h/v)adminsell" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 5: /autovehrespawn, /megaban, /acunban, /creategate, /editgate, /connectsong" ); SendClientMessage( playerid, COLOR_WHITE, " LEVEL 5: /autovehrespawn, /megaban, /acunban, /creategate, /editgate, /connectsong, /discordurl" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 5: /creategarage, /destroygarage, /check" ); SendClientMessage( playerid, COLOR_WHITE, " LEVEL 5: /creategarage, /destroygarage, /check" );
if ( p_AdminLevel[ playerid ] > 5 ) { if ( p_AdminLevel[ playerid ] > 5 ) {
@ -16334,7 +16302,7 @@ CMD:circleall( playerid, params[ ] )
continue; continue;
} }
if ( IsPlayerInPaintBall( i ) ) { if ( IsPlayerInPaintBall( i ) || IsPlayerDueling( i ) ) {
SendServerMessage( i, "As you're in paintball, you have not been teleported to the event/mass teleportation." ); SendServerMessage( i, "As you're in paintball, you have not been teleported to the event/mass teleportation." );
continue; continue;
} }
@ -16620,6 +16588,22 @@ CMD:connectsong( playerid, params[ ] )
return 1; return 1;
} }
CMD:discordurl( playerid, params[ ] )
{
new
szURL[ 128 ];
if ( p_AdminLevel[ playerid ] < 5 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "s[128]", szURL ) ) return SendUsage( playerid, "/discordurl [DISCORD_URL]" );
else
{
SaveToAdminLogFormatted( playerid, 0, "updated discord url to %s", szURL );
SendGlobalMessage( -1, ""COL_PINK"[ADMIN]"COL_WHITE" %s(%d) has set the discord url to: "COL_GREY"%s", ReturnPlayerName( playerid ), playerid, szURL );
UpdateServerVariable( "discordurl", 0, 0.0, szURL, GLOBAL_VARTYPE_STRING );
}
return 1;
}
CMD:creategate( playerid, params[ ] ) CMD:creategate( playerid, params[ ] )
{ {
new new
@ -17312,23 +17296,33 @@ CMD:destroyentrance( playerid, params[ ] )
CMD:setgangleader( playerid, params[ ] ) CMD:setgangleader( playerid, params[ ] )
{ {
new new
gID, pID; sqlid, pID;
if ( p_AdminLevel[ playerid ] < 6 ) return SendError( playerid, ADMIN_COMMAND_REJECT ); if ( p_AdminLevel[ playerid ] < 6 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "d" #sscanf_u, gID, pID ) ) return SendUsage( playerid, "/setgangleader [GANG_ID] [PLAYER_ID]" ); else if ( sscanf( params, "d" #sscanf_u, sqlid, pID ) ) return SendUsage( playerid, "/setgangleader [GANG_ID] [PLAYER_ID]" );
else if ( gID < 0 || gID > MAX_GANGS ) return SendError( playerid, "Invalid Gang ID." ); //else if ( !Iter_Contains( gangs, gID ) ) return SendError( playerid, "Invalid Gang ID." );
else if ( !Iter_Contains( gangs, gID ) ) return SendError( playerid, "Invalid Gang ID." );
else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "Invalid Player ID." ); else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "Invalid Player ID." );
// else if ( p_GangID[ pID ] != gID ) return SendError( playerid, "This player isn't in this gang." ); // else if ( p_GangID[ pID ] != gID ) return SendError( playerid, "This player isn't in this gang." );
else else
{ {
p_GangID[ pID ] = gID; new
g_gangData[ gID ] [ E_LEADER ] = p_AccountID[ pID ]; gid = -1;
SaveToAdminLogFormatted( playerid, gID, "setgangleader to %s (acc id %d)", ReturnPlayerName( pID ), p_AccountID[ pID ] ); foreach ( new g : gangs ) if ( g_gangData[ g ] [ E_SQL_ID ] == sqlid ) {
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[GANG]"COL_WHITE" %s(%d) is now the leader of %s.", ReturnPlayerName( pID ), pID, g_gangData[ gID ] [ E_NAME ] ); gid = g;
SendClientMessageToGang( gID, g_gangData[ gID ] [ E_COLOR ], "[GANG]{FFFFFF} %s(%d) is the new gang leader, forcefully by %s.", ReturnPlayerName( pID ), pID, ReturnPlayerName( playerid ) ); break;
SaveGangData( gID ); }
if ( ! Iter_Contains( gangs, gid ) )
return SendError( playerid, "Invalid Gang ID." );
SetPlayerGang( pID, gid );
g_gangData[ gid ] [ E_LEADER ] = p_AccountID[ pID ];
SaveToAdminLogFormatted( playerid, gid, "setgangleader to %s (acc id %d)", ReturnPlayerName( pID ), p_AccountID[ pID ] );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[GANG]"COL_WHITE" %s(%d) is now the leader of %s.", ReturnPlayerName( pID ), pID, g_gangData[ gid ] [ E_NAME ] );
SendClientMessageToGang( gid, g_gangData[ gid ] [ E_COLOR ], "[GANG]{FFFFFF} %s(%d) is the new gang leader, forcefully by %s.", ReturnPlayerName( pID ), pID, ReturnPlayerName( playerid ) );
SaveGangData( gid );
} }
return 1; return 1;
} }
@ -17707,7 +17701,7 @@ CMD:destroygang( playerid, params[ ] )
{ {
AddAdminLogLineFormatted( "%s(%d) has deleted a gang", ReturnPlayerName( playerid ), playerid ); AddAdminLogLineFormatted( "%s(%d) has deleted a gang", ReturnPlayerName( playerid ), playerid );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[GANG]"COL_WHITE" You have destroyed \"%s\" which was the ID of %d.", g_gangData[ gID ] [ E_NAME ], gID ); SendClientMessageFormatted( playerid, -1, ""COL_PINK"[GANG]"COL_WHITE" You have destroyed \"%s\" which was the ID of %d.", g_gangData[ gID ] [ E_NAME ], gID );
DestroyGang( gID ); DestroyGang( gID, false );
} }
return 1; return 1;
} }
@ -18920,8 +18914,11 @@ public OnPlayerDriveVehicle(playerid, vehicleid)
ShowPlayerHelpDialog( playerid, 6000, "You can export this vehicle at the docks for around ~g~%s~w~~h~.~n~~n~~r~Damaging the vehicle will further decrease the value.", number_format( iVehiclePrice ) ); ShowPlayerHelpDialog( playerid, 6000, "You can export this vehicle at the docks for around ~g~%s~w~~h~.~n~~n~~r~Damaging the vehicle will further decrease the value.", number_format( iVehiclePrice ) );
} }
if ( IsPlayerInPoliceCar( playerid ) && p_Class[ playerid ] != CLASS_POLICE && p_LastDrovenPoliceVeh[ playerid ] != vehicleid && GetPVarInt( playerid, "entercopcar_ts" ) < time && !g_buyableVehicle{ vehicleid } ) if ( IsPlayerInPoliceCar( playerid ) && p_Class[ playerid ] != CLASS_POLICE && p_LastDrovenPoliceVeh[ playerid ] != vehicleid && GetPVarInt( playerid, "entercopcar_ts" ) < time && !g_buyableVehicle{ vehicleid } ) {
SetPVarInt( playerid, "entercopcar_ts", time + 30 ), GivePlayerWantedLevel( playerid, 2 ); if ( ! IsWeaponInAnySlot( playerid, 26 ) && ! IsWeaponInAnySlot( playerid, 27 ) ) GivePlayerWeapon( playerid, 25, 25 ); // free shotgun
SetPVarInt( playerid, "entercopcar_ts", time + 30 );
GivePlayerWantedLevel( playerid, 2 );
}
if ( model == 498 && p_Class[ playerid ] != CLASS_POLICE ) if ( model == 498 && p_Class[ playerid ] != CLASS_POLICE )
{ {
@ -18948,7 +18945,7 @@ public OnPlayerDriveVehicle(playerid, vehicleid)
{ {
new num_ores = GetGVarInt( sprintf( "mine_%d_ores", vehicleid ) ); new num_ores = GetGVarInt( sprintf( "mine_%d_ores", vehicleid ) );
printf( "Ores stored %d for %d", num_ores, sprintf( "mine_%d_ores", vehicleid ) ) ; // printf( "Ores stored %d for %d", num_ores, sprintf( "mine_%d_ores", vehicleid ) ) ;
if ( num_ores > 0 ) if ( num_ores > 0 )
{ {
@ -19141,6 +19138,9 @@ public OnPlayerEnterDynamicCP(playerid, checkpointid)
if ( IsPlayerTied( playerid ) ) if ( IsPlayerTied( playerid ) )
return SendError( playerid, "You can't do anything as you are tied." ); return SendError( playerid, "You can't do anything as you are tied." );
if ( IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) || IsPlayerInEvent( playerid ) )
return SendError( playerid, "You can't do anything as you are in an event." );
/* ** Dropoff check ** /* ** Dropoff check **
new new
bDropoff = false; bDropoff = false;
@ -20810,7 +20810,7 @@ public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
if ( GetDynamicObjectPos( objectid, X, Y, Z ) ) if ( GetDynamicObjectPos( objectid, X, Y, Z ) )
{ {
if ( IsPlayerAimingAt( playerid, X, Y, Z, fAimDistance ) ) if ( IsPlayerAimingAt( playerid, X, Y, Z, fAimDistance ) )
ApplyAnimation( playerid, "CARRY", "liftup105", 4.0, 1, 0, 0, 1, 0 ), ShowProgressBar( playerid, "Taking Meth", PROGRESS_GRAB_METH, 300, 0x87CEEBFF ); ApplyAnimation( playerid, "CARRY", "liftup105", 4.0, 1, 0, 0, 1, 0 ), ShowProgressBar( playerid, "Taking Meth", PROGRESS_GRAB_METH, 3000, 0x87CEEBFF );
} }
} }
else else
@ -20824,7 +20824,7 @@ public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
SetPVarInt( playerid, "pouring_chemical", CHEMICAL_CS ); SetPVarInt( playerid, "pouring_chemical", CHEMICAL_CS );
ApplyAnimation( playerid, "CARRY", "putdwn105", 4.0, 1, 0, 0, 1, 0 ); ApplyAnimation( playerid, "CARRY", "putdwn105", 4.0, 1, 0, 0, 1, 0 );
ShowProgressBar( playerid, "Pouring Caustic Soda", PROGRESS_CHEMICAL, 250, 0x3E7EFFFF ); ShowProgressBar( playerid, "Pouring Caustic Soda", PROGRESS_CHEMICAL, 2500, 0x3E7EFFFF );
} }
else if ( IsPlayerAimingAt( playerid, 2083.282958, 1234.025024, 415.028009, fAimDistance ) ) else if ( IsPlayerAimingAt( playerid, 2083.282958, 1234.025024, 415.028009, fAimDistance ) )
{ {
@ -20833,7 +20833,7 @@ public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
SetPVarInt( playerid, "pouring_chemical", CHEMICAL_HLC ); SetPVarInt( playerid, "pouring_chemical", CHEMICAL_HLC );
ApplyAnimation( playerid, "CARRY", "putdwn105", 4.0, 1, 0, 0, 1, 0 ); ApplyAnimation( playerid, "CARRY", "putdwn105", 4.0, 1, 0, 0, 1, 0 );
ShowProgressBar( playerid, "Pouring Hydrogen Chloride", PROGRESS_CHEMICAL, 250, 0xEE9911FF ); ShowProgressBar( playerid, "Pouring Hydrogen Chloride", PROGRESS_CHEMICAL, 2500, 0xEE9911FF );
} }
else if ( IsPlayerAimingAt( playerid, 2083.638916, 1233.254028, 415.020996, fAimDistance ) ) else if ( IsPlayerAimingAt( playerid, 2083.638916, 1233.254028, 415.020996, fAimDistance ) )
{ {
@ -20842,7 +20842,7 @@ public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
SetPVarInt( playerid, "pouring_chemical", CHEMICAL_MU ); SetPVarInt( playerid, "pouring_chemical", CHEMICAL_MU );
ApplyAnimation( playerid, "CARRY", "putdwn105", 4.0, 1, 0, 0, 1, 0 ); ApplyAnimation( playerid, "CARRY", "putdwn105", 4.0, 1, 0, 0, 1, 0 );
ShowProgressBar( playerid, "Pouring Muriatic Acid", PROGRESS_CHEMICAL, 250, 0xFF0000FF ); ShowProgressBar( playerid, "Pouring Muriatic Acid", PROGRESS_CHEMICAL, 2500, 0xFF0000FF );
} }
} }
} }
@ -21106,7 +21106,7 @@ public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
//SetPlayerPos( playerid, fX, fY, Z ); //SetPlayerPos( playerid, fX, fY, Z );
g_secureTruckData[ E_BEING_ROBBED ] = true; g_secureTruckData[ E_BEING_ROBBED ] = true;
ApplyAnimation( playerid, "CARRY", "liftup105", 4.0, 1, 0, 0, 1, 0 ); ApplyAnimation( playerid, "CARRY", "liftup105", 4.0, 1, 0, 0, 1, 0 );
ShowProgressBar( playerid, "Robbing Truck", PROGRESS_ROBTRUCK, 350, COLOR_GOLD ); ShowProgressBar( playerid, "Robbing Truck", PROGRESS_ROBTRUCK, 4000, COLOR_GOLD );
} }
return 1; return 1;
} }
@ -22607,8 +22607,14 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{ {
if ( x == listitem ) if ( x == listitem )
{ {
new curr_gang = p_GangID[ playerid ];
new curr_gang_sql = 0;
if ( Iter_Contains( gangs, curr_gang ) )
curr_gang_sql = g_gangData[ curr_gang ] [ E_SQL_ID ];
SetPVarInt( playerid, "viewing_gang_sql", g_sortedGangData[ g ] [ E_SQL_ID ] ); SetPVarInt( playerid, "viewing_gang_sql", g_sortedGangData[ g ] [ E_SQL_ID ] );
ShowPlayerDialog( playerid, DIALOG_GANG_LIST_OPTIONS, DIALOG_STYLE_LIST, "{FFFFFF}Gang Options", "View Statistics\nView Gang Members", "Select", "Back" ); ShowPlayerDialog( playerid, DIALOG_GANG_LIST_OPTIONS, DIALOG_STYLE_LIST, "{FFFFFF}Gang Options", sprintf( "%sJoin Gang\nView Statistics\nView Gang Members", curr_gang_sql != g_sortedGangData[ g ] [ E_SQL_ID ] && ! g_sortedGangData[ g ] [ E_INVITE_ONLY ] ? ( COL_WHITE ) : ( COL_BLACK ) ), "Select", "Back" );
break; break;
} }
x ++; x ++;
@ -22632,14 +22638,30 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
switch( listitem ) switch( listitem )
{ {
case 0: // View statistics case 0: // Join gang
{
if ( p_Class[ playerid ] != CLASS_CIVILIAN ) {
SendError( playerid, "You must be a civilian to switch gangs." );
} else if ( p_GangID[ playerid ] == g ) {
SendError( playerid, "You are already in this gang." );
} else if ( IsGangPrivate( g ) ) {
SendError( playerid, "You can no longer join this gang as it is private." );
} else if ( ! SetPlayerGang( playerid, g ) ) {
SendError( playerid, "You can no longer join this gang." );
}
ShowPlayerDialog( playerid, DIALOG_GANG_LIST_OPTIONS, DIALOG_STYLE_LIST, "{FFFFFF}Gang Options", sprintf( "%sJoin Gang\nView Statistics\nView Gang Members", p_GangID[ playerid ] != g && ! g_gangData[ g ] [ E_INVITE_ONLY ] ? ( COL_WHITE ) : ( COL_BLACK ) ), "Select", "Back" );
}
case 1: // View statistics
{ {
new iPlayers = GetOnlineGangMembers( g ); new iPlayers = GetOnlineGangMembers( g );
SetPVarInt( playerid, "gang_members_id", g );
format( szLargeString, 350, ""COL_GREY"Gang ID:"COL_WHITE" %d\n"COL_GREY"Online Members:"COL_WHITE" %d\n"COL_GREY"Score:"COL_WHITE" %d\n"COL_GREY"Kills:"COL_WHITE" %d\n"COL_GREY"Deaths:"COL_WHITE" %d\n"COL_GREY"K/D Ratio:"COL_WHITE" %0.2f\n", g_gangData[ g ] [ E_SQL_ID ], iPlayers, g_gangData[ g ] [ E_SCORE ], g_gangData[ g ] [ E_KILLS ], g_gangData[ g ] [ E_DEATHS ], floatdiv( g_gangData[ g ] [ E_KILLS ], g_gangData[ g ] [ E_DEATHS ] ) ); format( szLargeString, 350, ""COL_GREY"Gang ID:"COL_WHITE" %d\n"COL_GREY"Online Members:"COL_WHITE" %d\n"COL_GREY"Score:"COL_WHITE" %d\n"COL_GREY"Kills:"COL_WHITE" %d\n"COL_GREY"Deaths:"COL_WHITE" %d\n"COL_GREY"K/D Ratio:"COL_WHITE" %0.2f\n", g_gangData[ g ] [ E_SQL_ID ], iPlayers, g_gangData[ g ] [ E_SCORE ], g_gangData[ g ] [ E_KILLS ], g_gangData[ g ] [ E_DEATHS ], floatdiv( g_gangData[ g ] [ E_KILLS ], g_gangData[ g ] [ E_DEATHS ] ) );
format( szLargeString, 350, "%s"COL_GREY"Bank:"COL_WHITE" %s\n"COL_GREY"Zones Captured:"COL_WHITE" %d", szLargeString, number_format( g_gangData[ g ] [ E_BANK ] ), GetGangCapturedTurfs( g ) ); format( szLargeString, 350, "%s"COL_GREY"Bank:"COL_WHITE" %s\n"COL_GREY"Zones Captured:"COL_WHITE" %d", szLargeString, number_format( g_gangData[ g ] [ E_BANK ] ), GetGangCapturedTurfs( g ) );
ShowPlayerDialog( playerid, DIALOG_GANG_LIST_RESPONSE, DIALOG_STYLE_MSGBOX, "{FFFFFF}Gang Statistics", szLargeString, "Close", "Back" ); ShowPlayerDialog( playerid, DIALOG_GANG_LIST_RESPONSE, DIALOG_STYLE_MSGBOX, "{FFFFFF}Gang Statistics", szLargeString, "Close", "Back" );
} }
case 1:
case 2:
{ {
// View gang members // View gang members
mysql_tquery( dbHandle, mysql_tquery( dbHandle,
@ -22651,7 +22673,12 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
return 1; return 1;
} }
if ( dialogid == DIALOG_GANG_LIST_RESPONSE ) { if ( dialogid == DIALOG_GANG_LIST_RESPONSE ) {
return ShowPlayerDialog( playerid, DIALOG_GANG_LIST_OPTIONS, DIALOG_STYLE_LIST, "{FFFFFF}Gang Options", "View Statistics\nView Gang Members", "Select", "Back" ); new g = GetPVarInt( playerid, "gang_members_id" );
if ( ! Iter_Contains( gangs, g ) )
return SendError( playerid, "Could not find gang. Try again." );
return ShowPlayerDialog( playerid, DIALOG_GANG_LIST_OPTIONS, DIALOG_STYLE_LIST, "{FFFFFF}Gang Options", sprintf( "%sJoin Gang\nView Statistics\nView Gang Members", p_GangID[ playerid ] != g && ! g_gangData[ g ] [ E_INVITE_ONLY ] ? ( COL_WHITE ) : ( COL_BLACK ) ), "Select", "Back" );
} }
if ( dialogid == DIALOG_GANG_LIST_MEMBERS ) if ( dialogid == DIALOG_GANG_LIST_MEMBERS )
{ {
@ -22663,7 +22690,7 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
return SendError( playerid, "Could not find gang. Try again." ); return SendError( playerid, "Could not find gang. Try again." );
if ( ! response && page == 0 ) if ( ! response && page == 0 )
return ShowPlayerDialog( playerid, DIALOG_GANG_LIST_OPTIONS, DIALOG_STYLE_LIST, "{FFFFFF}Gang Options", "View Statistics\nView Gang Members", "Select", "Back" ); return ShowPlayerDialog( playerid, DIALOG_GANG_LIST_OPTIONS, DIALOG_STYLE_LIST, "{FFFFFF}Gang Options", sprintf( "%sJoin Gang\nView Statistics\nView Gang Members", p_GangID[ playerid ] != g && ! g_gangData[ g ] [ E_INVITE_ONLY ] ? ( COL_WHITE ) : ( COL_BLACK ) ), "Select", "Back" );
if ( members_shown < 20 && response ) if ( members_shown < 20 && response )
return 1; return 1;
@ -22833,10 +22860,10 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
// shop limits // shop limits
if ( g_shopItemData[ i ] [ E_LIMIT ] == LIMIT_ONE ) if ( g_shopItemData[ i ] [ E_LIMIT ] == LIMIT_ONE )
{ {
if ( i == 10 ) { if ( g_shopItemData[ i ] [ E_ID ] == 11 ) {
if ( p_drillStrength[ playerid ] == MAX_DRILL_STRENGTH ) return SendError( playerid, "You have already purchased this item." ); if ( p_drillStrength[ playerid ] == MAX_DRILL_STRENGTH ) return SendError( playerid, "You have already purchased this item." );
p_drillStrength[ playerid ] = MAX_DRILL_STRENGTH; p_drillStrength[ playerid ] = MAX_DRILL_STRENGTH;
} else if ( i == 7 ) { } else if ( g_shopItemData[ i ] [ E_ID ] == 10 ) {
if ( p_MoneyBag{ playerid } == true ) return SendError( playerid, "You have already purchased this item." ); if ( p_MoneyBag{ playerid } == true ) return SendError( playerid, "You have already purchased this item." );
if ( p_Class[ playerid ] != CLASS_POLICE ) SetPlayerAttachedObject( playerid, 1, 1210, 7, 0.302650, -0.002469, -0.193321, 296.124053, 270.396881, 8.941717, 1.000000, 1.000000, 1.000000 ); if ( p_Class[ playerid ] != CLASS_POLICE ) SetPlayerAttachedObject( playerid, 1, 1210, 7, 0.302650, -0.002469, -0.193321, 296.124053, 270.396881, 8.941717, 1.000000, 1.000000, 1.000000 );
p_MoneyBag{ playerid } = true; p_MoneyBag{ playerid } = true;
@ -22884,47 +22911,43 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
if ( ( dialogid == DIALOG_SHOP_MENU ) && response ) if ( ( dialogid == DIALOG_SHOP_MENU ) && response )
{ {
if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this while you're in jail." ); if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this while you're in jail." );
if ( !listitem ) return cmd_shop( playerid, "" ); // Array index out of bounds fix
new if ( g_shopItemData[ listitem ] [ E_LIMIT ] == LIMIT_ONE )
i = listitem - 1;
if ( g_shopItemData[ i ] [ E_LIMIT ] == LIMIT_ONE )
{ {
cmd_shop( playerid, "" ); cmd_shop( playerid, "" );
if ( GetPlayerCash( playerid ) < g_shopItemData[ i ] [ E_PRICE ] ) return SendError( playerid, "You don't have enough money for this item." ); if ( GetPlayerCash( playerid ) < g_shopItemData[ listitem ] [ E_PRICE ] ) return SendError( playerid, "You don't have enough money for this item." );
switch( i ) switch( g_shopItemData[ listitem ] [ E_ID ] )
{ {
case 3: case 4:
{ {
if ( p_AidsVaccine{ playerid } == true ) return SendError( playerid, "You have already purchased this item." ); if ( p_AidsVaccine{ playerid } == true ) return SendError( playerid, "You have already purchased this item." );
p_AidsVaccine{ playerid } = true; p_AidsVaccine{ playerid } = true;
} }
case 4: case 5:
{ {
if ( p_SecureWallet{ playerid } == true ) return SendError( playerid, "You have already purchased this item." ); if ( p_SecureWallet{ playerid } == true ) return SendError( playerid, "You have already purchased this item." );
p_SecureWallet{ playerid } = true; p_SecureWallet{ playerid } = true;
} }
case 7: case 10:
{ {
if ( p_MoneyBag{ playerid } == true ) return SendError( playerid, "You have already purchased this item." ); if ( p_MoneyBag{ playerid } == true ) return SendError( playerid, "You have already purchased this item." );
if ( p_Class[ playerid ] != CLASS_POLICE ) SetPlayerAttachedObject( playerid, 1, 1210, 7, 0.302650, -0.002469, -0.193321, 296.124053, 270.396881, 8.941717, 1.000000, 1.000000, 1.000000 ); if ( p_Class[ playerid ] != CLASS_POLICE ) SetPlayerAttachedObject( playerid, 1, 1210, 7, 0.302650, -0.002469, -0.193321, 296.124053, 270.396881, 8.941717, 1.000000, 1.000000, 1.000000 );
p_MoneyBag{ playerid } = true; p_MoneyBag{ playerid } = true;
} }
case 10: case 11:
{ {
if ( p_drillStrength[ playerid ] == MAX_DRILL_STRENGTH ) return SendError( playerid, "You have already purchased this item." ); if ( p_drillStrength[ playerid ] == MAX_DRILL_STRENGTH ) return SendError( playerid, "You have already purchased this item." );
p_drillStrength[ playerid ] = MAX_DRILL_STRENGTH; p_drillStrength[ playerid ] = MAX_DRILL_STRENGTH;
} }
} }
GivePlayerCash( playerid, -( g_shopItemData[ i ] [ E_PRICE ] ) ); GivePlayerCash( playerid, -( g_shopItemData[ listitem ] [ E_PRICE ] ) );
SendServerMessage( playerid, "You have bought a "COL_GREY"%s"COL_WHITE" for "COL_GOLD"%s"COL_WHITE".", g_shopItemData[ i ] [ E_NAME ], number_format( g_shopItemData[ i ] [ E_PRICE ] ) ); SendServerMessage( playerid, "You have bought a "COL_GREY"%s"COL_WHITE" for "COL_GOLD"%s"COL_WHITE".", g_shopItemData[ listitem ] [ E_NAME ], number_format( g_shopItemData[ listitem ] [ E_PRICE ] ) );
} }
else else
{ {
SetPVarInt( playerid, "shop_item", i ); SetPVarInt( playerid, "shop_item", listitem );
ShowPlayerDialog( playerid, DIALOG_SHOP_AMOUNT, DIALOG_STYLE_LIST, "{FFFFFF}Shop Items - Buy Quantity", "Buy 1\nBuy 5\nBuy Max", "Select", "Back" ); ShowPlayerDialog( playerid, DIALOG_SHOP_AMOUNT, DIALOG_STYLE_LIST, "{FFFFFF}Shop Items - Buy Quantity", "Buy 1\nBuy 5\nBuy Max", "Select", "Back" );
} }
} }
@ -26770,7 +26793,7 @@ stock SetPlayerPosToPrison( playerid )
SetTimerEx ( "ope_Unfreeze", 5000, false, "d", playerid ); SetTimerEx ( "ope_Unfreeze", 5000, false, "d", playerid );
p_inAlcatraz { playerid } = false; p_inAlcatraz { playerid } = false;
if ( p_JailTime[ playerid ] > ALCATRAZ_REQUIRED_TIME ) if ( p_JailTime[ playerid ] >= ALCATRAZ_REQUIRED_TIME )
{ {
iRandom = random( sizeof( alctrazSpawnPoints ) ); iRandom = random( sizeof( alctrazSpawnPoints ) );
SetPlayerPos ( playerid, alctrazSpawnPoints[ iRandom ][ 0 ], alctrazSpawnPoints[ iRandom ][ 1 ], alctrazSpawnPoints[ iRandom ][ 2 ] + loadingHeight ); SetPlayerPos ( playerid, alctrazSpawnPoints[ iRandom ][ 0 ], alctrazSpawnPoints[ iRandom ][ 1 ], alctrazSpawnPoints[ iRandom ][ 2 ] + loadingHeight );
@ -27896,7 +27919,7 @@ stock DestroyAllPlayerC4s( playerid, bool: resetc4 = false )
stock ExplodePlayerC4s( playerid, start=0, end=MAX_C4 ) stock ExplodePlayerC4s( playerid, start=0, end=MAX_C4 )
{ {
if ( IsPlayerInEvent( playerid ) || IsPlayerInPaintBall( playerid ) || p_Class[ playerid ] == CLASS_POLICE ) if ( IsPlayerInEvent( playerid ) || IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) || p_Class[ playerid ] == CLASS_POLICE )
return 0; return 0;
new new
@ -28911,7 +28934,7 @@ stock AttachToRobberySafe( robberyid, playerid, type )
offsetY = -1.4 * floatcos( -( rotation + 170 ), degrees ); offsetY = -1.4 * floatcos( -( rotation + 170 ), degrees );
g_robberyData[ robberyid ] [ E_DRILL_EFFECT ] = CreateDynamicObject( 18718, fX + offsetX, fY + offsetY, fZ, 90, 0, rotation, g_robberyData[ robberyid ] [ E_WORLD ] ); g_robberyData[ robberyid ] [ E_DRILL_EFFECT ] = CreateDynamicObject( 18718, fX + offsetX, fY + offsetY, fZ, 90, 0, rotation, g_robberyData[ robberyid ] [ E_WORLD ] );
g_robberyData[ robberyid ] [ E_ROBTIMER ] = SetTimerEx( "onSafeBust", 15000, false, "dddd", playerid, robberyid, type, 0 ); g_robberyData[ robberyid ] [ E_ROBTIMER ] = SetTimerEx( "onSafeBust", 7500, false, "dddd", playerid, robberyid, type, 0 );
p_drillStrength[ playerid ] -= 10; p_drillStrength[ playerid ] -= 10;
Streamer_Update( playerid ); Streamer_Update( playerid );
@ -30161,7 +30184,7 @@ stock InformGangConnectMessage( playerid, gangid )
return 1; return 1;
} }
stock DestroyGang( gangid, bool: soft_delete = false, bool: iter_remove = true ) stock DestroyGang( gangid, bool: soft_delete, bool: iter_remove = true )
{ {
if ( !Iter_Contains( gangs, gangid ) ) if ( !Iter_Contains( gangs, gangid ) )
return; return;
@ -30330,7 +30353,7 @@ stock RemovePlayerFromGang( playerid, E_GANG_LEAVE_REASON: reason = GANG_LEAVE_U
SendClientMessage( playerid, g_gangData[ gangid ] [ E_COLOR ], "[GANG]{FFFFFF} There was nobody online that could be a leader for this gang therefore it has been deleted from the server." ); SendClientMessage( playerid, g_gangData[ gangid ] [ E_COLOR ], "[GANG]{FFFFFF} There was nobody online that could be a leader for this gang therefore it has been deleted from the server." );
// Destroy gang internally // Destroy gang internally
DestroyGang( gangid ); DestroyGang( gangid, false );
return 1; return 1;
} }
} }
@ -31396,13 +31419,15 @@ stock ShowProgressBar( playerid, title[ ], pID, update = 1000, color, params = 0
if ( !IsPlayerConnected( playerid ) ) if ( !IsPlayerConnected( playerid ) )
return 0; return 0;
new time_interval = floatround( float( update ) / ( ( 388.0 - 249.0 ) / 13.0 ) );
if ( p_ProgressStarted{ playerid } ) if ( p_ProgressStarted{ playerid } )
{ {
StopProgressBar( playerid ); StopProgressBar( playerid );
p_CancelProgress{ playerid } = true; // Cancel. p_CancelProgress{ playerid } = true; // Cancel.
//SendClientMessageFormatted( playerid, COLOR_PINK, "RESTARTING PROGRESS %d (params [OLD:%d,NEW:%d]", pID, GetPVarInt( playerid, "progress_lastparams" ), params ); //SendClientMessageFormatted( playerid, COLOR_PINK, "RESTARTING PROGRESS %d (params [OLD:%d,NEW:%d]", pID, GetPVarInt( playerid, "progress_lastparams" ), params );
CallLocalFunction( "OnPlayerProgressUpdate", "ddd", playerid, GetPVarInt( playerid, "progress_lastid" ), GetPVarInt( playerid, "progress_lastparams" ) ); CallLocalFunction( "OnPlayerProgressUpdate", "ddd", playerid, GetPVarInt( playerid, "progress_lastid" ), GetPVarInt( playerid, "progress_lastparams" ) );
return ShowProgressBar( playerid, title, pID, update, color, params ), 1; return ShowProgressBar( playerid, title, pID, time_interval, color, params ), 1;
} }
if ( p_ProgressUpdateTimer[ playerid ] != 0xFFFF ) { if ( p_ProgressUpdateTimer[ playerid ] != 0xFFFF ) {
@ -31432,7 +31457,7 @@ stock ShowProgressBar( playerid, title[ ], pID, update = 1000, color, params = 0
SetPVarInt( playerid, "progress_lastid", pID ); SetPVarInt( playerid, "progress_lastid", pID );
KillTimer( p_ProgressUpdateTimer[ playerid ] ); KillTimer( p_ProgressUpdateTimer[ playerid ] );
p_ProgressUpdateTimer[ playerid ] = SetTimerEx( "ProgressBar_Update", update, false, "dddd", playerid, pID, update, params ); p_ProgressUpdateTimer[ playerid ] = SetTimerEx( "ProgressBar_Update", time_interval, false, "dddd", playerid, pID, time_interval, params );
return 1; return 1;
} }
@ -32447,7 +32472,7 @@ function handlePlayerRobbery( playerid, newkeys, oldkeys )
g_robberyData[ robberyid ] [ E_STATE ] = STATE_PICKED; g_robberyData[ robberyid ] [ E_STATE ] = STATE_PICKED;
//SendClientMessageFormatted( playerid, COLOR_RED, "beginning - robbery %d", robberyid ); //SendClientMessageFormatted( playerid, COLOR_RED, "beginning - robbery %d", robberyid );
ShowProgressBar( playerid, "Picking Safe", PROGRESS_SAFEPICK, 1500, COLOR_RED, robberyid ); ShowProgressBar( playerid, "Picking Safe", PROGRESS_SAFEPICK, 10000, COLOR_RED, robberyid );
} }
} }
} }
@ -32471,7 +32496,7 @@ function handlePlayerRobbery( playerid, newkeys, oldkeys )
g_robberyData[ robberyid ] [ E_STATE ] = STATE_ROBBED; g_robberyData[ robberyid ] [ E_STATE ] = STATE_ROBBED;
ShowProgressBar( playerid, "Robbing Safe", PROGRESS_ROBBING, 250, COLOR_YELLOW, robberyid ); ShowProgressBar( playerid, "Robbing Safe", PROGRESS_ROBBING, 2500, COLOR_YELLOW, robberyid );
} }
} }
} }
@ -32481,40 +32506,40 @@ function handlePlayerRobbery( playerid, newkeys, oldkeys )
stock GetShopItemVariable( playerid, id ) stock GetShopItemVariable( playerid, id )
{ {
switch( id ) switch( g_shopItemData[ id ] [ E_ID ] )
{ {
case 0: return p_CausticSoda { playerid }; case 1: return p_CausticSoda { playerid };
case 1: return p_MuriaticAcid { playerid }; case 2: return p_MuriaticAcid { playerid };
case 2: return p_HydrogenChloride { playerid }; case 3: return p_HydrogenChloride { playerid };
case 3: return p_AidsVaccine { playerid }; case 4: return p_AidsVaccine { playerid };
case 4: return p_SecureWallet { playerid }; case 5: return p_SecureWallet { playerid };
case 5: return p_Scissors [ playerid ]; case 6: return p_Scissors [ playerid ];
case 6: return p_BobbyPins [ playerid ]; case 8: return p_BobbyPins [ playerid ];
case 7: return p_MoneyBag { playerid }; case 10: return p_MoneyBag { playerid };
case 8: return p_Ropes [ playerid ]; case 7: return p_Ropes [ playerid ];
case 9: return p_AntiEMP [ playerid ]; case 9: return p_AntiEMP [ playerid ];
case 10: return p_drillStrength [ playerid ]; case 11: return p_drillStrength [ playerid ];
case 11: return p_MetalMelter [ playerid ]; case 12: return p_MetalMelter [ playerid ];
} }
return 0; return 0;
} }
stock SetShopItemVariable( playerid, id, value ) stock SetShopItemVariable( playerid, id, value )
{ {
switch( id ) switch( g_shopItemData[ id ] [ E_ID ] )
{ {
case 0: return p_CausticSoda { playerid } = value; case 1: return p_CausticSoda { playerid } = value;
case 1: return p_MuriaticAcid { playerid } = value; case 2: return p_MuriaticAcid { playerid } = value;
case 2: return p_HydrogenChloride { playerid } = value; case 3: return p_HydrogenChloride { playerid } = value;
case 3: return p_AidsVaccine { playerid } = !!value; case 4: return p_AidsVaccine { playerid } = !!value;
case 4: return p_SecureWallet { playerid } = !!value; case 5: return p_SecureWallet { playerid } = !!value;
case 5: return p_Scissors [ playerid ] = value; case 6: return p_Scissors [ playerid ] = value;
case 6: return p_BobbyPins [ playerid ] = value; case 8: return p_BobbyPins [ playerid ] = value;
case 7: return p_MoneyBag { playerid } = !!value; case 10: return p_MoneyBag { playerid } = !!value;
case 8: return p_Ropes [ playerid ] = value; case 7: return p_Ropes [ playerid ] = value;
case 9: return p_AntiEMP [ playerid ] = value; case 9: return p_AntiEMP [ playerid ] = value;
case 10: return p_drillStrength [ playerid ] = value; case 11: return p_drillStrength [ playerid ] = value;
case 11: return p_MetalMelter [ playerid ] = value; case 12: return p_MetalMelter [ playerid ] = value;
} }
return 0; return 0;
} }
@ -32525,11 +32550,12 @@ stock ShowPlayerShopMenu( playerid )
if ( szString[ 0 ] == '\0' ) if ( szString[ 0 ] == '\0' )
{ {
strcat( szString, ""COL_GREY"\t\tThe grey coloured options are non-savable.\n" ); strcat( szString, " \t"COL_GREY"Grey options do not save!\t \n" );
for( new i; i < sizeof( g_shopItemData ); i++ ) for( new i; i < sizeof( g_shopItemData ); i++ ) {
format( szString, sizeof( szString ), "%s"COL_GOLD"%s%s\t\t%s "COL_ORANGE"(%s)\n", szString, number_format( g_shopItemData[ i ] [ E_PRICE ] ), g_shopItemData[ i ] [ E_SAVABLE ] ? ( COL_WHITE ) : ( COL_GREY ), g_shopItemData[ i ] [ E_NAME ], g_shopItemData[ i ] [ E_USAGE ] ); format( szString, sizeof( szString ), "%s%s%s\t"COL_ORANGE"%s\t"COL_GOLD"%s\n", szString, g_shopItemData[ i ] [ E_SAVABLE ] ? ( COL_WHITE ) : ( COL_GREY ), g_shopItemData[ i ] [ E_NAME ], g_shopItemData[ i ] [ E_USAGE ], number_format( g_shopItemData[ i ] [ E_PRICE ] ) );
} }
return ShowPlayerDialog( playerid, DIALOG_SHOP_MENU, DIALOG_STYLE_LIST, "{FFFFFF}Shop Items", szString, "Select", "Cancel" ); }
return ShowPlayerDialog( playerid, DIALOG_SHOP_MENU, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Shop Items", szString, "Select", "Cancel" );
} }
#if ENABLED_EASTER_EGG == true #if ENABLED_EASTER_EGG == true
@ -35256,7 +35282,7 @@ stock CreateEntrance( name[ ], Float: X, Float: Y, Float: Z, Float: lX, Float: l
g_entranceData[ ID ] [ E_CUSTOM ] = custom; g_entranceData[ ID ] [ E_CUSTOM ] = custom;
g_entranceData[ ID ] [ E_VIP ] = viponly; g_entranceData[ ID ] [ E_VIP ] = viponly;
g_entranceData[ ID ] [ E_SAVED ] = savedId != 0; g_entranceData[ ID ] [ E_SAVED ] = savedId != 0;
g_entranceData[ ID ] [ E_ENTER ] = CreateDynamicCP( X, Y, Z, 1.5, -1, -1 ); g_entranceData[ ID ] [ E_ENTER ] = CreateDynamicCP( X, Y, Z, 1.5 );
g_entranceData[ ID ] [ E_EXIT ] = CreateDynamicCP( lX, lY, lZ, 1.0, world, interior ); g_entranceData[ ID ] [ E_EXIT ] = CreateDynamicCP( lX, lY, lZ, 1.0, world, interior );
g_entranceData[ ID ] [ E_ENTER_LABEL ] = CreateDynamic3DTextLabel( name, COLOR_GOLD, X, Y, Z, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1 ); g_entranceData[ ID ] [ E_ENTER_LABEL ] = CreateDynamic3DTextLabel( name, COLOR_GOLD, X, Y, Z, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1 );
g_entranceData[ ID ] [ E_EXIT_LABEL ] = CreateDynamic3DTextLabel( "[EXIT]", COLOR_GOLD, lX, lY, lZ, 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, world, interior ); g_entranceData[ ID ] [ E_EXIT_LABEL ] = CreateDynamic3DTextLabel( "[EXIT]", COLOR_GOLD, lX, lY, lZ, 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, world, interior );
@ -37343,6 +37369,13 @@ public OnVehicleStreamOut(vehicleid, forplayerid)
return 1; return 1;
} }
public OnVehicleSirenStateChange(playerid, vehicleid, newstate)
{
if(newstate) GameTextForPlayer(playerid, "~W~Siren ~G~on", 1000, 3);
else GameTextForPlayer(playerid, "~W~Siren ~r~off", 1000, 3);
return 1;
}
stock randomExcept( except[ ], len = sizeof( except ) ) { stock randomExcept( except[ ], len = sizeof( except ) ) {
new new
@ -37942,7 +37975,7 @@ stock BreakPlayerCuffs( playerid )
for ( attempts = 1; attempts < p_BobbyPins[ playerid ]; attempts ++ ) for ( attempts = 1; attempts < p_BobbyPins[ playerid ]; attempts ++ )
{ {
if ( random( 101 ) > 20 ) { if ( random( 101 ) > 25 ) {
success = true; success = true;
break; break;
} }
@ -37992,6 +38025,8 @@ stock GetPlayerGang( playerid ) return p_GangID[ playerid ];
stock IsPlayerSpawned( playerid ) return p_Spawned{ playerid }; stock IsPlayerSpawned( playerid ) return p_Spawned{ playerid };
stock GetPlayerClass( playerid ) return p_Class[ playerid ];
stock IsPlayerInEvent( playerid ) return ( GetPlayerVirtualWorld( playerid ) == 69 ); stock IsPlayerInEvent( playerid ) return ( GetPlayerVirtualWorld( playerid ) == 69 );
stock IsPlayerJailed( playerid ) return p_Jailed{ playerid }; stock IsPlayerJailed( playerid ) return p_Jailed{ playerid };

View File

@ -0,0 +1,31 @@
/*
* Irresistible Gaming (c) 2018
* Developed by Lorenc Pekaj
* Module:
* Purpose:
*/
/* ** Includes ** */
#include < YSI\y_hooks >
/* ** Definitions ** */
#define CLASS_CIVILIAN ( 0 )
#define CLASS_POLICE ( 1 )
#define CLASS_FIREMAN ( 2 )
#define CLASS_MEDIC ( 3 )
/* ** Variables ** */
stock const CLASS_NAMES [ ] [ ] = { "Civilian", "Police", "FBI", "Army", "CIA", "Paramedic", "Fireman" };
stock const CLASS_COLORS [ ] = { 0xC0C0C0FF, 0x3E7EFFFF, 0x0035FFFF, 0x954BFFFF, 0x191970FF, 0x4DFF4DFF, 0xA83434FF };
stock CLASS_CIVILIAN_RANGE [ 2 ];
stock CLASS_POLICE_RANGE [ 2 ];
stock CLASS_FBI_RANGE [ 2 ];
stock CLASS_CIA_RANGE [ 2 ];
stock CLASS_FIRE_RANGE [ 2 ];
stock CLASS_MEDIC_RANGE [ 2 ];
stock CLASS_ARMY_RANGE;
/* ** Hooks ** */
/* ** Functions ** */

View File

@ -41,8 +41,6 @@ stock initializeServerObjects( )
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1605.713989, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "5'", 140, "arial", 40, 1, -16777216, 0, 1 ); SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1605.713989, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "5'", 140, "arial", 40, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1605.364013, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "4'", 140, "arial", 40, 1, -16777216, 0, 1 ); SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1605.364013, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "4'", 140, "arial", 40, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1605.014038, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "3'", 140, "arial", 40, 1, -16777216, 0, 1 ); SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1605.014038, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "3'", 140, "arial", 40, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 235.143997, 86.369003, 1608.019042, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "Irresistible Gaming", 130, "IMPACT", 40, 1, -1, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 235.143997, 88.598999, 1008.018981, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "Presents", 130, "IMPACT", 40, 1, -15019521, 0, 1 );
tmpVariable = CreateDynamicObject( 18066, 229.000000, 86.862998, 1006.598999, -8.199999, 0.000000, -90.000000, .priority = 9999, .streamdistance = -1.0 ); tmpVariable = CreateDynamicObject( 18066, 229.000000, 86.862998, 1006.598999, -8.199999, 0.000000, -90.000000, .priority = 9999, .streamdistance = -1.0 );
SetDynamicObjectMaterialText( tmpVariable, 0, "SF-CNR", 130, "IMPACT", 70, 0, -16777216, 0, 1 ); SetDynamicObjectMaterialText( tmpVariable, 0, "SF-CNR", 130, "IMPACT", 70, 0, -16777216, 0, 1 );
SetDynamicObjectMaterialText( tmpVariable, 1, "SF-CNR", 130, "IMPACT", 70, 0, -16777216, 0, 1 ); SetDynamicObjectMaterialText( tmpVariable, 1, "SF-CNR", 130, "IMPACT", 70, 0, -16777216, 0, 1 );
@ -5284,4 +5282,18 @@ stock initializeServerObjects( )
CreateDynamicObject( 8168, -2126.154052, 1839.961059, 44.222999, 0.000000, 0.000000, 64.500000, -1, -1, -1 ); CreateDynamicObject( 8168, -2126.154052, 1839.961059, 44.222999, 0.000000, 0.000000, 64.500000, -1, -1, -1 );
CreateDynamicObject( 16327, -1983.401977, 1835.933959, 41.668998, 0.000000, 0.000000, 33.200000, -1, -1, -1 ); CreateDynamicObject( 16327, -1983.401977, 1835.933959, 41.668998, 0.000000, 0.000000, 33.200000, -1, -1, -1 );
SetDynamicObjectMaterial( CreateDynamicObject( 10610, -2087.221923, 1745.951049, 52.969001, 0.000000, 0.000000, -167.699996, -1, -1, -1 ), 1, 13008, "sw_block01", "sw_brewbrick01", -47 ); SetDynamicObjectMaterial( CreateDynamicObject( 10610, -2087.221923, 1745.951049, 52.969001, 0.000000, 0.000000, -167.699996, -1, -1, -1 ), 1, 13008, "sw_block01", "sw_brewbrick01", -47 );
// Duel Arena
SetDynamicObjectMaterial( CreateDynamicObject( 970, -2237.906250, 243.059402, 34.840320, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 1, 8463, "vgseland", "tiadbuddhagold", 0 );
SetDynamicObjectMaterial( CreateDynamicObject( 970, -2237.906250, 260.958953, 34.840320, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 1, 8463, "vgseland", "tiadbuddhagold", 0 );
SetDynamicObjectMaterial( CreateDynamicObject( 970, -2237.906250, 247.239334, 34.840320, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 1, 8463, "vgseland", "tiadbuddhagold", 0 );
SetDynamicObjectMaterial( CreateDynamicObject( 970, -2237.906250, 256.799194, 34.840320, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 1, 8463, "vgseland", "tiadbuddhagold", 0 );
SetDynamicObjectMaterial( CreateDynamicObject( 970, -2237.906250, 252.469284, 33.310489, 0.000000, 90.000000, 90.000000, -1, -1, -1 ), 1, 8463, "vgseland", "tiadbuddhagold", 0 );
SetDynamicObjectMaterial( CreateDynamicObject( 970, -2237.906250, 251.399551, 33.310497, 0.000000, 90.000000, -90.000000, -1, -1, -1 ), 1, 8463, "vgseland", "tiadbuddhagold", 0 );
SetDynamicObjectMaterial( CreateDynamicObject( 970, -2160.705810, 243.059005, 34.840000, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 1, 8463, "vgseland", "tiadbuddhagold", 0 );
SetDynamicObjectMaterial( CreateDynamicObject( 970, -2160.705810, 260.959014, 34.840000, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 1, 8463, "vgseland", "tiadbuddhagold", 0 );
SetDynamicObjectMaterial( CreateDynamicObject( 970, -2160.705810, 247.238998, 34.840000, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 1, 8463, "vgseland", "tiadbuddhagold", 0 );
SetDynamicObjectMaterial( CreateDynamicObject( 970, -2160.705810, 256.799011, 34.840000, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 1, 8463, "vgseland", "tiadbuddhagold", 0 );
SetDynamicObjectMaterial( CreateDynamicObject( 970, -2160.705810, 252.468994, 33.310001, 0.000000, 90.000000, 90.000000, -1, -1, -1 ), 1, 8463, "vgseland", "tiadbuddhagold", 0 );
SetDynamicObjectMaterial( CreateDynamicObject( 970, -2160.705810, 251.399993, 33.310001, 0.000000, 90.000000, -90.000000, -1, -1, -1 ), 1, 8463, "vgseland", "tiadbuddhagold", 0 );
} }

View File

@ -73,10 +73,10 @@ static stock InitializeServerVehicles( )
AddStaticVehicle( 451, -1948.4327, 259.4215, 40.7537, 90.2297,-1, -1 ); AddStaticVehicle( 451, -1948.4327, 259.4215, 40.7537, 90.2297,-1, -1 );
AddStaticVehicle( 560, -1948.6011, 270.5544, 40.7557, 89.5258,-1, -1 ); AddStaticVehicle( 560, -1948.6011, 270.5544, 40.7557, 89.5258,-1, -1 );
AddStaticVehicle( 522, -1958.7181, 284.7439, 35.0383, 89.6859, -1, -1 ); AddStaticVehicle( 522, -1958.7181, 284.7439, 35.0383, 89.6859, -1, -1 );
AddStaticVehicle( 523, -1632.8020, 693.0043, -5.6691, 178.5878, -1, -1 ); // bike AddStaticVehicleEx( 523, -1632.8020, 693.0043, -5.6691, 178.5878, -1, -1, 240, 1 ); // bike
AddStaticVehicle( 523, -1628.7476, 691.9350, -5.6750, 178.9919, -1, -1 ); // bike AddStaticVehicleEx( 523, -1628.7476, 691.9350, -5.6750, 178.9919, -1, -1, 240, 1 ); // bike
AddStaticVehicle( 523, -1624.6371, 692.5163, -5.6706, 177.4267, -1, -1 ); // bike AddStaticVehicleEx( 523, -1624.6371, 692.5163, -5.6706, 177.4267, -1, -1, 240, 1 ); // bike
AddStaticVehicle( 523, -1639.2153, 677.9714, -5.6698, 267.5138, -1, -1 ); // bike AddStaticVehicleEx( 523, -1639.2153, 677.9714, -5.6698, 267.5138, -1, -1, 240, 1 ); // bike
AddStaticVehicle( 409, -1761.315551, 948.717651, 24.542177, 270.145507, -1, -1 ); AddStaticVehicle( 409, -1761.315551, 948.717651, 24.542177, 270.145507, -1, -1 );
AddStaticVehicle( 409, -1751.036743, 948.624694, 24.545349, 269.743530, -1, -1 ); AddStaticVehicle( 409, -1751.036743, 948.624694, 24.545349, 269.743530, -1, -1 );
AddStaticVehicle( 419, -1721.243041, 1024.336914, 44.930568, 179.862380, -1, -1 ); AddStaticVehicle( 419, -1721.243041, 1024.336914, 44.930568, 179.862380, -1, -1 );
@ -121,28 +121,28 @@ static stock InitializeServerVehicles( )
AddStaticVehicle( 563, -1224.193359, -10.034203, 14.869047, 223.632965, -1, -1 ); AddStaticVehicle( 563, -1224.193359, -10.034203, 14.869047, 223.632965, -1, -1 );
AddStaticVehicle( 411, -1238.649780, 50.157535, 13.858886, 225.435058, -1, -1 ); AddStaticVehicle( 411, -1238.649780, 50.157535, 13.858886, 225.435058, -1, -1 );
AddStaticVehicle( 522, -1241.090942, 63.254283, 13.680734, 44.845169, -1, -1 ); AddStaticVehicle( 522, -1241.090942, 63.254283, 13.680734, 44.845169, -1, -1 );
AddStaticVehicle( 597, -1634.655029, 651.717651, 6.954792, 180.744827, -1, -1 ); AddStaticVehicleEx( 597, -1634.655029, 651.717651, 6.954792, 180.744827, -1, -1, 240, 1 );
AddStaticVehicle( 497, -1682.705566, 705.820434, 30.778402, 90.953826, -1, -1 ); AddStaticVehicle( 497, -1682.705566, 705.820434, 30.778402, 90.953826, -1, -1 );
AddStaticVehicle( 597, -1628.393066, 651.402587, 6.955638, 180.243911, -1, -1 ); AddStaticVehicleEx( 597, -1628.393066, 651.402587, 6.955638, 180.243911, -1, -1, 240, 1 );
AddStaticVehicle( 599, -1605.980468, 673.470397, 7.004289, 359.804168, -1, -1 ); AddStaticVehicleEx( 599, -1605.980468, 673.470397, 7.004289, 359.804168, -1, -1, 240, 1 );
AddStaticVehicle( 599, -1622.564697, 651.868591, 7.011684, 179.736801, -1, -1 ); AddStaticVehicleEx( 599, -1622.564697, 651.868591, 7.011684, 179.736801, -1, -1, 240, 1 );
AddStaticVehicle( 597, -1588.096191, 673.365234, 6.967492, 181.395446, -1, -1 ); AddStaticVehicleEx( 597, -1588.096191, 673.365234, 6.967492, 181.395446, -1, -1, 240, 1 );
AddStaticVehicle( 597, -1638.799072, 669.865722, -5.473012, 271.574432, -1, -1 ); AddStaticVehicleEx( 597, -1638.799072, 669.865722, -5.473012, 271.574432, -1, -1, 240, 1 );
AddStaticVehicle( 490, -1593.463378, 652.134216, 7.328125, 179.483932, -1, -1 ); AddStaticVehicleEx( 490, -1593.463378, 652.134216, 7.328125, 179.483932, -1, -1, 240, 1 );
AddStaticVehicle( 490, -1573.315185, 714.311035, -5.114497, 90.767662, -1, -1 ); AddStaticVehicleEx( 490, -1573.315185, 714.311035, -5.114497, 90.767662, -1, -1, 240, 1 );
AddStaticVehicle( 523, -1581.339721, 651.516662, 6.754875, 178.385192, -1, -1 ); AddStaticVehicleEx( 523, -1581.339721, 651.516662, 6.754875, 178.385192, -1, -1, 240, 1 );
AddStaticVehicle( 490, -1573.189697, 710.383300, -5.109126, 90.951103, -1, -1 ); AddStaticVehicleEx( 490, -1573.189697, 710.383300, -5.109126, 90.951103, -1, -1, 240, 1 );
AddStaticVehicle( 490, -1573.369628, 718.350891, -5.112838, 90.308105, -1, -1 ); AddStaticVehicleEx( 490, -1573.369628, 718.350891, -5.112838, 90.308105, -1, -1, 240, 1 );
AddStaticVehicle( 490, -1573.344970, 722.408874, -5.101937, 89.986015, -1, -1 ); AddStaticVehicleEx( 490, -1573.344970, 722.408874, -5.101937, 89.986015, -1, -1, 240, 1 );
AddStaticVehicle( 597, -1599.425537, 651.635131, 6.955260, 179.753692, -1, -1 ); AddStaticVehicleEx( 597, -1599.425537, 651.635131, 6.955260, 179.753692, -1, -1, 240, 1 );
AddStaticVehicle( 597, -1600.034179, 673.572998, 6.955664, 179.452468, -1, -1 ); AddStaticVehicleEx( 597, -1600.034179, 673.572998, 6.955664, 179.452468, -1, -1, 240, 1 );
AddStaticVehicle( 599, -1608.404052, 749.665588, -5.483358, 180.558486, -1, -1 ); AddStaticVehicleEx( 599, -1608.404052, 749.665588, -5.483358, 180.558486, -1, -1, 240, 1 );
AddStaticVehicle( 597, -1592.268554, 749.485046, -5.458203, 180.428436, -1, -1 ); AddStaticVehicleEx( 597, -1592.268554, 749.485046, -5.458203, 180.428436, -1, -1, 240, 1 );
AddStaticVehicle( 523, -1587.842163, 652.095092, 6.759408, 178.621475, -1, -1 ); AddStaticVehicleEx( 523, -1587.842163, 652.095092, 6.759408, 178.621475, -1, -1, 240, 1 );
AddStaticVehicle( 597, -1588.109008, 749.206848, -5.453563, 179.088058, -1, -1 ); AddStaticVehicleEx( 597, -1588.109008, 749.206848, -5.453563, 179.088058, -1, -1, 240, 1 );
AddStaticVehicle( 597, -1623.630126, 653.686889, -5.467598, 90.219757, -1, -1 ); AddStaticVehicleEx( 597, -1623.630126, 653.686889, -5.467598, 90.219757, -1, -1, 240, 1 );
AddStaticVehicle( 597, -1608.399780, 691.931091, -5.474505, 178.864059, -1, -1 ); AddStaticVehicleEx( 597, -1608.399780, 691.931091, -5.474505, 178.864059, -1, -1, 240, 1 );
AddStaticVehicle( 597, -1604.237792, 691.864318, -5.474511, 179.452468, -1, -1 ); AddStaticVehicleEx( 597, -1604.237792, 691.864318, -5.474511, 179.452468, -1, -1, 240, 1 );
AddStaticVehicle( 522, -1988.993896, 276.198394, 34.730239, 88.500068, -1, -1 ); AddStaticVehicle( 522, -1988.993896, 276.198394, 34.730239, 88.500068, -1, -1 );
AddStaticVehicle( 562, -1988.137084, 272.130798, 34.834060, 86.101821, -1, -1 ); AddStaticVehicle( 562, -1988.137084, 272.130798, 34.834060, 86.101821, -1, -1 );
AddStaticVehicle( 551, -1988.711914, 266.039215, 34.984287, 85.890213, -1, -1 ); AddStaticVehicle( 551, -1988.711914, 266.039215, 34.984287, 85.890213, -1, -1 );
@ -159,9 +159,9 @@ static stock InitializeServerVehicles( )
AddStaticVehicle( 420, -1987.848510, 127.692680, 27.321910, 179.017303, -1, -1 ); AddStaticVehicle( 420, -1987.848510, 127.692680, 27.321910, 179.017303, -1, -1 );
AddStaticVehicle( 420, -1987.973144, 136.860809, 27.320096, 179.292922, -1, -1 ); AddStaticVehicle( 420, -1987.973144, 136.860809, 27.320096, 179.292922, -1, -1 );
AddStaticVehicle( 420, -1987.935058, 146.220901, 27.318489, 179.912628, -1, -1 ); AddStaticVehicle( 420, -1987.935058, 146.220901, 27.318489, 179.912628, -1, -1 );
AddStaticVehicle( 407, -2020.862182, 92.391830, 28.212734, 270.747222, -1, -1 ); AddStaticVehicleEx( 407, -2020.862182, 92.391830, 28.212734, 270.747222, -1, -1, 240, 1 );
AddStaticVehicle( 407, -2021.090209, 84.388374, 28.211555, 272.550659, -1, -1 ); AddStaticVehicleEx( 407, -2021.090209, 84.388374, 28.211555, 272.550659, -1, -1, 240, 1 );
AddStaticVehicle( 407, -2021.336914, 75.096138, 28.340208, 266.854492, -1, -1 ); AddStaticVehicleEx( 407, -2021.336914, 75.096138, 28.340208, 266.854492, -1, -1, 240, 1 );
AddStaticVehicle( 500, -2072.625244, -83.834503, 35.268192, 1.753221, -1, -1 ); AddStaticVehicle( 500, -2072.625244, -83.834503, 35.268192, 1.753221, -1, -1 );
AddStaticVehicle( 542, -2077.063476, -84.163566, 34.907493, 180.048461, -1, -1 ); AddStaticVehicle( 542, -2077.063476, -84.163566, 34.907493, 180.048461, -1, -1 );
AddStaticVehicle( 552, -2085.609375, -84.111206, 34.853775, 359.194885, -1, -1 ); AddStaticVehicle( 552, -2085.609375, -84.111206, 34.853775, 359.194885, -1, -1 );
@ -221,9 +221,9 @@ static stock InitializeServerVehicles( )
AddStaticVehicle( 540, -1938.452270, 585.384521, 34.987651, 181.753128, -1, -1 ); AddStaticVehicle( 540, -1938.452270, 585.384521, 34.987651, 181.753128, -1, -1 );
AddStaticVehicle( 507, -1950.444458, 585.361511, 34.944633, 180.327789, -1, -1 ); AddStaticVehicle( 507, -1950.444458, 585.361511, 34.944633, 180.327789, -1, -1 );
AddStaticVehicle( 426, -1956.463867, 585.220092, 34.860263, 180.290328, -1, -1 ); AddStaticVehicle( 426, -1956.463867, 585.220092, 34.860263, 180.290328, -1, -1 );
AddStaticVehicle( 416, -2642.078125, 619.112121, 14.573535, 271.431579, -1, -1 ); AddStaticVehicleEx( 416, -2642.078125, 619.112121, 14.573535, 271.431579, -1, -1, 240, 1 );
AddStaticVehicle( 416, -2654.931884, 618.950622, 14.602631, 270.186126, -1, -1 ); AddStaticVehicleEx( 416, -2654.931884, 618.950622, 14.602631, 270.186126, -1, -1, 240, 1 );
AddStaticVehicle( 416, -2667.000976, 618.934326, 14.602670, 269.187713, -1, -1 ); AddStaticVehicleEx( 416, -2667.000976, 618.934326, 14.602670, 269.187713, -1, -1, 240, 1 );
AddStaticVehicle( 489, -1944.315307, 585.099792, 35.272480, 181.346389, -1, -1 ); AddStaticVehicle( 489, -1944.315307, 585.099792, 35.272480, 181.346389, -1, -1 );
AddStaticVehicle( 466, -1929.262451, 585.444763, 34.863761, 180.077941, -1, -1 ); AddStaticVehicle( 466, -1929.262451, 585.444763, 34.863761, 180.077941, -1, -1 );
AddStaticVehicle( 436, -2589.145507, 632.634765, 14.222237, 91.133293, -1, -1 ); AddStaticVehicle( 436, -2589.145507, 632.634765, 14.222237, 91.133293, -1, -1 );
@ -238,9 +238,9 @@ static stock InitializeServerVehicles( )
AddStaticVehicle( 522, -1988.700683, 301.183624, 34.739818, 89.835449, -1, -1 ); AddStaticVehicle( 522, -1988.700683, 301.183624, 34.739818, 89.835449, -1, -1 );
AddStaticVehicle( 579, -1987.592651, 304.252044, 35.113090, 90.826240, -1, -1 ); AddStaticVehicle( 579, -1987.592651, 304.252044, 35.113090, 90.826240, -1, -1 );
AddStaticVehicle( 489, -1987.468261, 307.747619, 35.318893, 88.531921, -1, -1 ); AddStaticVehicle( 489, -1987.468261, 307.747619, 35.318893, 88.531921, -1, -1 );
AddStaticVehicle( 427, -2425.466600, 517.913500, 30.060900, 39.323000, -1, -1 ); AddStaticVehicleEx( 427, -2425.466600, 517.913500, 30.060900, 39.323000, -1, -1, 240, 1 );
AddStaticVehicle( 427, -2418.693100, 524.879800, 30.052500, 50.924200, -1, -1 ); AddStaticVehicleEx( 427, -2418.693100, 524.879800, 30.052500, 50.924200, -1, -1, 240, 1 );
AddStaticVehicle( 427, -2414.424600, 531.775100, 30.058900, 67.949200, -1, -1 ); AddStaticVehicleEx( 427, -2414.424600, 531.775100, 30.058900, 67.949200, -1, -1, 240, 1 );
AddStaticVehicle( 436, -2407.771728, 741.556030, 34.789478, 179.035964, -1, -1 ); AddStaticVehicle( 436, -2407.771728, 741.556030, 34.789478, 179.035964, -1, -1 );
AddStaticVehicle( 500, -1495.943969, 909.862731, 7.295326, 88.267486, -1, -1 ); AddStaticVehicle( 500, -1495.943969, 909.862731, 7.295326, 88.267486, -1, -1 );
AddStaticVehicle( 426, -2438.312988, 741.672363, 34.758396, 0.843255, -1, -1 ); AddStaticVehicle( 426, -2438.312988, 741.672363, 34.758396, 0.843255, -1, -1 );
@ -343,16 +343,16 @@ static stock InitializeServerVehicles( )
AddStaticVehicle( 448, -1725.480834, 1348.823730, 6.645854, 44.740573, -1, -1 ); AddStaticVehicle( 448, -1725.480834, 1348.823730, 6.645854, 44.740573, -1, -1 );
AddStaticVehicle( 448, -1723.338012, 1346.764282, 6.639358, 45.113075, -1, -1 ); AddStaticVehicle( 448, -1723.338012, 1346.764282, 6.639358, 45.113075, -1, -1 );
AddStaticVehicle( 507, -1981.614868, 723.168579, 45.193714, 90.283843, -1, -1 ); AddStaticVehicle( 507, -1981.614868, 723.168579, 45.193714, 90.283843, -1, -1 );
AddStaticVehicle( 597, -1613.486938, 723.111877, 13.112130, 270.161437, -1, -1 ); AddStaticVehicleEx( 597, -1613.486938, 723.111877, 13.112130, 270.161437, -1, -1, 240, 1 );
AddStaticVehicle( 597, -1605.637451, 723.047180, 11.689531, 271.323242, -1, -1 ); AddStaticVehicleEx( 597, -1605.637451, 723.047180, 11.689531, 271.323242, -1, -1, 240, 1 );
AddStaticVehicle( 597, -1598.496826, 723.047546, 10.402059, 271.118011, -1, -1 ); AddStaticVehicleEx( 597, -1598.496826, 723.047546, 10.402059, 271.118011, -1, -1, 240, 1 );
AddStaticVehicle( 420, -1434.731300, -287.197100, 13.849400, 58.069100, -1, -1 ); AddStaticVehicle( 420, -1434.731300, -287.197100, 13.849400, 58.069100, -1, -1 );
AddStaticVehicle( 420, -1426.684700, -292.856400, 13.852800, 52.118700, -1, -1 ); AddStaticVehicle( 420, -1426.684700, -292.856400, 13.852800, 52.118700, -1, -1 );
AddStaticVehicle( 420, -1418.511100, -299.492100, 13.851900, 50.274500, -1, -1 ); AddStaticVehicle( 420, -1418.511100, -299.492100, 13.851900, 50.274500, -1, -1 );
AddStaticVehicle( 490, -2421.776900, 521.2598000, 30.059200, 45.953800, -1, -1 ); AddStaticVehicleEx( 490, -2421.776900, 521.2598000, 30.059200, 45.953800, -1, -1, 240, 1 );
AddStaticVehicle( 490, -2429.633100, 515.3820000, 30.058000, 35.755600, -1, -1 ); AddStaticVehicleEx( 490, -2429.633100, 515.3820000, 30.058000, 35.755600, -1, -1, 240, 1 );
AddStaticVehicle( 490, -2416.954100, 528.7039000, 30.061600, 57.636800, -1, -1 ); AddStaticVehicleEx( 490, -2416.954100, 528.7039000, 30.061600, 57.636800, -1, -1, 240, 1 );
AddStaticVehicle( 490, -2413.490700, 535.6552000, 30.056100, 74.905500, -1, -1 ); AddStaticVehicleEx( 490, -2413.490700, 535.6552000, 30.056100, 74.905500, -1, -1, 240, 1 );
AddStaticVehicle( 90, -2413.672600, 540.0665000, 30.056500, 88.940900, -1, -1 ); AddStaticVehicle( 90, -2413.672600, 540.0665000, 30.056500, 88.940900, -1, -1 );
AddStaticVehicle( 455, -2330.853500, -113.908400, 35.933000, 90.571800, -1, -1 ); AddStaticVehicle( 455, -2330.853500, -113.908400, 35.933000, 90.571800, -1, -1 );
AddStaticVehicle( 455, -2406.731400, -102.701300, 35.759000, 0.0000000, -1, -1 ); AddStaticVehicle( 455, -2406.731400, -102.701300, 35.759000, 0.0000000, -1, -1 );
@ -408,6 +408,11 @@ static stock InitializeServerVehicles( )
AddStaticVehicle( 473,-2132.7664, 1689.1938, -0.2510, 145.6282, -1 , -1 ); // alca dinghy AddStaticVehicle( 473,-2132.7664, 1689.1938, -0.2510, 145.6282, -1 , -1 ); // alca dinghy
AddStaticVehicle( 473,-2124.7256, 1680.1863, -0.3078, 211.8767, -1 , -1 ); // alca dinghy AddStaticVehicle( 473,-2124.7256, 1680.1863, -0.3078, 211.8767, -1 , -1 ); // alca dinghy
AddStaticVehicle( 473,-2147.2537, 1693.4557, -0.2553, 220.9750, -1 , -1 ); // alca dinghy AddStaticVehicle( 473,-2147.2537, 1693.4557, -0.2553, 220.9750, -1 , -1 ); // alca dinghy
AddStaticVehicle( 463, -2591.6646, 52.5053, 3.8765, 64.5699, 131, 131 ); // The Lost
AddStaticVehicle( 463, -2591.6646, 56.4805, 3.8767, 70.3625, 131, 131 ); // The Lost
AddStaticVehicle( 463, -2591.6646, 65.5400, 3.8730, 59.8191, 131, 131 ); // The Lost
AddStaticVehicle( 463, -2591.6646, 69.2684, 3.8739, 61.5998, 131, 131 ); // The Lost
AddStaticVehicle( 482, -2584.8413, 73.6874, 4.8535, 90.9373, 131, 131 ); // The Lost
// Vehicle Dealership // Vehicle Dealership
tmpVariable = AddStaticVehicle( 494, -1867.3900, -621.3196, 1007.0273, 130.5349, -1, -1 ); // DL1 tmpVariable = AddStaticVehicle( 494, -1867.3900, -621.3196, 1007.0273, 130.5349, -1, -1 ); // DL1
@ -442,11 +447,11 @@ static stock InitializeServerVehicles( )
AddStaticVehicle(409,2154.7104000,2114.5317000,10.4871000,359.8813000,-1,-1); //Stretch AddStaticVehicle(409,2154.7104000,2114.5317000,10.4871000,359.8813000,-1,-1); //Stretch
AddStaticVehicle(438,2120.2798000,2196.3962000,10.6147000,179.3108000,-1,-1); //Cabbie AddStaticVehicle(438,2120.2798000,2196.3962000,10.6147000,179.3108000,-1,-1); //Cabbie
AddStaticVehicle(420,2155.1626000,2198.9038000,10.4499000,358.3196000,-1,-1); //Taxi AddStaticVehicle(420,2155.1626000,2198.9038000,10.4499000,358.3196000,-1,-1); //Taxi
AddStaticVehicle(598,2251.7229000,2459.5588000,10.5645000,180.6259000,-1,-1); //Police Car (LVPD) AddStaticVehicleEx(598,2251.7229000,2459.5588000,10.5645000,180.6259000,-1,-1,120,1); //Police Car (LVPD)
AddStaticVehicle(596,2260.4204000,2443.8567000,10.5575000,1.4549000,-1,-1); //Police Car (LSPD) AddStaticVehicleEx(596,2260.4204000,2443.8567000,10.5575000,1.4549000,-1,-1,120,1); //Police Car (LSPD)
AddStaticVehicle(599,2269.1033000,2459.7290000,11.0146000,0.2515000,-1,-1); //Police Ranger AddStaticVehicleEx(599,2269.1033000,2459.7290000,11.0146000,0.2515000,-1,-1,120,1); //Police Ranger
AddStaticVehicle(598,2282.7312000,2477.2422000,10.5895000,180.8693000,-1,-1); //Police Car (LVPD) AddStaticVehicleEx(598,2282.7312000,2477.2422000,10.5895000,180.8693000,-1,-1,120,1); //Police Car (LVPD)
AddStaticVehicle(598,2291.1853000,2460.7002000,10.5670000,179.9081000,-1,-1); //Police Car (LVPD) AddStaticVehicleEx(598,2291.1853000,2460.7002000,10.5670000,179.9081000,-1,-1,120,1); //Police Car (LVPD)
AddStaticVehicle(541,2485.1333000,2521.3452000,10.4662000,88.7150000,-1,-1); //Bullet AddStaticVehicle(541,2485.1333000,2521.3452000,10.4662000,88.7150000,-1,-1); //Bullet
AddStaticVehicle(402,2476.7112000,2530.8640000,10.8589000,178.9217000,-1,-1); //Buffalo AddStaticVehicle(402,2476.7112000,2530.8640000,10.8589000,178.9217000,-1,-1); //Buffalo
AddStaticVehicle(589,2449.9436000,2547.5051000,10.4985000,0.3426000,-1,-1); //Club AddStaticVehicle(589,2449.9436000,2547.5051000,10.4985000,0.3426000,-1,-1); //Club
@ -554,7 +559,7 @@ static stock InitializeServerVehicles( )
AddStaticVehicle(417,365.4065000,2538.5208000,16.7058000,187.1385000,-1,-1); //Leviathan AddStaticVehicle(417,365.4065000,2538.5208000,16.7058000,187.1385000,-1,-1); //Leviathan
AddStaticVehicle(476,325.3628000,2544.8782000,17.5199000,178.5531000,-1,-1); //Rustler AddStaticVehicle(476,325.3628000,2544.8782000,17.5199000,178.5531000,-1,-1); //Rustler
AddStaticVehicle(442,-355.5031000,2217.1929000,42.3131000,88.6629000,-1,-1); //Romero AddStaticVehicle(442,-355.5031000,2217.1929000,42.3131000,88.6629000,-1,-1); //Romero
AddStaticVehicle(599,-425.3501000,2245.0830000,42.6119000,178.1508000,-1,-1); //Police Ranger AddStaticVehicleEx(599,-425.3501000,2245.0830000,42.6119000,178.1508000,-1,-1,120,1); //Police Ranger
AddStaticVehicle(468,-442.9234000,2222.9109000,42.0205000,178.1901000,-1,-1); //Sanchez AddStaticVehicle(468,-442.9234000,2222.9109000,42.0205000,178.1901000,-1,-1); //Sanchez
AddStaticVehicle(568,-389.2245000,2199.0442000,42.2916000,96.6088000,-1,-1); //Bandito AddStaticVehicle(568,-389.2245000,2199.0442000,42.2916000,96.6088000,-1,-1); //Bandito
AddStaticVehicle(454,-484.9109000,2188.9893000,40.7976000,180.1955000,-1,-1); //Tropic AddStaticVehicle(454,-484.9109000,2188.9893000,40.7976000,180.1955000,-1,-1); //Tropic
@ -573,9 +578,9 @@ static stock InitializeServerVehicles( )
AddStaticVehicle(403,-1299.7213000,2708.8484000,50.6682000,4.5200000,-1,-1); //Linerunner AddStaticVehicle(403,-1299.7213000,2708.8484000,50.6682000,4.5200000,-1,-1); //Linerunner
AddStaticVehicle(463,-1273.1742000,2707.7610000,49.6029000,29.4728000,-1,-1); //Freeway AddStaticVehicle(463,-1273.1742000,2707.7610000,49.6029000,29.4728000,-1,-1); //Freeway
AddStaticVehicle(468,-1267.1531000,2710.2527000,49.7391000,29.2539000,-1,-1); //Sanchez AddStaticVehicle(468,-1267.1531000,2710.2527000,49.7391000,29.2539000,-1,-1); //Sanchez
AddStaticVehicle(599,-1400.4454000,2637.5820000,55.8724000,90.1155000,-1,-1); //Police Ranger AddStaticVehicleEx(599,-1400.4454000,2637.5820000,55.8724000,90.1155000,-1,-1,120,1); //Police Ranger
AddStaticVehicle(523,-1400.0012000,2628.5425000,55.3484000,91.3032000,-1,-1); //HPV1000 AddStaticVehicle(523,-1400.0012000,2628.5425000,55.3484000,91.3032000,-1,-1); //HPV1000
AddStaticVehicle(598,-1400.4594000,2656.5981000,55.4359000,89.6264000,-1,-1); //Police Car (LVPD) AddStaticVehicleEx(598,-1400.4594000,2656.5981000,55.4359000,89.6264000,-1,-1,120,1); //Police Car (LVPD)
AddStaticVehicle(411,-1501.2905000,2647.4238000,55.3804000,0.6860000,-1,-1); //Infernus AddStaticVehicle(411,-1501.2905000,2647.4238000,55.3804000,0.6860000,-1,-1); //Infernus
AddStaticVehicle(543,-1562.9995000,2695.2251000,55.5954000,179.5001000,-1,-1); //Sadler AddStaticVehicle(543,-1562.9995000,2695.2251000,55.5954000,179.5001000,-1,-1); //Sadler
AddStaticVehicle(466,-1519.7347000,2690.4072000,55.4753000,248.3675000,-1,-1); //Glendale AddStaticVehicle(466,-1519.7347000,2690.4072000,55.4753000,248.3675000,-1,-1); //Glendale
@ -618,9 +623,9 @@ static stock InitializeServerVehicles( )
AddStaticVehicle(561,-77.4508000,1077.0004000,19.5558000,179.1996000,-1,-1); //Stratum AddStaticVehicle(561,-77.4508000,1077.0004000,19.5558000,179.1996000,-1,-1); //Stratum
AddStaticVehicle(466,-72.6212000,970.4161000,19.5206000,10.7515000,-1,-1); //Glendale AddStaticVehicle(466,-72.6212000,970.4161000,19.5206000,10.7515000,-1,-1); //Glendale
AddStaticVehicle(402,-149.3938000,926.7260000,19.6191000,283.0578000,-1,-1); //Buffalo AddStaticVehicle(402,-149.3938000,926.7260000,19.6191000,283.0578000,-1,-1); //Buffalo
AddStaticVehicle(598,-227.0211000,994.4134000,19.2985000,87.5296000,-1,-1); //Police Car (LVPD) AddStaticVehicleEx(598,-227.0211000,994.4134000,19.2985000,87.5296000,-1,-1,120,1); //Police Car (LVPD)
AddStaticVehicle(523,-216.6211000,987.3325000,19.0092000,178.9684000,-1,-1); //HPV1000 AddStaticVehicle(523,-216.6211000,987.3325000,19.0092000,178.9684000,-1,-1); //HPV1000
AddStaticVehicle(599,-210.5997000,999.2169000,19.8594000,91.0179000,-1,-1); //Police Ranger AddStaticVehicleEx(599,-210.5997000,999.2169000,19.8594000,91.0179000,-1,-1,120,1); //Police Ranger
AddStaticVehicle(427,-226.7878000,999.7707000,19.7320000,90.7007000,-1,-1); //Enforcer AddStaticVehicle(427,-226.7878000,999.7707000,19.7320000,90.7007000,-1,-1); //Enforcer
AddStaticVehicle(416,-322.1475000,1058.2961000,19.8910000,359.9510000,-1,-1); //Ambulance AddStaticVehicle(416,-322.1475000,1058.2961000,19.8910000,359.9510000,-1,-1); //Ambulance
AddStaticVehicle(560,-304.8201000,1023.8888000,19.2983000,269.5181000,-1,-1); //Sultan AddStaticVehicle(560,-304.8201000,1023.8888000,19.2983000,269.5181000,-1,-1); //Sultan
@ -864,7 +869,7 @@ static stock InitializeServerVehicles( )
AddStaticVehicle( 477, -2206.064941, -2298.992675, 30.381359, 317.453613, -1, -1 ); AddStaticVehicle( 477, -2206.064941, -2298.992675, 30.381359, 317.453613, -1, -1 );
AddStaticVehicle( 478, -2092.571044, -2244.076171, 30.758443, 138.650314, -1, -1 ); AddStaticVehicle( 478, -2092.571044, -2244.076171, 30.758443, 138.650314, -1, -1 );
AddStaticVehicle( 478, -2102.175537, -2233.910400, 30.620101, 137.604217, -1, -1 ); AddStaticVehicle( 478, -2102.175537, -2233.910400, 30.620101, 137.604217, -1, -1 );
AddStaticVehicle( 416, -2203.672607, -2315.558593, 30.774448, 318.517517, -1, -1 ); AddStaticVehicleEx( 416, -2203.672607, -2315.558593, 30.774448, 318.517517, -1, -1, 240, 1 );
AddStaticVehicle( 463, -2200.244628, -2262.725341, 30.093130, 231.325180, -1, -1 ); AddStaticVehicle( 463, -2200.244628, -2262.725341, 30.093130, 231.325180, -1, -1 );
AddStaticVehicle( 468, -2208.998046, -2254.527343, 30.348510, 234.874664, -1, -1 ); AddStaticVehicle( 468, -2208.998046, -2254.527343, 30.348510, 234.874664, -1, -1 );
AddStaticVehicle( 491, -2097.414062, -2239.713623, 30.384279, 139.849884, -1, -1 ); AddStaticVehicle( 491, -2097.414062, -2239.713623, 30.384279, 139.849884, -1, -1 );
@ -904,7 +909,7 @@ static stock InitializeServerVehicles( )
AddStaticVehicle( 400, 708.170715, -458.336486, 16.428236, 270.448425, -1, -1 ); AddStaticVehicle( 400, 708.170715, -458.336486, 16.428236, 270.448425, -1, -1 );
AddStaticVehicle( 596, 614.293029, -597.008972, 16.953319, 270.690643, -1, -1 ); AddStaticVehicle( 596, 614.293029, -597.008972, 16.953319, 270.690643, -1, -1 );
AddStaticVehicle( 496, 695.270690, -470.103607, 16.051948, 89.780700, -1, -1 ); AddStaticVehicle( 496, 695.270690, -470.103607, 16.051948, 89.780700, -1, -1 );
AddStaticVehicle( 523, 613.086364, -601.207336, 16.801979, 268.153198, -1, -1 ); AddStaticVehicleEx( 523, 613.086364, -601.207336, 16.801979, 268.153198, -1, -1, 240, 1 );
AddStaticVehicle( 482, 708.286315, -464.582580, 16.444482, 269.546966, -1, -1 ); AddStaticVehicle( 482, 708.286315, -464.582580, 16.444482, 269.546966, -1, -1 );
AddStaticVehicle( 463, 668.084472, -461.430145, 15.875892, 271.467498, -1, -1 ); AddStaticVehicle( 463, 668.084472, -461.430145, 15.875892, 271.467498, -1, -1 );
AddStaticVehicle( 468, 668.161926, -470.812652, 16.004730, 268.505920, -1, -1 ); AddStaticVehicle( 468, 668.161926, -470.812652, 16.004730, 268.505920, -1, -1 );
@ -956,38 +961,38 @@ static stock InitializeServerVehicles( )
AddStaticVehicle( 402, 2263.363769, -128.744888, 27.300945, 359.765106, -1, -1 ); AddStaticVehicle( 402, 2263.363769, -128.744888, 27.300945, 359.765106, -1, -1 );
AddStaticVehicle( 519, 1889.941040, -2624.590820, 14.468383, 359.124145, -1, -1 ); AddStaticVehicle( 519, 1889.941040, -2624.590820, 14.468383, 359.124145, -1, -1 );
AddStaticVehicle( 412, 2483.606933, -1655.894653, 13.162011, 90.518936, -1, -1 ); AddStaticVehicle( 412, 2483.606933, -1655.894653, 13.162011, 90.518936, -1, -1 );
AddStaticVehicle( 490, 1595.528808, -1709.573974, 6.019586, 359.722351, -1, -1 ); AddStaticVehicleEx( 490, 1595.528808, -1709.573974, 6.019586, 359.722351, -1, -1, 240, 1 );
AddStaticVehicle( 593, 1822.176513, -2624.553222, 14.024420, 359.080780, -1, -1 ); AddStaticVehicle( 593, 1822.176513, -2624.553222, 14.024420, 359.080780, -1, -1 );
AddStaticVehicle( 596, 1587.685302, -1710.722900, 5.612419, 358.663818, -1, -1 ); AddStaticVehicle( 596, 1587.685302, -1710.722900, 5.612419, 358.663818, -1, -1 );
AddStaticVehicle( 519, 1753.972167, -2624.416992, 14.451003, 358.653961, -1, -1 ); AddStaticVehicle( 519, 1753.972167, -2624.416992, 14.451003, 358.653961, -1, -1 );
AddStaticVehicle( 596, 1534.687377, -1645.483276, 5.612185, 0.414491, -1, -1 ); AddStaticVehicle( 596, 1534.687377, -1645.483276, 5.612185, 0.414491, -1, -1 );
AddStaticVehicle( 476, 1682.415649, -2627.942626, 14.254081, 359.942840, -1, -1 ); AddStaticVehicle( 476, 1682.415649, -2627.942626, 14.254081, 359.942840, -1, -1 );
AddStaticVehicle( 490, 1544.408813, -1651.068603, 6.018870, 269.377441, -1, -1 ); AddStaticVehicleEx( 490, 1544.408813, -1651.068603, 6.018870, 269.377441, -1, -1, 240, 1 );
AddStaticVehicle( 476, 1617.713745, -2629.208007, 14.210683, 359.764465, -1, -1 ); AddStaticVehicle( 476, 1617.713745, -2629.208007, 14.210683, 359.764465, -1, -1 );
AddStaticVehicle( 596, 1544.830932, -1663.129516, 5.612981, 270.946533, -1, -1 ); AddStaticVehicle( 596, 1544.830932, -1663.129516, 5.612981, 270.946533, -1, -1 );
AddStaticVehicle( 592, 1727.063598, -2441.779296, 14.818604, 178.650726, -1, -1 ); AddStaticVehicle( 592, 1727.063598, -2441.779296, 14.818604, 178.650726, -1, -1 );
AddStaticVehicle( 475, 2473.250976, -1701.073974, 13.326033, 359.534210, -1, -1 ); AddStaticVehicle( 475, 2473.250976, -1701.073974, 13.326033, 359.534210, -1, -1 );
AddStaticVehicle( 427, 1564.478271, -1709.771728, 6.022296, 0.756405, -1, -1 ); AddStaticVehicleEx( 427, 1564.478271, -1709.771728, 6.022296, 0.756405, -1, -1, 240, 1 );
AddStaticVehicle( 490, 1600.590820, -1700.051025, 6.018587, 89.825813, -1, -1 ); AddStaticVehicleEx( 490, 1600.590820, -1700.051025, 6.018587, 89.825813, -1, -1, 240, 1 );
AddStaticVehicle( 466, 2425.057617, -1643.590332, 13.239023, 180.256881, -1, -1 ); AddStaticVehicle( 466, 2425.057617, -1643.590332, 13.239023, 180.256881, -1, -1 );
AddStaticVehicle( 523, 1583.572143, -1711.615600, 5.459059, 0.000000, -1, -1 ); AddStaticVehicleEx( 523, 1583.572143, -1711.615600, 5.459059, 0.000000, -1, -1, 240, 1 );
AddStaticVehicle( 592, 1643.698364, -2440.519775, 14.738221, 179.799713, -1, -1 ); AddStaticVehicle( 592, 1643.698364, -2440.519775, 14.738221, 179.799713, -1, -1 );
AddStaticVehicle( 523, 1574.387939, -1711.133911, 5.456938, 358.523590, -1, -1 ); AddStaticVehicleEx( 523, 1574.387939, -1711.133911, 5.456938, 358.523590, -1, -1, 240, 1 );
AddStaticVehicle( 490, 1544.154907, -1672.142333, 6.018477, 270.745086, -1, -1 ); AddStaticVehicleEx( 490, 1544.154907, -1672.142333, 6.018477, 270.745086, -1, -1, 240, 1 );
AddStaticVehicle( 463, 2393.229248, -1672.942260, 13.443512, 1.111629, -1, -1 ); AddStaticVehicle( 463, 2393.229248, -1672.942260, 13.443512, 1.111629, -1, -1 );
AddStaticVehicle( 511, 1561.888183, -2433.221435, 14.793487, 178.950912, -1, -1 ); AddStaticVehicle( 511, 1561.888183, -2433.221435, 14.793487, 178.950912, -1, -1 );
AddStaticVehicle( 523, 1544.224731, -1676.214843, 5.460846, 271.672546, -1, -1 ); AddStaticVehicleEx( 523, 1544.224731, -1676.214843, 5.460846, 271.672546, -1, -1, 240, 1 );
AddStaticVehicle( 553, 2113.452636, -2433.913574, 14.884115, 180.220001, -1, -1 ); AddStaticVehicle( 553, 2113.452636, -2433.913574, 14.884115, 180.220001, -1, -1 );
AddStaticVehicle( 523, 1530.682617, -1645.039306, 5.454162, 0.739458, -1, -1 ); AddStaticVehicleEx( 523, 1530.682617, -1645.039306, 5.454162, 0.739458, -1, -1, 240, 1 );
AddStaticVehicle( 487, 1878.442504, -2291.966552, 13.741863, 217.845825, -1, -1 ); AddStaticVehicle( 487, 1878.442504, -2291.966552, 13.741863, 217.845825, -1, -1 );
AddStaticVehicle( 487, 1873.612670, -2272.690917, 13.796875, 218.001693, -1, -1 ); AddStaticVehicle( 487, 1873.612670, -2272.690917, 13.796875, 218.001693, -1, -1 );
AddStaticVehicle( 476, 1994.173339, -2314.371337, 14.255472, 87.359558, -1, -1 ); AddStaticVehicle( 476, 1994.173339, -2314.371337, 14.255472, 87.359558, -1, -1 );
AddStaticVehicle( 489, 2327.266601, -1695.732055, 13.560116, 270.449462, -1, -1 ); AddStaticVehicle( 489, 2327.266601, -1695.732055, 13.560116, 270.449462, -1, -1 );
AddStaticVehicle( 522, 2319.294189, -1716.158813, 13.114595, 178.366027, -1, -1 ); AddStaticVehicle( 522, 2319.294189, -1716.158813, 13.114595, 178.366027, -1, -1 );
AddStaticVehicle( 511, 1988.648437, -2382.414794, 14.919784, 90.287071, -1, -1 ); AddStaticVehicle( 511, 1988.648437, -2382.414794, 14.919784, 90.287071, -1, -1 );
AddStaticVehicle( 416, 1181.588623, -1338.645141, 13.850830, 270.317108, -1, -1 ); AddStaticVehicleEx( 416, 1181.588623, -1338.645141, 13.850830, 270.317108, -1, -1, 240, 1 );
AddStaticVehicle( 593, 1994.743774, -2249.075195, 14.024641, 90.583992, -1, -1 ); AddStaticVehicle( 593, 1994.743774, -2249.075195, 14.024641, 90.583992, -1, -1 );
AddStaticVehicle( 416, 1180.428344, -1308.683837, 13.854464, 270.323547, -1, -1 ); AddStaticVehicleEx( 416, 1180.428344, -1308.683837, 13.854464, 270.323547, -1, -1, 240, 1 );
AddStaticVehicle( 477, 2370.705810, -1769.415161, 13.300166, 359.807189, -1, -1 ); AddStaticVehicle( 477, 2370.705810, -1769.415161, 13.300166, 359.807189, -1, -1 );
AddStaticVehicle( 485, 1952.454467, -2194.001953, 13.208797, 272.028930, -1, -1 ); AddStaticVehicle( 485, 1952.454467, -2194.001953, 13.208797, 272.028930, -1, -1 );
AddStaticVehicle( 485, 2007.971923, -2290.384277, 13.214349, 271.826904, -1, -1 ); AddStaticVehicle( 485, 2007.971923, -2290.384277, 13.214349, 271.826904, -1, -1 );
@ -1004,7 +1009,7 @@ static stock InitializeServerVehicles( )
AddStaticVehicle( 401, 1560.078857, -2247.684570, 13.326823, 270.335632, -1, -1 ); AddStaticVehicle( 401, 1560.078857, -2247.684570, 13.326823, 270.335632, -1, -1 );
AddStaticVehicle( 420, 1802.577880, -1919.975463, 13.171360, 89.673576, -1, -1 ); AddStaticVehicle( 420, 1802.577880, -1919.975463, 13.171360, 89.673576, -1, -1 );
AddStaticVehicle( 522, 1536.365722, -2361.407470, 13.123092, 176.805435, -1, -1 ); AddStaticVehicle( 522, 1536.365722, -2361.407470, 13.123092, 176.805435, -1, -1 );
AddStaticVehicle( 416, 2000.616699, -1413.943725, 17.141201, 181.085311, -1, -1 ); AddStaticVehicleEx( 416, 2000.616699, -1413.943725, 17.141201, 181.085311, -1, -1, 240, 1 );
AddStaticVehicle( 420, 1560.197021, -2260.885253, 13.326300, 89.747123, -1, -1 ); AddStaticVehicle( 420, 1560.197021, -2260.885253, 13.326300, 89.747123, -1, -1 );
AddStaticVehicle( 462, 1539.459838, -2360.896240, 13.153014, 179.940643, -1, -1 ); AddStaticVehicle( 462, 1539.459838, -2360.896240, 13.153014, 179.940643, -1, -1 );
AddStaticVehicle( 481, 1969.338745, -1445.854858, 13.038166, 358.897064, -1, -1 ); AddStaticVehicle( 481, 1969.338745, -1445.854858, 13.038166, 358.897064, -1, -1 );
@ -1013,10 +1018,10 @@ static stock InitializeServerVehicles( )
AddStaticVehicle( 549, 1977.699707, -1995.669555, 13.251157, 359.826965, -1, -1 ); AddStaticVehicle( 549, 1977.699707, -1995.669555, 13.251157, 359.826965, -1, -1 );
AddStaticVehicle( 475, 1984.205932, -1995.592407, 13.354595, 179.333389, -1, -1 ); AddStaticVehicle( 475, 1984.205932, -1995.592407, 13.354595, 179.333389, -1, -1 );
AddStaticVehicle( 463, 2271.170898, -1635.195678, 14.865265, 181.999954, -1, -1 ); AddStaticVehicle( 463, 2271.170898, -1635.195678, 14.865265, 181.999954, -1, -1 );
AddStaticVehicle( 416, 2037.245483, -1423.851928, 17.141618, 180.235870, -1, -1 ); AddStaticVehicleEx( 416, 2037.245483, -1423.851928, 17.141618, 180.235870, -1, -1, 240, 1 );
AddStaticVehicle( 481, 1886.441650, -1396.874389, 13.077710, 276.836578, -1, -1 ); AddStaticVehicle( 481, 1886.441650, -1396.874389, 13.077710, 276.836578, -1, -1 );
AddStaticVehicle( 481, 1885.028686, -1399.674072, 13.003782, 246.756225, -1, -1 ); AddStaticVehicle( 481, 1885.028686, -1399.674072, 13.003782, 246.756225, -1, -1 );
AddStaticVehicle( 407, 1750.186767, -1456.032836, 13.782455, 269.653381, -1, -1 ); AddStaticVehicleEx( 407, 1750.186767, -1456.032836, 13.782455, 269.653381, -1, -1, 240, 1 );
AddStaticVehicle( 437, 1172.751464, -1796.699829, 13.531793, 179.339721, -1, -1 ); AddStaticVehicle( 437, 1172.751464, -1796.699829, 13.531793, 179.339721, -1, -1 );
AddStaticVehicle( 437, 1182.211669, -1796.061645, 13.555741, 0.158258, -1, -1 ); AddStaticVehicle( 437, 1182.211669, -1796.061645, 13.555741, 0.158258, -1, -1 );
AddStaticVehicle( 596, 1535.697387, -1667.963500, 13.103236, 179.848037, -1, -1 ); AddStaticVehicle( 596, 1535.697387, -1667.963500, 13.103236, 179.848037, -1, -1 );
@ -1265,10 +1270,10 @@ static stock InitializeServerVehicles( )
AddStaticVehicle( 429, 2676.494140, -1821.889160, 9.055012, 309.538818, -1, -1 ); AddStaticVehicle( 429, 2676.494140, -1821.889160, 9.055012, 309.538818, -1, -1 );
AddStaticVehicle( 415, 2657.932373, -1702.095825, 9.091567, 89.390357, -1, -1 ); AddStaticVehicle( 415, 2657.932373, -1702.095825, 9.091567, 89.390357, -1, -1 );
AddStaticVehicle( 522, 2691.825439, -1672.806274, 9.041232, 1.062990, -1, -1 ); AddStaticVehicle( 522, 2691.825439, -1672.806274, 9.041232, 1.062990, -1, -1 );
AddStaticVehicle( 490, 1512.243400, -1477.832000, 9.626500, 1.627700, -1, -1 ); AddStaticVehicleEx( 490, 1512.243400, -1477.832000, 9.626500, 1.627700, -1, -1, 240, 1 );
AddStaticVehicle( 427, 1517.129900, -1476.416300, 9.539900, 357.5721, -1, -1 ); AddStaticVehicleEx( 427, 1517.129900, -1476.416300, 9.539900, 357.5721, -1, -1, 240, 1 );
AddStaticVehicle( 490, 1521.418700, -1477.628300, 9.611000, 359.2550, -1, -1 ); AddStaticVehicleEx( 490, 1521.418700, -1477.628300, 9.611000, 359.2550, -1, -1, 240, 1 );
AddStaticVehicle( 427, 1525.687600, -1476.441400, 9.609600, 357.8114, -1, -1 ); AddStaticVehicleEx( 427, 1525.687600, -1476.441400, 9.609600, 357.8114, -1, -1, 240, 1 );
AddStaticVehicle( 492, 2508.360800, -1671.674400, 13.16180 ,347.7810, -1, -1 ); AddStaticVehicle( 492, 2508.360800, -1671.674400, 13.16180 ,347.7810, -1, -1 );
// Army Base LS // Army Base LS

View File

@ -0,0 +1,570 @@
/*
* Irresistible Gaming (c) 2018
* Developed by Stev
* Module: duel.pwn
* Purpose: player dueling system
*/
/* ** Debug ** */
// Added class detection for civilains - ShowPlayerDuelMenu(playerid)
// #define GivePlayerCash GivePlayerMoney
// #define GetPlayerCash GetPlayerMoney
/* ** Definitions ** */
#define COL_DUEL "{B74AFF}"
#define DIALOG_DUEL 7360
#define DIALOG_DUEL_PLAYER 7361
#define DIALOG_DUEL_LOCATION 7362
#define DIALOG_DUEL_WEAPON 7363
#define DIALOG_DUEL_WAGER 7364
#define DIALOG_DUEL_WEAPON_TWO 7365
#define DIALOG_DUEL_HEALTH 7366
#define DIALOG_DUEL_ARMOUR 7367
/* ** Variables ** */
enum duelData
{
duelPlayer,
duelWeapon[2],
duelBet,
Float: duelArmour,
Float: duelHealth,
duelCountdown,
duelTimer,
duelLocation,
};
enum locationData
{
locationName[19],
Float:locationPosOne[3],
Float:locationPosTwo[3],
};
static const Float: duel_coordinates[3] = {-2226.1938, 251.9206, 35.3203};
new
weaponList [] = {0, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34},
LocationInfo [][locationData] =
{
{"Santa Maria Beach", {369.75770, -1831.576, 7.67190}, {369.65890, -1871.215, 7.67190}},
{"Greenglass College", {1078.0353, 1084.4989, 10.8359}, {1095.4019, 1064.7239, 10.8359}},
{"Baseball Arena", {1393.0995, 2177.4585, 9.75780}, {1377.7881, 2195.4214, 9.75780}},
{"The Visage", {1960.4512, 1907.6881, 130.937}, {1969.4047, 1923.2622, 130.937}},
{" Mount Chilliad", {-2318.471, -1632.880, 483.703}, {-2329.174, -1604.657, 483.760}},
{"The Farm", {-1044.856, -996.8120, 129.218}, {-1125.599, -996.7523, 129.218}},
{"Tennis Courts", {755.93790, -1280.710, 13.5565}, {755.93960, -1238.688, 13.5516}},
{"Underwater World", {520.59600, -2125.663, -28.257}, {517.96600, -2093.610, -28.257}},
{"Grove Street", {2476.4580, -1668.631, 13.3249}, {2501.1560, -1667.655, 13.3559}},
{"Ocean Docks", {2683.5440, -2485.137, 13.5425}, {2683.8470, -2433.726, 13.5553}}
},
duelInfo [MAX_PLAYERS][duelData],
bool: p_playerDueling [MAX_PLAYERS char],
p_duelInvitation [MAX_PLAYERS][MAX_PLAYERS],
g_DuelCheckpoint = -1
;
/* ** Hooks ** */
hook OnGameModeInit()
{
CreateDynamicMapIcon(duel_coordinates[0], duel_coordinates[1], duel_coordinates[2], 23, 0, -1, -1, -1, 750.0);
g_DuelCheckpoint = CreateDynamicCP(duel_coordinates[0], duel_coordinates[1], duel_coordinates[2], 1.5, 0, 0, -1);
CreateDynamic3DTextLabel(""COL_GOLD"[DUEL PLAYER]", -1, duel_coordinates[0], duel_coordinates[1], duel_coordinates[2], 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0, -1);
return 1;
}
hook OnPlayerConnect(playerid)
{
p_playerDueling{playerid} = false;
duelInfo[playerid][duelPlayer] = INVALID_PLAYER_ID;
duelInfo[playerid][duelWeapon][0] = 0;
duelInfo[playerid][duelWeapon][1] = 0;
duelInfo[playerid][duelHealth] = 100.0;
duelInfo[playerid][duelArmour] = 100.0;
duelInfo[playerid][duelBet] = 0;
return 1;
}
hook OnPlayerDisconnect(playerid, reason)
{
forfeitPlayerDuel(playerid);
return 1;
}
#if defined AC_INCLUDED
hook OnPlayerDeathEx(playerid, killerid, reason, Float: damage, bodypart)
#else
hook OnPlayerDeath(playerid, killerid, reason)
#endif
{
forfeitPlayerDuel(playerid);
return 1;
}
hook SetPlayerRandomSpawn(playerid)
{
if (IsPlayerDueling(playerid))
{
// teleport back to pb
SetPlayerPos(playerid, duel_coordinates[0], duel_coordinates[1], duel_coordinates[2]);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
// reset duel variables
p_playerDueling{playerid} = false;
duelInfo[playerid][duelPlayer] = INVALID_PLAYER_ID;
return Y_HOOKS_BREAK_RETURN_1;
}
return 1;
}
hook OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if (checkpointid == g_DuelCheckpoint)
{
ShowPlayerDuelMenu(playerid);
return 1;
}
return 1;
}
hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == DIALOG_DUEL && response)
{
switch (listitem)
{
case 0: ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{C0C0C0}Note: You can enter partially their names.", "Select", "Back");
case 1: ShowPlayerDialog(playerid, DIALOG_DUEL_HEALTH, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Health", "{FFFFFF}Enter the amount of health you will begin with:\n\n{C0C0C0}Note: The default health is 100.0.", "Select", "Back");
case 2: ShowPlayerDialog(playerid, DIALOG_DUEL_ARMOUR, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Armour", "{FFFFFF}Enter the amount of armour you will begin with:\n\n{C0C0C0}Note: The default armour is 100.0.", "Select", "Back");
case 3:
{
new weaponid = duelInfo[playerid][duelWeapon][0];
erase(szBigString);
for (new i = 0; i < sizeof(weaponList); i ++) {
format(szBigString, sizeof(szBigString), "%s%s%s\n", szBigString, (weaponid == weaponList[i] ? (COL_GREY) : (COL_WHITE)), ReturnWeaponName(weaponList[i]));
}
ShowPlayerDialog(playerid, DIALOG_DUEL_WEAPON, DIALOG_STYLE_LIST, "{FFFFFF}Duel Settings - Change Primary Weapon", szBigString, "Select", "Back");
}
case 4:
{
new weaponid = duelInfo[playerid][duelWeapon][1];
erase(szBigString);
for (new i = 0; i < sizeof(weaponList); i ++) {
format(szBigString, sizeof(szBigString), "%s%s%s\n", szBigString, (weaponid == weaponList[i] ? (COL_GREY) : (COL_WHITE)), ReturnWeaponName(weaponList[i]));
}
ShowPlayerDialog(playerid, DIALOG_DUEL_WEAPON_TWO, DIALOG_STYLE_LIST, "{FFFFFF}Duel Settings - Change Secondary Weapon", szBigString, "Select", "Back");
}
case 5:
{
new index = duelInfo[playerid][duelLocation];
erase(szBigString);
for (new i = 0; i < sizeof(LocationInfo); i ++) {
format(szBigString, sizeof(szBigString), "%s%s%s\n", szBigString, (index == i ? (COL_GREY) : (COL_WHITE)), LocationInfo[i][locationName]);
}
ShowPlayerDialog(playerid, DIALOG_DUEL_LOCATION, DIALOG_STYLE_LIST, "{FFFFFF}Duel Settings - Change Location", szBigString, "Select", "Back");
}
case 6: ShowPlayerDialog(playerid, DIALOG_DUEL_WAGER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Set A Wager", "{FFFFFF}Please enter the wager for this duel:", "Select", "Back");
case 7:
{
new targetid = duelInfo[playerid][duelPlayer];
if (!IsPlayerConnected(targetid)) {
SendError(playerid, "You haven't selected anyone to duel!");
return ShowPlayerDuelMenu(playerid);
}
p_duelInvitation[playerid][targetid] = gettime() + 60;
ShowPlayerHelpDialog(targetid, 10000, "%s wants to duel!~n~~n~~y~Location: ~w~%s~n~~y~Weapon: ~w~%s and %s~n~~y~Wager: ~w~%s", ReturnPlayerName(playerid), LocationInfo[duelInfo[playerid][duelLocation]][locationName], ReturnWeaponName(duelInfo[playerid][duelWeapon][0]), ReturnWeaponName(duelInfo[playerid][duelWeapon][1]), number_format(duelInfo[playerid][duelBet]));
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have sent a duel invitation to %s for "COL_GOLD"%s"COL_WHITE".", ReturnPlayerName(targetid), number_format(duelInfo[playerid][duelBet]));
SendClientMessageFormatted(targetid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You are invited to duel %s for "COL_GOLD"%s"COL_WHITE", use \"/duel accept %d\".", ReturnPlayerName(playerid), number_format(duelInfo[playerid][duelBet]), playerid);
}
}
return 1;
}
else if (dialogid == DIALOG_DUEL_PLAYER)
{
if (!response)
return ShowPlayerDuelMenu(playerid);
new targetid;
if (sscanf(inputtext, "u", targetid))
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{C0C0C0}Note: You can enter partially their names.", "Select", "Back");
if (targetid == playerid)
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{FF0000}You can't invite yourself to duel!", "Select", "Back");
if (targetid == INVALID_PLAYER_ID || !IsPlayerConnected(targetid))
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{FF0000}Player is not connected!", "Select", "Back");
if (IsPlayerDueling(playerid))
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{FF0000}You are already in a duel!", "Select", "Back");
if (IsPlayerDueling(targetid))
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{FF0000}This player is already in a duel!", "Select", "Back");
if (GetPlayerWantedLevel(targetid))
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{FF0000}You can't duel this person right now, they are wanted", "Select", "Back");
if (GetDistanceBetweenPlayers(playerid, targetid) > 25.0)
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{FF0000}The player you wish to duel is not near you.", "Select", "Back");
if (IsPlayerJailed(targetid))
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{FF0000}You can't duel this person right now, they are currently in jail.", "Select", "Back");
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have selected {C0C0C0}%s {FFFFFF}as your opponent.", ReturnPlayerName(targetid));
duelInfo[playerid][duelPlayer] = targetid;
ShowPlayerDuelMenu(playerid);
return 1;
}
else if (dialogid == DIALOG_DUEL_LOCATION)
{
if (!response)
return ShowPlayerDuelMenu(playerid);
if (duelInfo[playerid][duelLocation] == listitem)
{
SendError(playerid, "You have already selected this location!");
return ShowPlayerDuelMenu(playerid);
}
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have changed the duel location to {C0C0C0}%s{FFFFFF}.", LocationInfo[listitem][locationName]);
duelInfo[playerid][duelLocation] = listitem;
ShowPlayerDuelMenu(playerid);
return 1;
}
else if (dialogid == DIALOG_DUEL_WEAPON)
{
if (!response)
return ShowPlayerDuelMenu(playerid);
if (duelInfo[playerid][duelWeapon][0] == weaponList[listitem])
{
SendError(playerid, "You have already selected this weapon!");
return ShowPlayerDuelMenu(playerid);
}
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have changed Primary Weapon to {C0C0C0}%s{FFFFFF}.", ReturnWeaponName(weaponList[listitem]));
duelInfo[playerid][duelWeapon][0] = weaponList[listitem];
ShowPlayerDuelMenu(playerid);
return 1;
}
else if (dialogid == DIALOG_DUEL_WEAPON_TWO)
{
if (!response)
return ShowPlayerDuelMenu(playerid);
if (duelInfo[playerid][duelWeapon][1] == weaponList[listitem])
{
SendError(playerid, "You have already selected this weapon!");
return ShowPlayerDuelMenu(playerid);
}
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have changed Secondary Weapon to {C0C0C0}%s{FFFFFF}.", ReturnWeaponName(weaponList[listitem]));
duelInfo[playerid][duelWeapon][1] = weaponList[listitem];
ShowPlayerDuelMenu(playerid);
return 1;
}
else if (dialogid == DIALOG_DUEL_HEALTH)
{
if (!response)
return ShowPlayerDuelMenu(playerid);
new Float:health;
if (sscanf(inputtext, "f", health))
return ShowPlayerDialog(playerid, DIALOG_DUEL_HEALTH, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Health", "{FFFFFF}Enter the amount of health you will begin with:\n\n{C0C0C0}Note: The default health is 100.0.", "Select", "Back");
if (!(1.0 <= health <= 100.0))
return ShowPlayerDialog(playerid, DIALOG_DUEL_HEALTH, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Health", "{FFFFFF}Enter the amount of health you will begin with:\n\n{FF0000}The amount you have entered is a invalid amount, 1 to 100 only!", "Select", "Back");
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have changed Health to {C0C0C0}%0.2f%%{FFFFFF}.", health);
duelInfo[playerid][duelHealth] = health;
ShowPlayerDuelMenu(playerid);
return 1;
}
else if (dialogid == DIALOG_DUEL_ARMOUR)
{
if (!response)
return ShowPlayerDuelMenu(playerid);
new Float:armour;
if (sscanf(inputtext, "f", armour))
return ShowPlayerDialog(playerid, DIALOG_DUEL_ARMOUR, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Armour", "{FFFFFF}Enter the amount of armour you will begin with:\n\n{C0C0C0}Note: The default armour is 100.0.", "Select", "Back");
if (!(0.0 <= armour <= 100.0))
return ShowPlayerDialog(playerid, DIALOG_DUEL_ARMOUR, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Armour", "{FFFFFF}Enter the amount of armour you will begin with:\n\n{FF0000}The amount you have entered is a invalid amount, 0 to 100 only!", "Select", "Back");
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have changed Armour to {C0C0C0}%0.2f%%{FFFFFF}.", armour);
duelInfo[playerid][duelArmour] = armour;
ShowPlayerDuelMenu(playerid);
return 1;
}
else if (dialogid == DIALOG_DUEL_WAGER)
{
if (IsPlayerDueling(playerid)) // prevent spawning money
return SendError(playerid, "You cannot use this at the moment.");
if (!response)
return ShowPlayerDuelMenu(playerid);
new amount;
if (sscanf(inputtext, "d", amount))
return ShowPlayerDialog(playerid, DIALOG_DUEL_WAGER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Set A Wager", "{FFFFFF}Please enter the wager for this duel:", "Select", "Back");
if (!(0 <= amount < 10000000))
return ShowPlayerDialog(playerid, DIALOG_DUEL_WAGER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Set A Wager", "{FFFFFF}Please enter the wager for this duel:\n\n{FF0000}Wagers must be between $0 and $10,000,000.", "Select", "Back");
duelInfo[playerid][duelBet] = amount;
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have changed the wager to %s.", number_format(duelInfo[playerid][duelBet]));
ShowPlayerDuelMenu(playerid);
return 1;
}
return 1;
}
/* ** Commands ** */
CMD:duel(playerid, params[])
{
if (!strcmp(params, "accept", false, 6))
{
new
targetid;
if (sscanf(params[7], "u", targetid))
return SendUsage(playerid, "/duel accept [PLAYER_ID]");
if (!IsPlayerConnected(targetid))
return SendError(playerid, "You do not have any duel invitations to accept.");
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))
return SendError(playerid, "You cannot accept this invite as you are currently dueling.");
if (GetDistanceBetweenPlayers(playerid, targetid) > 25.0)
return SendError(playerid, "You must be within 25.0 meters of your opponent!");
new waged_amount = duelInfo[targetid][duelBet];
if (duelInfo[targetid][duelBet] != 0)
{
if (GetPlayerCash(targetid) < waged_amount)
{
SendClientMessageFormatted(targetid, -1, ""COL_DUEL"[DUEL]{FFFFFF} %s has accepted but you don't have money to wage (%s).", ReturnPlayerName(playerid), number_format(waged_amount));
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have accepted %s's duel invitation but they don't have money.", ReturnPlayerName(targetid));
return 1;
}
else if (GetPlayerCash(playerid) < waged_amount)
{
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} %s requires you to wage %s.", ReturnPlayerName(targetid), number_format(waged_amount));
SendClientMessageFormatted(targetid, -1, ""COL_DUEL"[DUEL]{FFFFFF} %s has accepted the duel invitation but they don't have money to wage.", ReturnPlayerName(playerid));
return 1;
}
else
{
GivePlayerCash(playerid, -waged_amount);
GivePlayerCash(targetid, -waged_amount);
}
}
SendClientMessageFormatted(targetid, -1, ""COL_DUEL"[DUEL]{FFFFFF} %s has accepted your duel invitation.", ReturnPlayerName(playerid));
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have accepted %s's duel invitation.", ReturnPlayerName(targetid));
p_playerDueling{targetid} = true;
p_playerDueling{playerid} = true;
duelInfo[targetid][duelPlayer] = playerid;
duelInfo[playerid][duelPlayer] = targetid;
duelInfo[playerid][duelBet] = duelInfo[targetid][duelBet];
new id = duelInfo[targetid][duelLocation];
ResetPlayerWeapons(targetid);
RemovePlayerFromVehicle(targetid);
SetPlayerArmour(targetid, duelInfo[targetid][duelArmour]);
SetPlayerHealth(targetid, duelInfo[targetid][duelHealth]);
SetPlayerVirtualWorld(targetid, targetid + 1);
SetPlayerPos(targetid, LocationInfo[id][locationPosTwo][0], LocationInfo[id][locationPosTwo][1], LocationInfo[id][locationPosTwo][2]);
ResetPlayerWeapons(playerid);
RemovePlayerFromVehicle(playerid);
SetPlayerArmour(playerid, duelInfo[targetid][duelArmour]);
SetPlayerHealth(playerid, duelInfo[targetid][duelHealth]);
SetPlayerVirtualWorld(playerid, targetid + 1);
SetPlayerPos(playerid, LocationInfo[id][locationPosOne][0], LocationInfo[id][locationPosOne][1], LocationInfo[id][locationPosOne][2]);
// freeze
TogglePlayerControllable(playerid, 0);
TogglePlayerControllable(targetid, 0);
// start countdown
duelInfo[targetid][duelCountdown] = 10;
duelInfo[targetid][duelTimer] = SetTimerEx("DuelTimer", 960, true, "d", targetid);
// give weapon
GivePlayerWeapon(playerid, duelInfo[targetid][duelWeapon][0], 5000);
GivePlayerWeapon(targetid, duelInfo[targetid][duelWeapon][0], 5000);
GivePlayerWeapon(playerid, duelInfo[targetid][duelWeapon][1], 5000);
GivePlayerWeapon(targetid, duelInfo[targetid][duelWeapon][1], 5000);
// clear invites for safety
for (new i = 0; i < MAX_PLAYERS; i ++) {
p_duelInvitation[playerid][i] = 0;
p_duelInvitation[targetid][i] = 0;
}
return 1;
}
else if (strmatch(params, "cancel"))
{
if (ClearDuelInvites(playerid))
{
return SendServerMessage(playerid, "You have cancelled every duel offer that you have made.");
}
else
{
return SendError(playerid, "You have not made any duel offers recently.");
}
}
return SendUsage(playerid, "/duel [ACCEPT/CANCEL]");
}
/* ** Functions ** */
static stock ClearDuelInvites(playerid)
{
new current_time = gettime();
new count = 0;
for (new i = 0; i < MAX_PLAYERS; i ++)
{
if (p_duelInvitation[playerid][i] != 0 && current_time > p_duelInvitation[playerid][i])
{
p_duelInvitation[playerid][i] = 0;
count ++;
}
}
return count;
}
stock IsPlayerDueling(playerid) {
return p_playerDueling{playerid};
}
stock ShowPlayerDuelMenu(playerid)
{
if (GetPlayerClass(playerid) != CLASS_CIVILIAN)
return SendError(playerid, "You can only use this feature whist being a civilian.");
if (GetPlayerWantedLevel(playerid))
return SendError(playerid, "You cannot duel whilst having a wanted level.");
format(szBigString, sizeof(szBigString),
"Player\t{C0C0C0}%s\nHealth\t{C0C0C0}%.2f%%\nArmour\t{C0C0C0}%.2f%%\nPrimary Weapon\t{C0C0C0}%s\nSecondary Weapon\t{C0C0C0}%s\nLocation\t{C0C0C0}%s\nWager\t{C0C0C0}%s\n"COL_GOLD"Send Invite\t"COL_GOLD">>>",
(!IsPlayerConnected(duelInfo[playerid][duelPlayer]) ? (""COL_RED"N/A") : (ReturnPlayerName(duelInfo[playerid][duelPlayer]))),
duelInfo[playerid][duelHealth],
duelInfo[playerid][duelArmour],
ReturnWeaponName(duelInfo[playerid][duelWeapon][0]),
ReturnWeaponName(duelInfo[playerid][duelWeapon][1]),
LocationInfo[duelInfo[playerid][duelLocation]][locationName],
number_format(duelInfo[playerid][duelBet])
);
ShowPlayerDialog(playerid, DIALOG_DUEL, DIALOG_STYLE_TABLIST, "{FFFFFF}Duel Settings", szBigString, "Select", "Cancel");
return 1;
}
static stock forfeitPlayerDuel(playerid)
{
if (!IsPlayerDueling(playerid))
return 0;
ClearDuelInvites(playerid);
new
winnerid = duelInfo[playerid][duelPlayer];
if (!IsPlayerConnected(winnerid) || !IsPlayerDueling(winnerid))
return 0;
// begin wager info
new
amount_waged = duelInfo[playerid][duelBet];
SpawnPlayer(winnerid);
ClearDuelInvites(winnerid);
p_playerDueling{playerid} = false;
if (0 < amount_waged < 10000000) {
new winning_prize = floatround(float(amount_waged) * 1.9); // We take 5% of the total pot
GivePlayerCash(winnerid, winning_prize);
SendClientMessageToAllFormatted( -1, ""COL_DUEL"[DUEL]{FFFFFF} %s(%d) has won the duel against %s(%d) for %s!", ReturnPlayerName(winnerid), winnerid, ReturnPlayerName(playerid), playerid, number_format(winning_prize));
} else {
SendClientMessageToAllFormatted( -1, ""COL_DUEL"[DUEL]{FFFFFF} %s(%d) has won the duel against %s(%d)!", ReturnPlayerName(winnerid), winnerid, ReturnPlayerName(playerid), playerid);
}
return 1;
}
function DuelTimer(targetid)
{
new
playerid = duelInfo[targetid][duelPlayer];
duelInfo[targetid][duelCountdown] --;
if (duelInfo[targetid][duelCountdown] <= 0)
{
GameTextForPlayer(targetid, "~g~~h~FIGHT!", 1500, 4);
GameTextForPlayer(playerid, "~g~~h~FIGHT!", 1500, 4);
PlayerPlaySound(targetid, 1057, 0.0, 0.0, 0.0);
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
TogglePlayerControllable(playerid, 1);
TogglePlayerControllable(targetid, 1);
KillTimer(duelInfo[targetid][duelTimer]);
}
else
{
format(szSmallString, sizeof(szSmallString), "~w~%d", duelInfo[targetid][duelCountdown]);
GameTextForPlayer(targetid, szSmallString, 1500, 4);
GameTextForPlayer(playerid, szSmallString, 1500, 4);
PlayerPlaySound(targetid, 1056, 0.0, 0.0, 0.0);
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
}
return 1;
}

View File

@ -97,6 +97,7 @@ hook OnPlayerEnterDynamicCP( playerid, checkpointid )
// begin entrance // begin entrance
pauseToLoad( playerid ); pauseToLoad( playerid );
SetPVarInt( playerid, "in_facility", facility );
UpdatePlayerEntranceExitTick( playerid ); UpdatePlayerEntranceExitTick( playerid );
SetPlayerPos( playerid, g_gangFacilityInterior[ int_type ] [ E_X ], g_gangFacilityInterior[ int_type ] [ E_Y ], g_gangFacilityInterior[ int_type ] [ E_Z ] ); SetPlayerPos( playerid, g_gangFacilityInterior[ int_type ] [ E_X ], g_gangFacilityInterior[ int_type ] [ E_Y ], g_gangFacilityInterior[ int_type ] [ E_Z ] );
SetPlayerVirtualWorld( playerid, g_gangFacilities[ facility ] [ E_WORLD ] ); SetPlayerVirtualWorld( playerid, g_gangFacilities[ facility ] [ E_WORLD ] );
@ -129,21 +130,23 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
{ {
if ( dialogid == DIALOG_GANG_JOIN && response ) if ( dialogid == DIALOG_GANG_JOIN && response )
{ {
if ( p_GangID[ playerid ] != -1 ) if ( p_GangID[ playerid ] != -1 ) {
return SendServerMessage( playerid, "You are already in a gang." ); return SendServerMessage( playerid, "You are already in a gang." );
}
new new
joining_gang = GetPVarInt( playerid, "gang_facility_join" ); joining_gang = GetPVarInt( playerid, "gang_facility_join" );
if ( ! Iter_Contains( gangs, joining_gang ) || IsGangPrivate( joining_gang ) ) if ( IsGangPrivate( joining_gang ) ) {
return SendError( playerid, "You can no longer join this gang." ); return SendError( playerid, "You can no longer join this gang as it is private." );
}
p_GangID[ playerid ] = joining_gang; if ( ! SetPlayerGang( playerid, joining_gang ) ) {
if ( GetPlayerWantedLevel( playerid ) < 1 ) SetPlayerColor( playerid, g_gangData[ joining_gang ] [ E_COLOR ] ); SendError( playerid, "You can no longer join this gang." );
mysql_single_query( sprintf( "UPDATE `USERS` SET `GANG_ID`=%d WHERE `ID`=%d", g_gangData[ joining_gang ] [ E_SQL_ID ], GetPlayerAccountID( playerid ) ) ); }
SendClientMessageToGang( joining_gang, g_gangData[ joining_gang ] [ E_COLOR ], "[GANG]{FFFFFF} %s(%d) has joined the gang.", ReturnPlayerName( playerid ), playerid );
return 1; return 1;
} }
else if ( dialogid == DIALOG_FACILITY_AMMU && response ) else if ( dialogid == DIALOG_FACILITY_AMMU && response )
{ {
new player_gang = GetPlayerGang( playerid ); new player_gang = GetPlayerGang( playerid );
@ -156,19 +159,25 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
SetPVarInt( playerid, "facility_weapon_cat", listitem ); SetPVarInt( playerid, "facility_weapon_cat", listitem );
RedirectAmmunation( playerid, listitem, "{FFFFFF}Gang Facility - Purchase Weapons", DIALOG_FACILITY_AMMU_BUY, discount ); RedirectAmmunation( playerid, listitem, "{FFFFFF}Gang Facility - Purchase Weapons", DIALOG_FACILITY_AMMU_BUY, discount );
} }
else if ( dialogid == DIALOG_FACILITY_AMMU_BUY ) else if ( dialogid == DIALOG_FACILITY_AMMU_BUY )
{ {
if ( response ) if ( response )
{ {
new player_gang = GetPlayerGang( playerid ); new facility = GetPVarInt( playerid, "in_facility" );
if ( ! Iter_Contains( gangs, player_gang ) ) return SendError( playerid, "You are not in any gang." ); if ( ! Iter_Contains( gangfacilities, facility ) )
return SendError( playerid, "Cannot identify current gang facility. Please enter facility again." );
new facility_gangid = Turf_GetFacility( g_gangFacilities[ facility ] [ E_TURF_ID ] );
if ( ! Iter_Contains( gangs, facility_gangid ) ) return SendError( playerid, "You are not in any gang." );
if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot buy weapons in jail." ); if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot buy weapons in jail." );
if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot buy weapons in an event." ); if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot buy weapons in an event." );
if ( GetPlayerState( playerid ) == PLAYER_STATE_WASTED || !IsPlayerSpawned( playerid ) ) return SendError( playerid, "You are unable to purchase any weapons at this time." ); if ( GetPlayerState( playerid ) == PLAYER_STATE_WASTED || !IsPlayerSpawned( playerid ) ) return SendError( playerid, "You are unable to purchase any weapons at this time." );
new gun_category = GetPVarInt( playerid, "facility_weapon_cat" ); new gun_category = GetPVarInt( playerid, "facility_weapon_cat" );
new Float: gun_discount = ( FACILITY_AMMU_RESPECT - float( g_gangData[ player_gang ] [ E_RESPECT ] ) ) / FACILITY_AMMU_RESPECT; new Float: gun_discount = ( FACILITY_AMMU_RESPECT - float( g_gangData[ facility_gangid ] [ E_RESPECT ] ) ) / FACILITY_AMMU_RESPECT;
// make sure player doesnt get credited money lol // make sure player doesnt get credited money lol
if ( gun_discount < 0.0 ) { if ( gun_discount < 0.0 ) {

View File

@ -63,7 +63,25 @@ hook OnGameModeInit( )
// mysql_single_query( "UPDATE `USERS` SET `GANG_ID`=-1 WHERE UNIX_TIMESTAMP()-`USERS`.`LASTLOGGED` > 1209600" ); // mysql_single_query( "UPDATE `USERS` SET `GANG_ID`=-1 WHERE UNIX_TIMESTAMP()-`USERS`.`LASTLOGGED` > 1209600" );
// Remove gangs with a non existant gang leader / unmatched player gang id to gang leader id // Remove gangs with a non existant gang leader / unmatched player gang id to gang leader id
mysql_single_query( "DELETE g FROM GANGS g LEFT JOIN USERS u ON g.LEADER = u.ID WHERE u.GANG_ID != g.ID OR u.ID IS NULL" ); mysql_single_query( "DELETE g FROM GANGS g LEFT JOIN USERS u ON g.LEADER = u.ID WHERE (u.GANG_ID != g.ID OR u.ID IS NULL) AND g.LEADER >= 0" );
#endif #endif
return 1; return 1;
} }
/* ** Functions ** */
stock SetPlayerGang( playerid, joining_gang )
{
if ( ! Iter_Contains( gangs, joining_gang ) )
return 0;
// remove from existing gang
if ( p_GangID[ playerid ] != INVALID_GANG_ID ) {
RemovePlayerFromGang( playerid, GANG_LEAVE_QUIT );
}
p_GangID[ playerid ] = joining_gang;
if ( GetPlayerWantedLevel( playerid ) < 1 ) SetPlayerColor( playerid, g_gangData[ joining_gang ] [ E_COLOR ] );
mysql_single_query( sprintf( "UPDATE `USERS` SET `GANG_ID`=%d WHERE `ID`=%d", g_gangData[ joining_gang ] [ E_SQL_ID ], GetPlayerAccountID( playerid ) ) );
SendClientMessageToGang( joining_gang, g_gangData[ joining_gang ] [ E_COLOR ], "[GANG]{FFFFFF} %s(%d) has joined the gang.", ReturnPlayerName( playerid ), playerid );
return 1;
}

View File

@ -54,7 +54,7 @@ hook OnPlayerDeath( playerid, killerid, reason )
if ( IsPlayerConnected( killerid ) ) if ( IsPlayerConnected( killerid ) )
{ {
if ( IsPlayerJailed( playerid ) || IsPlayerInPaintBall( playerid ) || IsPlayerInEvent( playerid ) ) if ( IsPlayerJailed( playerid ) || IsPlayerInPaintBall( playerid ) || IsPlayerInEvent( playerid ) || IsPlayerDueling( playerid ) )
return 1; return 1;
new new

View File

@ -24,6 +24,7 @@
#include < irresistible\gta\weapon_data > #include < irresistible\gta\weapon_data >
// cnr configuration // cnr configuration
#include < irresistible\cnr\classes >
#include < irresistible\cnr\cities > #include < irresistible\cnr\cities >
#include < irresistible\cnr\dialog_ids > #include < irresistible\cnr\dialog_ids >
#include < irresistible\cnr\vip > #include < irresistible\cnr\vip >
@ -35,6 +36,7 @@
#include < irresistible\features\furniture > #include < irresistible\features\furniture >
#include < irresistible\features\weapon_drop > #include < irresistible\features\weapon_drop >
#include < irresistible\features\ammunation > #include < irresistible\features\ammunation >
#include < irresistible\features\duel >
// #include < irresistible\features\pilot > // #include < irresistible\features\pilot >
// #include < irresistible\features\fishing > // #include < irresistible\features\fishing >
// #include < irresistible\features\vote > // #include < irresistible\features\vote >

View File

@ -1,17 +1,8 @@
(+) Private ammunation added for gang facilities. Higher the respect, cheaper the weapons/gear. (+) Adds a 1v1 duel arena behind paintball, where you can wage money against eachother. Thanks Stev.
(+) You can now access the inside of a gang facility so long as you're in the gang / own the facility's turf. (+) Adds /discordurl for level 5 admins to update the sfcnr.com/discord redirect.
(+) New Alcatraz Map thanks to Gal. You can now mine ores at the Alcatraz prison also. (+) You now get a Shotgun with 25 ammo when you enter a police car.
(+) You can now edit your toy color through toys. (+) You can now join public gangs through /gangs.
(+) Public gangs can now be joined by anyone simply by accessing their facility's checkpoint. (/) Wanted levels over 30 will place you in Alcatraz Prison.
(+) There are now pages to the list of gang members shown. (/) Price of supa save items have been generally increased.
(*) Fixes issue with many toys not being able to be selected. (/) Speed of robberies has been increased.
(-) /breakcuff command removed. Breaking cuffs are now automatically done, as soon as you are cuffed. (/) Bail is doubled if you are in Alcatraz.
(-) /detain command removed. The feature was rather abused than used.
(-) /cuttie command removed. Cutting ties are now automatically done, as soon as you are tied.
(/) /taze, /cuff, /ar no longer require id parameters. Can use MMB as a bind.
(/) Breaking cuffs will keep repeating until it successfully breaks cuffs.
(/) If you break your cuffs you will have 6 seconds of immunity to taze/cuff/arrest.
(/) Players are now tazed half a second shorter.
(/) /hitlist now can be accessed by all classes.
(/) Break cuff has an 80% success rate.
(/) Safe loot increased by 20%.