commit
df82156372
@ -571,9 +571,6 @@ hook OnPlayerDeath( playerid, killerid, reason )
|
||||
new
|
||||
server_time = gettime( );
|
||||
|
||||
// Reset spawned variable
|
||||
AC_SetPlayerSpawned( playerid, false );
|
||||
|
||||
// Anti-fakekill
|
||||
switch( server_time - p_LastDeath[ playerid ] )
|
||||
{
|
||||
@ -591,7 +588,7 @@ hook OnPlayerDeath( playerid, killerid, reason )
|
||||
p_LastDeath[ playerid ] = server_time;
|
||||
|
||||
// Died in Vehicle
|
||||
if ( GetPlayerVehicleID( playerid ) && AC_IsPlayerSpawned( playerid ) )
|
||||
if ( AC_IsPlayerSpawned( playerid ) )
|
||||
{
|
||||
if( ( GetTickCount( ) - p_LastTookDamage[ playerid ] ) > 2500 ) {
|
||||
p_LastDamageIssuer[ playerid ] = INVALID_PLAYER_ID, p_LastWeaponIssuer[ playerid ] = 51;
|
||||
@ -599,6 +596,9 @@ hook OnPlayerDeath( playerid, killerid, reason )
|
||||
|
||||
CallRemoteFunction( "OnPlayerDeathEx", "ddfd", playerid, p_LastDamageIssuer[ playerid ], p_LastWeaponIssuer[ playerid ], 3.3, 3 );
|
||||
}
|
||||
|
||||
// Reset spawned variable
|
||||
AC_SetPlayerSpawned( playerid, false );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -12,8 +12,8 @@
|
||||
#define ADMIN_COMMAND_REJECT "You don't have an appropriate administration level to use this command."
|
||||
#define ADMIN_COMMAND_TIME 4
|
||||
|
||||
#define DIALOG_ADMIN_CMDS 1167
|
||||
#define DIALOG_ADMIN_CMDS_BACK 1168
|
||||
// #define DIALOG_ADMIN_CMDS 1167
|
||||
// #define DIALOG_ADMIN_CMDS_BACK 1168
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_COMMAND_DATA
|
||||
|
@ -176,7 +176,41 @@
|
||||
#define DIALOG_CROWDFUND_OPTIONS 1166
|
||||
#define DIALOG_CROWDFUND_INFO 1167
|
||||
#define DIALOG_CROWDFUND_DONATE 1168
|
||||
|
||||
#define DIALOG_ADMIN_CMDS 1169
|
||||
#define DIALOG_ADMIN_CMDS_BACK 1170
|
||||
#define DIALOG_VIEW_LEVEL 1171
|
||||
#define DIALOG_CASH_CARD 1172
|
||||
#define DIALOG_DUEL 1173
|
||||
#define DIALOG_DUEL_PLAYER 1174
|
||||
#define DIALOG_DUEL_LOCATION 1175
|
||||
#define DIALOG_DUEL_WEAPON 1176
|
||||
#define DIALOG_DUEL_WAGER 1177
|
||||
#define DIALOG_DUEL_WEAPON_TWO 1178
|
||||
#define DIALOG_DUEL_HEALTH 1179
|
||||
#define DIALOG_DUEL_ARMOUR 1180
|
||||
#define DIALOG_POOL_WAGER 1181
|
||||
#define DIALOG_GANG_JOIN 1182
|
||||
#define DIALOG_FACILITY_AMMU 1183
|
||||
#define DIALOG_FACILITY_AMMU_BUY 1184
|
||||
#define DIALOG_HOUSE_LISTINGS 1185
|
||||
#define DIALOG_HOUSE_LIST_VIEW 1186
|
||||
#define DIALOG_VISAGE_APTS 1187
|
||||
#define DIALOG_VISAGE_APT_PW 1188
|
||||
#define DIALOG_VISAGE_APT_CONFIG 1189
|
||||
#define DIALOG_VISAGE_APT_TRANSFER 1190
|
||||
#define DIALOG_VISAGE_APT_TITLE 1191
|
||||
#define DIALOG_VISAGE_APT_PASSCODE 1192
|
||||
#define DIALOG_VISAGE_SPAWN 1193
|
||||
#define DIALOG_FIREWORKS 1194
|
||||
#define DIALOG_FIREWORKS_COLOR 1195
|
||||
#define DIALOG_BUY_IN 1196
|
||||
#define DIALOG_INPUT_RAISE 1197
|
||||
#define DIALOG_IC_SELLORDERS 1198
|
||||
#define DIALOG_IC_BUY 1199
|
||||
#define DIALOG_COMPONENTS_SELL 1200
|
||||
#define DIALOG_HOUSE_SELL 1201
|
||||
#define DIALOG_BUSINESS_SELL_CONFIRM 1202
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
{
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define DIALOG_VIEW_LEVEL 5943
|
||||
//#define DIALOG_VIEW_LEVEL 5943
|
||||
|
||||
/* ** Macros ** */
|
||||
#define IsDoubleXP() ( GetGVarInt( "doublexp" ) )
|
||||
|
@ -370,17 +370,9 @@ CMD:business( playerid, params[ ] )
|
||||
new
|
||||
iCashMoney = floatround( g_businessData[ iBusiness ] [ E_COST ] / 2 );
|
||||
|
||||
p_OwnedBusinesses[ playerid ] --;
|
||||
g_businessData[ iBusiness ] [ E_OWNER_ID ] = 0;
|
||||
SetPVarInt( playerid, "biz_sell_id", iBusiness );
|
||||
|
||||
ResetBusiness( iBusiness, .hard_reset = true );
|
||||
StopBusinessExportMission( iBusiness );
|
||||
UpdateBusinessData( iBusiness );
|
||||
UpdateBusinessTitle( iBusiness ); // No point querying (add on resale)
|
||||
GivePlayerCash( playerid, iCashMoney );
|
||||
|
||||
SetPlayerPosEx( playerid, g_businessData[ iBusiness ] [ E_X ], g_businessData[ iBusiness ] [ E_Y ], g_businessData[ iBusiness ] [ E_Z ], 0 ), SetPlayerVirtualWorld( playerid, 0 );
|
||||
SendServerMessage( playerid, "You have successfully sold your business for "COL_GOLD"%s"COL_WHITE".", cash_format( iCashMoney ) );
|
||||
ShowPlayerDialog( playerid, DIALOG_BUSINESS_SELL_CONFIRM, DIALOG_STYLE_MSGBOX, ""COL_WHITE"Sell Business", sprintf( ""COL_WHITE"Are you sure you want to sell this business for "COL_GOLD"%s"COL_WHITE"?", cash_format( iCashMoney ) ), "Sell", "Cancel" );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@ -592,7 +584,28 @@ function Timer_DestroyObject( objectid )
|
||||
|
||||
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
{
|
||||
if ( dialogid == DIALOG_BUSINESSES )
|
||||
if ( dialogid == DIALOG_BUSINESS_SELL_CONFIRM && response )
|
||||
{
|
||||
new
|
||||
iBusiness = GetPVarInt( playerid, "biz_sell_id" ),
|
||||
iCashMoney = floatround( g_businessData[ iBusiness ] [ E_COST ] / 2 );
|
||||
|
||||
p_OwnedBusinesses[ playerid ] --;
|
||||
g_businessData[ iBusiness ] [ E_OWNER_ID ] = 0;
|
||||
|
||||
ResetBusiness( iBusiness, .hard_reset = true );
|
||||
StopBusinessExportMission( iBusiness );
|
||||
UpdateBusinessData( iBusiness );
|
||||
UpdateBusinessTitle( iBusiness ); // No point querying (add on resale)
|
||||
GivePlayerCash( playerid, iCashMoney );
|
||||
|
||||
SetPlayerPosEx( playerid, g_businessData[ iBusiness ] [ E_X ], g_businessData[ iBusiness ] [ E_Y ], g_businessData[ iBusiness ] [ E_Z ], 0 ), SetPlayerVirtualWorld( playerid, 0 );
|
||||
SendServerMessage( playerid, "You have successfully sold your business for "COL_GOLD"%s"COL_WHITE".", cash_format( iCashMoney ) );
|
||||
|
||||
DeletePVar( playerid, "biz_sell_id" );
|
||||
return 1;
|
||||
}
|
||||
else if ( dialogid == DIALOG_BUSINESSES )
|
||||
{
|
||||
if ( ! response )
|
||||
return ShowPlayerSpawnMenu( playerid );
|
||||
|
@ -8,7 +8,7 @@
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
#define DIALOG_CASH_CARD 28373
|
||||
// #define DIALOG_CASH_CARD 28373
|
||||
|
||||
/* ** Commands ** */
|
||||
CMD:redeemcashcard( playerid, params[ ] ) return cmd_cashcard( playerid, params );
|
||||
|
@ -11,14 +11,14 @@
|
||||
/* ** 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
|
||||
// #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 E_DUEL_DATA
|
||||
|
@ -19,9 +19,9 @@
|
||||
#define FACILITY_AMMU_RESPECT ( 75000.0 )
|
||||
#define FACILITY_BLOWUP_TIME ( 10 )
|
||||
|
||||
#define DIALOG_GANG_JOIN ( 9238 )
|
||||
#define DIALOG_FACILITY_AMMU ( 9239 )
|
||||
#define DIALOG_FACILITY_AMMU_BUY ( 9299 )
|
||||
// #define DIALOG_GANG_JOIN ( 9238 )
|
||||
// #define DIALOG_FACILITY_AMMU ( 9239 )
|
||||
// #define DIALOG_FACILITY_AMMU_BUY ( 9299 )
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_GANG_FACILITIES
|
||||
|
@ -103,7 +103,24 @@ hook OnScriptInit( )
|
||||
|
||||
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
{
|
||||
if ( dialogid == DIALOG_HOUSE_CONFIG && response )
|
||||
if ( dialogid == DIALOG_HOUSE_SELL && response )
|
||||
{
|
||||
new
|
||||
ID = GetPVarInt( playerid, "house_sell_id" );
|
||||
|
||||
format( szBigString, sizeof( szBigString ), "[SELL] [%s] %s | %s | %d\r\n", getCurrentDate( ), ReturnPlayerName( playerid ), g_houseData[ ID ][ E_OWNER ], ID );
|
||||
AddFileLogLine( "log_houses.txt", szBigString );
|
||||
p_OwnedHouses[ playerid ] --;
|
||||
SetHouseForAuction( ID );
|
||||
GivePlayerCash( playerid, ( g_houseData[ ID ] [ E_COST ] / 2 ) );
|
||||
SetPlayerPos( playerid, g_houseData[ ID ] [ E_EX ], g_houseData[ ID ] [ E_EY ], g_houseData[ ID ] [ E_EZ ] );
|
||||
SetPlayerInterior( playerid, 0 ), SetPlayerVirtualWorld( playerid, 0 );
|
||||
SendServerMessage( playerid, "You have successfully sold your house for "COL_GOLD"%s", cash_format( ( g_houseData[ ID ] [ E_COST ] / 2 ) ) );
|
||||
|
||||
DeletePVar( playerid, "house_sell_id" );
|
||||
return 1;
|
||||
}
|
||||
else if ( dialogid == DIALOG_HOUSE_CONFIG && response )
|
||||
{
|
||||
if ( p_InHouse[ playerid ] == -1 ) return SendError( playerid, "You're not inside any house." );
|
||||
if ( !strmatch( g_houseData[ p_InHouse[ playerid ] ] [ E_OWNER ], ReturnPlayerName( playerid ) ) ) return SendError( playerid, "You are not the owner of this house." );
|
||||
@ -461,14 +478,8 @@ CMD:h( playerid, params[ ] )
|
||||
else if ( !strmatch( g_houseData[ ID ] [ E_OWNER ], ReturnPlayerName( playerid ) ) ) return SendError( playerid, "You are not the owner of this house." );
|
||||
else
|
||||
{
|
||||
format( szBigString, sizeof( szBigString ), "[SELL] [%s] %s | %s | %d\r\n", getCurrentDate( ), ReturnPlayerName( playerid ), g_houseData[ ID ][ E_OWNER ], ID );
|
||||
AddFileLogLine( "log_houses.txt", szBigString );
|
||||
p_OwnedHouses[ playerid ] --;
|
||||
SetHouseForAuction( ID );
|
||||
GivePlayerCash( playerid, ( g_houseData[ ID ] [ E_COST ] / 2 ) );
|
||||
SetPlayerPos( playerid, g_houseData[ ID ] [ E_EX ], g_houseData[ ID ] [ E_EY ], g_houseData[ ID ] [ E_EZ ] );
|
||||
SetPlayerInterior( playerid, 0 ), SetPlayerVirtualWorld( playerid, 0 );
|
||||
SendServerMessage( playerid, "You have successfully sold your house for "COL_GOLD"%s", cash_format( ( g_houseData[ ID ] [ E_COST ] / 2 ) ) );
|
||||
SetPVarInt( playerid, "house_sell_id", ID );
|
||||
ShowPlayerDialog( playerid, DIALOG_HOUSE_SELL, DIALOG_STYLE_MSGBOX, ""COL_WHITE"Sell House", sprintf( ""COL_WHITE"Are you sure you want to sell this house for "COL_GOLD"%s"COL_WHITE"?", cash_format( ( g_houseData[ ID ] [ E_COST ] / 2 ) ) ), "Sell", "Cancel" );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -9,8 +9,8 @@
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define DIALOG_HOUSE_LISTINGS 5838
|
||||
#define DIALOG_HOUSE_LIST_VIEW 5839
|
||||
// #define DIALOG_HOUSE_LISTINGS 5838
|
||||
// #define DIALOG_HOUSE_LIST_VIEW 5839
|
||||
|
||||
/* ** Macros ** */
|
||||
#define ShowPlayerHomeListing(%0,%1) \
|
||||
|
@ -5,6 +5,14 @@
|
||||
* Purpose: pilot minijob - cargo pickup and transport to another airport.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
sql structure:
|
||||
|
||||
ALTER TABLE `users` ADD `PILOT` INT(11) NULL DEFAULT '0' AFTER `TRUCKED`;
|
||||
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
@ -173,6 +181,8 @@ hook OnPlayerEnterDynRaceCP( playerid, checkpointid )
|
||||
GivePlayerWantedLevel( playerid, 6 );
|
||||
}
|
||||
|
||||
ach_HandlePilotMissions( playerid );
|
||||
|
||||
GivePlayerScore( playerid, 1 + floatround( p_PilotDistance[ playerid ] / 1000.0 ) );
|
||||
GivePlayerCash( playerid, cash_earned );
|
||||
|
||||
|
@ -134,6 +134,8 @@ hook OnPlayerEnterDynRaceCP( playerid, checkpointid )
|
||||
GivePlayerScore( playerid, 1 + floatround( p_TrainDistance[ playerid ] / 1000.0 ) );
|
||||
GivePlayerCash( playerid, iCashEarned );
|
||||
|
||||
ach_HandleTrainMissions( playerid );
|
||||
|
||||
ShowPlayerHelpDialog( playerid, 5000, "You have earned ~y~%s ~w~for transporting passengers!", cash_format( iCashEarned ) );
|
||||
StopPlayerTrainWork( playerid );
|
||||
|
||||
|
@ -15,7 +15,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
{
|
||||
switch( listitem )
|
||||
{
|
||||
case 0: ShowPlayerDialog( playerid, DIALOG_PERKS_P, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Game Perks", ""COL_WHITE"Item Name\t"COL_WHITE"Total Level Req.\t"COL_WHITE"Cost ($)\nUnlimited Ammunition\t"COL_GOLD"50\t"COL_GREEN"$9,900", "Select", "Back" );
|
||||
case 0: ShowPlayerDialog( playerid, DIALOG_PERKS_P, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Game Perks", ""COL_WHITE"Item Name\t"COL_WHITE"Total Level Req.\t"COL_WHITE"Cost ($)\nUnlimited Ammunition\t"COL_GOLD"50\t"COL_GREEN"$9,900\nStealth Mode\t"COL_GOLD"75\t"COL_GREEN"$15,000", "Select", "Back" );
|
||||
case 1: ShowPlayerDialog( playerid, DIALOG_PERKS_V, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Game Perks", ""COL_WHITE"Item Name\t"COL_WHITE"Total Level Req.\t"COL_WHITE"Cost ($)\nFix & Flip vehicle\t"COL_GOLD"75\t"COL_GREEN"$9,900\nRepair Vehicle\t"COL_GOLD"75\t"COL_GREEN"$7,500\nAdd NOS\t"COL_GOLD"50\t"COL_GREEN"$3,000\nFlip vehicle\t"COL_GOLD"40\t"COL_GREEN"$2,500", "Select", "Back" );
|
||||
}
|
||||
}
|
||||
@ -52,6 +52,31 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
SetPlayerArmedWeapon( playerid, 0 );
|
||||
Beep( playerid );
|
||||
}
|
||||
|
||||
case 1:
|
||||
{
|
||||
if ( total_level < 75 ) {
|
||||
return SendError( playerid, "Your total level must be at least 75 to use this (/level)." );
|
||||
}
|
||||
|
||||
if ( GetPlayerCash( playerid ) < 11500 ) {
|
||||
return SendError( playerid, "You do not have enough money for this item ($11,500)." );
|
||||
}
|
||||
|
||||
if ( p_OffRadar{ playerid } ) {
|
||||
return SendError( playerid, "You have already purchased this item." );
|
||||
}
|
||||
|
||||
p_OffRadar{ playerid } = true;
|
||||
|
||||
GivePlayerCash( playerid, -11500 );
|
||||
|
||||
SendServerMessage( playerid, "You have brought stealth mode for $15,000." );
|
||||
ShowPlayerHelpDialog( playerid, 3000, "~g~~h~Stealth mode ~w~will be deactivate once you respawn." );
|
||||
|
||||
SetPlayerColor( playerid, setAlpha( GetPlayerColor( playerid ), 0x00 ) );
|
||||
Beep( playerid );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( dialogid == DIALOG_PERKS_V )
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define MAX_POOL_TABLES 32
|
||||
#define MAX_POOL_BALLS (16) // do not modify
|
||||
|
||||
#define DIALOG_POOL_WAGER 3284
|
||||
//#define DIALOG_POOL_WAGER 3284
|
||||
|
||||
/* ** Macros ** */
|
||||
#define SendPoolMessage(%0,%1) \
|
||||
|
@ -539,7 +539,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
EditDynamicObject( playerid, iObject );
|
||||
}
|
||||
}
|
||||
case 2: // Pimp
|
||||
case 2: // sell
|
||||
{
|
||||
new
|
||||
pimpid;
|
||||
@ -548,23 +548,61 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
if ( g_vehicleComponentsData[ pimpid ] [ E_MODEL_ID ] == g_vehiclePimpData[ ownerid ] [ vehicleid ] [ E_MODEL ] [ i ] )
|
||||
break;
|
||||
|
||||
if ( g_vehicleComponentsData[ pimpid ] [ E_MODEL_ID ] != g_vehiclePimpData[ ownerid ] [ vehicleid ] [ E_MODEL ] [ i ] )
|
||||
return SendError( playerid, "You cannot sell this component as it no longer exists." );
|
||||
|
||||
new
|
||||
sellPrice = floatround( g_vehicleComponentsData[ pimpid ] [ E_PRICE ] * 0.5 );
|
||||
|
||||
GivePlayerCash( playerid, sellPrice );
|
||||
DestroyDynamicObject( g_vehiclePimpData[ ownerid ] [ vehicleid ] [ E_OBJECT ] [ i ] );
|
||||
|
||||
g_vehiclePimpData[ ownerid ] [ vehicleid ] [ E_OBJECT ] [ i ] = -1;
|
||||
g_vehiclePimpData[ ownerid ] [ vehicleid ] [ E_CREATED ] [ i ] = false;
|
||||
|
||||
mysql_single_query( sprintf( "DELETE FROM `COMPONENTS` WHERE `ID`=%d", g_vehiclePimpData[ ownerid ] [ vehicleid ] [ E_SQL_ID ] [ i ] ) );
|
||||
SendServerMessage( playerid, "You have sold your "COL_GREY"%s"COL_WHITE" for "COL_GOLD"%s"COL_WHITE".", g_vehicleComponentsData[ pimpid ] [ E_NAME ], cash_format( sellPrice ) );
|
||||
ShowPlayerDialog( playerid, DIALOG_COMPONENTS_SELL, DIALOG_STYLE_MSGBOX, ""COL_WHITE"Sell Components", sprintf( ""COL_WHITE"Are you sure you want to sell your "COL_GREY"%s "COL_WHITE"for "COL_GOLD"%s?\n", g_vehicleComponentsData[ pimpid ] [ E_NAME ], cash_format( sellPrice ) ), "Sell", "Back" );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( dialogid == DIALOG_COMPONENTS_SELL )
|
||||
{
|
||||
new
|
||||
ownerid = INVALID_PLAYER_ID,
|
||||
i = GetPVarInt( playerid, "components_editing" ),
|
||||
vehicleid = getVehicleSlotFromID( GetPlayerVehicleID( playerid ), ownerid )
|
||||
;
|
||||
|
||||
if ( vehicleid == -1 )
|
||||
return SendError( playerid, "This vehicle isn't a buyable vehicle." );
|
||||
|
||||
if ( playerid != ownerid )
|
||||
return SendError( playerid, "This vehicle does not belong to you." );
|
||||
|
||||
if ( ! response)
|
||||
{
|
||||
for( new y = 0, x = 0; y < MAX_PIMPS; y++ ) if ( g_vehiclePimpData[ ownerid ] [ vehicleid ] [ E_CREATED ] [ y ] ) {
|
||||
if ( listitem == x++ ) {
|
||||
return ShowPlayerVehicleComponentMenu( playerid, ownerid, vehicleid, i );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
new
|
||||
pimpid;
|
||||
|
||||
for( ; pimpid < sizeof( g_vehicleComponentsData ); pimpid++ )
|
||||
if ( g_vehicleComponentsData[ pimpid ] [ E_MODEL_ID ] == g_vehiclePimpData[ ownerid ] [ vehicleid ] [ E_MODEL ] [ i ] )
|
||||
break;
|
||||
|
||||
if ( g_vehicleComponentsData[ pimpid ] [ E_MODEL_ID ] != g_vehiclePimpData[ ownerid ] [ vehicleid ] [ E_MODEL ] [ i ] )
|
||||
return SendError( playerid, "You cannot sell this component as it no longer exists." );
|
||||
|
||||
new
|
||||
sellPrice = floatround( g_vehicleComponentsData[ pimpid ] [ E_PRICE ] * 0.5 );
|
||||
|
||||
GivePlayerCash( playerid, sellPrice );
|
||||
DestroyDynamicObject( g_vehiclePimpData[ ownerid ] [ vehicleid ] [ E_OBJECT ] [ i ] );
|
||||
|
||||
g_vehiclePimpData[ ownerid ] [ vehicleid ] [ E_OBJECT ] [ i ] = -1;
|
||||
g_vehiclePimpData[ ownerid ] [ vehicleid ] [ E_CREATED ] [ i ] = false;
|
||||
|
||||
mysql_single_query( sprintf( "DELETE FROM `COMPONENTS` WHERE `ID`=%d", g_vehiclePimpData[ ownerid ] [ vehicleid ] [ E_SQL_ID ] [ i ] ) );
|
||||
SendServerMessage( playerid, "You have sold your "COL_GREY"%s"COL_WHITE" for "COL_GOLD"%s"COL_WHITE".", g_vehicleComponentsData[ pimpid ] [ E_NAME ], cash_format( sellPrice ) );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -13,13 +13,13 @@
|
||||
#define MAX_PASSCODE 5
|
||||
|
||||
// dialogs
|
||||
#define DIALOG_VISAGE_APTS 17317
|
||||
#define DIALOG_VISAGE_APT_PW 17318
|
||||
#define DIALOG_VISAGE_APT_CONFIG 17319
|
||||
#define DIALOG_VISAGE_APT_TRANSFER 17320
|
||||
#define DIALOG_VISAGE_APT_TITLE 17321
|
||||
#define DIALOG_VISAGE_APT_PASSCODE 17322
|
||||
#define DIALOG_VISAGE_SPAWN 17333
|
||||
// #define DIALOG_VISAGE_APTS 17317
|
||||
// #define DIALOG_VISAGE_APT_PW 17318
|
||||
// #define DIALOG_VISAGE_APT_CONFIG 17319
|
||||
// #define DIALOG_VISAGE_APT_TRANSFER 17320
|
||||
// #define DIALOG_VISAGE_APT_TITLE 17321
|
||||
// #define DIALOG_VISAGE_APT_PASSCODE 17322
|
||||
// #define DIALOG_VISAGE_SPAWN 17333
|
||||
|
||||
/* ** Constants ** */
|
||||
static const Float: VISAGE_APARTMENT_ENTRANCE[ 3 ] = { 2670.9922, 1637.9547, 1508.3590 };
|
||||
|
@ -9,8 +9,8 @@
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define DIALOG_FIREWORKS 29383
|
||||
#define DIALOG_FIREWORKS_COLOR 29385
|
||||
// #define DIALOG_FIREWORKS 29383
|
||||
// #define DIALOG_FIREWORKS_COLOR 29385
|
||||
|
||||
// The maximum amount of firework instances that players can place, per server. (Default: 20)
|
||||
#define MAX_FIREWORK 20
|
||||
|
@ -110,8 +110,8 @@ stock ShowPlayerDialogEx(playerid, dialogid, style, caption[], button1[], button
|
||||
#define CALL 2
|
||||
#define RAISE 3
|
||||
#define FOLD 4
|
||||
#define DIALOG_BUY_IN 19232
|
||||
#define DIALOG_INPUT_RAISE 9231
|
||||
// #define DIALOG_BUY_IN 19232
|
||||
// #define DIALOG_INPUT_RAISE 9231
|
||||
|
||||
|
||||
#define SendPokerMessage(%0,%1) \
|
||||
|
@ -205,10 +205,13 @@ new
|
||||
p_LastPlayerState [ MAX_PLAYERS char ],
|
||||
p_RespondDelay [ MAX_PLAYERS ],
|
||||
p_VisibleOnRadar [ MAX_PLAYERS ],
|
||||
p_OffRadarVisible [ MAX_PLAYERS ],
|
||||
p_InGarage [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_WorkCooldown [ MAX_PLAYERS ],
|
||||
p_AntiSpammyTS [ MAX_PLAYERS ],
|
||||
p_TruckedCargo [ MAX_PLAYERS ],
|
||||
p_PilotMissions [ MAX_PLAYERS ],
|
||||
p_TrainMissions [ MAX_PLAYERS ],
|
||||
p_KidnapImmunity [ MAX_PLAYERS ],
|
||||
p_GangSplitProfits [ MAX_PLAYERS ],
|
||||
Float: p_IrresistiblePoints [ MAX_PLAYERS ],
|
||||
@ -237,7 +240,8 @@ new
|
||||
p_AimedAtPolice [ MAX_PLAYERS ],
|
||||
bool: p_PassiveModeDisabled [ MAX_PLAYERS char ],
|
||||
p_PassiveModeExpireTimer [ MAX_PLAYERS ] = { -1, ... },
|
||||
Text3D: p_PassiveModeLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID }
|
||||
Text3D: p_PassiveModeLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID },
|
||||
bool: p_OffRadar [ MAX_PLAYERS char ]
|
||||
;
|
||||
|
||||
/* ** Getters And Setters** */
|
||||
|
@ -15,7 +15,7 @@ enum E_ACTOR_DATA
|
||||
new
|
||||
g_actorData[ ] [ E_ACTOR_DATA ] =
|
||||
{
|
||||
// Class selection
|
||||
// Class selection
|
||||
{ 201, 236.283996, 86.777999, 1005.039978, 90.000000, "camera", "picstnd_take", 0 },
|
||||
|
||||
// SF Bank
|
||||
@ -68,7 +68,21 @@ new
|
||||
{ 221, -2656.4712, 1413.2327, 906.2734, 232.1765, "PAULNMAC", "wank_loop", 18 },
|
||||
|
||||
// Hobo
|
||||
{ 137, -1519.9003, 678.79800, 7.459900, 14.7968, "BEACH", "ParkSit_M_loop", 0 }
|
||||
{ 137, -1519.9003, 678.79800, 7.459900, 14.7968, "BEACH", "ParkSit_M_loop", 0 },
|
||||
|
||||
// LV Brothel
|
||||
{ 178, 962.3973, -57.3805, 1001.7495, 126.8999, "STRIP", "strip_F", 42 },
|
||||
{ 221, 959.2863, -57.9077, 1001.1246, 281.0614, "PAULNMAC", "wank_loop", 42 },
|
||||
{ 249, 964.3915, -50.4273, 1001.1172, 92.1085, "SHOP", "Smoke_RYD", 42 },
|
||||
{ 213, 947.4916, -49.7769, 1001.1172, 185.6768, "BLOWJOBZ", "BJ_STAND_LOOP_P", 42 },
|
||||
{ 152, 947.5248, -50.1076, 1001.1172, 2.5833, "BLOWJOBZ", "BJ_STAND_LOOP_W", 42 },
|
||||
{ 242, 944.5837, -43.5228, 1001.1166, 174.0231, "BLOWJOBZ", "BJ_COUCH_LOOP_P", 42 },
|
||||
{ 63, 944.5231, -43.9482, 1001.1166, 356.5298, "BLOWJOBZ", "BJ_COUCH_LOOP_W", 42 },
|
||||
{ 87, 960.9799, -61.2946, 1001.5502, 0.3499, "CRACK", "crckidle2", 42 },
|
||||
{ 244, 942.2812, -49.9304, 1001.1172, 178.9681, "CRACK", "crckidle3", 42 },
|
||||
{ 259, 961.2700, -59.7196, 1001.1172, 333.1782, "STRIP", "PLY_CASH", 42 },
|
||||
{ 64, 956.9485, -46.0040, 1001.6714, 266.4611, "STRIP", "STR_B2C", 42 },
|
||||
{ 246, 967.1183, -47.9314, 1001.9516, 94.4628, "STRIP", "STR_A2B", 42 }
|
||||
}
|
||||
;
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define DIALOG_IC_SELLORDERS ( 5921 )
|
||||
#define DIALOG_IC_BUY ( 5922 )
|
||||
// #define DIALOG_IC_SELLORDERS ( 5921 )
|
||||
// #define DIALOG_IC_BUY ( 5922 )
|
||||
|
||||
/* ** Variables ** */
|
||||
static const
|
||||
|
@ -2131,6 +2131,11 @@ public ZoneTimer( )
|
||||
// CIA Visible On Radar after firing a shot
|
||||
if ( p_VisibleOnRadar[ playerid ] != 0 && p_VisibleOnRadar[ playerid ] < g_iTime )
|
||||
SetPlayerColorToTeam( playerid ), p_VisibleOnRadar[ playerid ] = 0;
|
||||
|
||||
// Stealth mode after getting shot
|
||||
if ( p_OffRadarVisible[ playerid ] != 0 && p_OffRadarVisible[ playerid ] < g_iTime )
|
||||
SetPlayerColor( playerid, setAlpha( GetPlayerColor( playerid ), 0x00 ) ), p_OffRadarVisible[ playerid ] = 0;
|
||||
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@ -2725,6 +2730,8 @@ public OnPlayerDisconnect( playerid, reason )
|
||||
p_IrresistiblePoints[ playerid ] = 0.0;
|
||||
p_AntiExportCarSpam[ playerid ] = 0;
|
||||
p_TruckedCargo[ playerid ] = 0;
|
||||
p_PilotMissions[ playerid ] = 0;
|
||||
p_TrainMissions[ playerid ] = 0;
|
||||
p_HydrogenChloride{ playerid } = 0;
|
||||
p_Methamphetamine{ playerid } = 0;
|
||||
p_IsCasinoHighRoller{ playerid } = false;
|
||||
@ -2845,6 +2852,8 @@ public OnPlayerSpawn( playerid )
|
||||
StopSound( playerid );
|
||||
CancelEdit( playerid );
|
||||
|
||||
p_OffRadar{ playerid } = false;
|
||||
|
||||
// Approved spawn?
|
||||
if ( !approveClassSpawned( playerid ) ) {
|
||||
SendClientMessageToAdmins( -1, ""COL_PINK"[ABNORMAL SPAWN]"COL_GREY" %s(%d) - %d skin - %d ping - %s IP", ReturnPlayerName( playerid ), playerid, GetPlayerSkin( playerid ), GetPlayerPing( playerid ), ReturnPlayerIP( playerid ) );
|
||||
@ -3080,6 +3089,10 @@ public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:f
|
||||
if ( p_Class[ playerid ] == CLASS_POLICE && p_Class[ hitid ] != CLASS_POLICE && !p_WantedLevel[ hitid ] && GetPlayerState( hitid ) != PLAYER_STATE_WASTED && ! IsPlayerInEvent( playerid ) )
|
||||
return ShowPlayerHelpDialog( playerid, 2000, "You cannot hurt innocent civilians, you're a ~b~cop~w~~h~!" ), 0;
|
||||
|
||||
// Exposing stealth mode player
|
||||
if ( p_OffRadar{ playerid } )
|
||||
SetPlayerColor( playerid, setAlpha( GetPlayerColor( playerid ), 0xFF ) ), p_OffRadarVisible[ playerid ] = g_iTime + 2;
|
||||
|
||||
// CIA Exposure when weapon is shot
|
||||
if ( p_Class[ playerid ] == CLASS_POLICE && p_inFBI{ playerid } && p_inCIA{ playerid } && !p_inArmy{ playerid } )
|
||||
SetPlayerColor( playerid, setAlpha( COLOR_CIA, 0xFF ) ), p_VisibleOnRadar[ playerid ] = g_iTime + 2;
|
||||
@ -5282,7 +5295,7 @@ CMD:irresistiblecoins( playerid, params[ ] )
|
||||
CMD:top( playerid, params[ ] ) return cmd_highscores( playerid, params );
|
||||
CMD:highscores( playerid, params[ ] )
|
||||
{
|
||||
ShowPlayerDialog( playerid, DIALOG_HIGHSCORES, DIALOG_STYLE_LIST, "{FFFFFF}Highscores", "Seasonal Rank\nTotal Score\nTotal Kills\nTotal Arrests\nTotal Robberies\nHits Completed\nFires Extinguished\nBurglaries\nBlown Jails\nBlown Vaults", "Select", "Close" );
|
||||
ShowPlayerDialog( playerid, DIALOG_HIGHSCORES, DIALOG_STYLE_LIST, "{FFFFFF}Highscores", "Seasonal Rank\nTotal Score\nTotal Kills\nTotal Arrests\nTotal Robberies\nHits Completed\nFires Extinguished\nBurglaries\nBlown Jails\nBlown Vaults\nVehicles Jacked\nMeth Yielded\nTotal Trucked Cargo\nTotal Pilot Missions\nTotal Train Missions", "Select", "Close" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -11363,7 +11376,7 @@ public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
||||
// taze mechanism
|
||||
else if ( PRESSED( KEY_LOOK_BEHIND ) )
|
||||
{
|
||||
if ( p_Class[ playerid ] == CLASS_POLICE && p_AntiSpawnKillEnabled{ playerid })
|
||||
if ( p_Class[ playerid ] == CLASS_POLICE && !p_AntiSpawnKillEnabled{ playerid } )
|
||||
{
|
||||
new
|
||||
closestid = GetClosestPlayer( playerid );
|
||||
@ -11644,6 +11657,8 @@ thread OnAttemptPlayerLogin( playerid, password[ ] )
|
||||
p_PingImmunity{ playerid } = cache_get_field_content_int( 0, "PING_IMMUNE", dbHandle );
|
||||
p_HitsComplete[ playerid ] = cache_get_field_content_int( 0, "CONTRACTS", dbHandle );
|
||||
p_TruckedCargo[ playerid ] = cache_get_field_content_int( 0, "TRUCKED", dbHandle );
|
||||
p_PilotMissions[ playerid ] = cache_get_field_content_int( 0, "PILOT", dbHandle );
|
||||
p_TrainMissions[ playerid ] = cache_get_field_content_int( 0, "TRAIN", dbHandle );
|
||||
//p_CopTutorial{ playerid } = cache_get_field_content_int( 0, "COP_TUTORIAL", dbHandle );
|
||||
p_Job{ playerid } = cache_get_field_content_int( 0, "JOB", dbHandle );
|
||||
p_VIPJob{ playerid } = cache_get_field_content_int( 0, "VIP_JOB", dbHandle );
|
||||
@ -13033,12 +13048,14 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
""COL_GREY"Total Burglaries:{FFFFFF} %d\n",
|
||||
szLargeString, p_OwnedHouses[ pID ], GetPlayerHouseSlots( pID ), p_OwnedVehicles[ pID ], GetPlayerVehicleSlots( pID ), p_Arrests[ pID ], p_Robberies[ pID ], p_Fires[ pID ], p_HitsComplete[ pID ], p_Burglaries[ pID ] );
|
||||
|
||||
format( szLargeString, 720, "%s"COL_GREY"Total Jail Raids:{FFFFFF} %d\n"\
|
||||
format( szLargeString, 750, "%s"COL_GREY"Total Jail Raids:{FFFFFF} %d\n"\
|
||||
""COL_GREY"Total Bank Raids:{FFFFFF} %d\n"\
|
||||
""COL_GREY"Total Cars Jacked:{FFFFFF} %d\n"\
|
||||
""COL_GREY"Total Trucked Cargo:{FFFFFF} %d\n"\
|
||||
""COL_GREY"Total Meth Yielded:{FFFFFF} %d",
|
||||
szLargeString, p_JailsBlown[ pID ], p_BankBlown[ pID ], p_CarsJacked[ pID ], p_TruckedCargo[ pID ], p_MethYielded[ pID ] );
|
||||
""COL_GREY"Total Meth Yielded:{FFFFFF} %d\n"\
|
||||
""COL_GREY"Total Pilot Missions:{FFFFFF} %d\n"\
|
||||
""COL_GREY"Total Train Missions:{FFFFFF} %d",
|
||||
szLargeString, p_JailsBlown[ pID ], p_BankBlown[ pID ], p_CarsJacked[ pID ], p_TruckedCargo[ pID ], p_MethYielded[ pID ], p_PilotMissions[ pID ], p_TrainMissions[ playerid ] );
|
||||
|
||||
ShowPlayerDialog( playerid, DIALOG_STATS_REDIRECT, DIALOG_STYLE_MSGBOX, "{FFFFFF}Main Statistics", szLargeString, "Okay", "Back" );
|
||||
}
|
||||
@ -14315,10 +14332,24 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
// blown vaults
|
||||
case 9: mysql_function_query( dbHandle, "SELECT `NAME`, `BLEW_VAULT` as `SCORE_VAL` FROM `USERS` ORDER BY `BLEW_VAULT` DESC LIMIT 25", true, "OnHighScoreCheck", "ii", playerid, 9 );
|
||||
|
||||
// vehicles jacked
|
||||
case 10: mysql_function_query( dbHandle, "SELECT `NAME`, `VEHICLES_JACKED` as `SCORE_VAL` FROM `USERS` ORDER BY `VEHICLES_JACKED` DESC LIMIT 25", true, "OnHighScoreCheck", "ii", playerid, 10 );
|
||||
|
||||
// meth yielded
|
||||
case 11: mysql_function_query( dbHandle, "SELECT `NAME`, `METH_YIELDED` as `SCORE_VAL` FROM `USERS` ORDER BY `METH_YIELDED` DESC LIMIT 25", true, "OnHighScoreCheck", "ii", playerid, 11 );
|
||||
|
||||
// total trucked cargo
|
||||
case 12: mysql_function_query( dbHandle, "SELECT `NAME`, `TRUCKED` as `SCORE_VAL` FROM `USERS` ORDER BY `TRUCKED` DESC LIMIT 25", true, "OnHighScoreCheck", "ii", playerid, 12 );
|
||||
|
||||
// pilot missons
|
||||
case 13: mysql_function_query( dbHandle, "SELECT `NAME`, `PILOT` as `SCORE_VAL` FROM `USERS` ORDER BY `PILOT` DESC LIMIT 25", true, "OnHighScoreCheck", "ii", playerid, 13 );
|
||||
|
||||
// train missions
|
||||
case 14: mysql_function_query( dbHandle, "SELECT `NAME`, `TRAIN` as `SCORE_VAL` FROM `USERS` ORDER BY `TRAIN` DESC LIMIT 25", true, "OnHighScoreCheck", "ii", playerid, 14 );
|
||||
}
|
||||
}
|
||||
if ( dialogid == DIALOG_HIGHSCORES_BACK && ! response ) {
|
||||
return ShowPlayerDialog( playerid, DIALOG_HIGHSCORES, DIALOG_STYLE_LIST, "{FFFFFF}Highscores", "Seasonal Rank\nTotal Score\nTotal Kills\nTotal Arrests\nTotal Robberies\nHits Completed\nFires Extinguished\nBurglaries\nBlown Jails\nBlown Vaults", "Select", "Close" );
|
||||
return ShowPlayerDialog( playerid, DIALOG_HIGHSCORES, DIALOG_STYLE_LIST, "{FFFFFF}Highscores", "Seasonal Rank\nTotal Score\nTotal Kills\nTotal Arrests\nTotal Robberies\nHits Completed\nFires Extinguished\nBurglaries\nBlown Jails\nBlown Vaults\nVehicles Jacked\nMeth Yielded\nTotal Trucked Cargo\nTotal Pilot Missions\nTotal Train Missions", "Select", "Close" );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@ -14339,16 +14370,21 @@ thread OnHighScoreCheck( playerid, highscore_item )
|
||||
|
||||
switch ( highscore_item )
|
||||
{
|
||||
case 0: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Seasonal Rank\n", szSmallString = "Top 25 Seasonal";
|
||||
case 1: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Score\n", szSmallString = "Top 25 Score";
|
||||
case 2: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Kills\n", szSmallString = "Top 25 Kills";
|
||||
case 3: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Arrests\n", szSmallString = "Top 25 Arrests";
|
||||
case 4: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Robberies\n", szSmallString = "Top 25 Robberies";
|
||||
case 5: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Contracts\n", szSmallString = "Top 25 Hits Completed";
|
||||
case 6: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Fires\n", szSmallString = "Top 25 Fires Extinguished";
|
||||
case 7: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Burglaries\n", szSmallString = "Top 25 Burglaries";
|
||||
case 8: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Jailes\n", szSmallString = "Top 25 Blown Jails";
|
||||
case 9: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Vaults\n", szSmallString = "Top 25 Blown Vaults";
|
||||
case 0: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Seasonal Rank\n", szSmallString = "Top 25 Seasonal";
|
||||
case 1: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Score\n", szSmallString = "Top 25 Score";
|
||||
case 2: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Kills\n", szSmallString = "Top 25 Kills";
|
||||
case 3: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Arrests\n", szSmallString = "Top 25 Arrests";
|
||||
case 4: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Robberies\n", szSmallString = "Top 25 Robberies";
|
||||
case 5: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Contracts\n", szSmallString = "Top 25 Hits Completed";
|
||||
case 6: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Fires\n", szSmallString = "Top 25 Fires Extinguished";
|
||||
case 7: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Burglaries\n", szSmallString = "Top 25 Burglaries";
|
||||
case 8: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Jailes\n", szSmallString = "Top 25 Blown Jails";
|
||||
case 9: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Vaults\n", szSmallString = "Top 25 Blown Vaults";
|
||||
case 10: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Vehicles\n", szSmallString = "Top 25 Vehicles Jacked";
|
||||
case 11: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Meth\n", szSmallString = "Top 25 Meth Yielded";
|
||||
case 12: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Trucked\n", szSmallString = "Top 25 Total Trucked Cargo";
|
||||
case 13: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Missions\n", szSmallString = "Top 25 Total Pilot Missions";
|
||||
case 14: szLargeString = ""COL_GOLD"Player\t"COL_GOLD"Missions\n", szSmallString = "Top 25 Total Train Missions";
|
||||
}
|
||||
|
||||
for ( new row = 0; row < rows; row ++ )
|
||||
@ -14792,13 +14828,14 @@ stock SavePlayerData( playerid, bool: logout = false )
|
||||
p_ContractedAmount[ playerid ], p_WeedGrams[ playerid ], logout ? ( bQuitToAvoid ? 1 : 0 ) : 0,
|
||||
p_drillStrength[ playerid ] );
|
||||
|
||||
format( Query, sizeof( Query ), "%s`BLEW_JAILS`=%d,`BLEW_VAULT`=%d,`VEHICLES_JACKED`=%d,`METH_YIELDED`=%d,`LAST_IP`='%s',`VIP_JOB`=%d,`TRUCKED`=%d,`COINS`=%f,`EXPLOSIVE_BULLETS`=%d,`RANK`=%f,`ONLINE`=%d,`HIT_SOUND`=%d,`EXTRA_SLOTS`=%d WHERE `ID`=%d",
|
||||
format( Query, sizeof( Query ), "%s`BLEW_JAILS`=%d,`BLEW_VAULT`=%d,`VEHICLES_JACKED`=%d,`METH_YIELDED`=%d,`LAST_IP`='%s',`VIP_JOB`=%d,`TRUCKED`=%d,`COINS`=%f,`EXPLOSIVE_BULLETS`=%d,`RANK`=%f,`ONLINE`=%d,`HIT_SOUND`=%d,`EXTRA_SLOTS`=%d,`PILOT`=%d,`TRAIN`=%d WHERE `ID`=%d",
|
||||
Query,
|
||||
p_JailsBlown[ playerid ], p_BankBlown[ playerid ], p_CarsJacked[ playerid ],
|
||||
p_MethYielded[ playerid ], mysql_escape( ReturnPlayerIP( playerid ) ),
|
||||
p_VIPJob{ playerid }, p_TruckedCargo[ playerid ], p_IrresistibleCoins[ playerid ],
|
||||
p_ExplosiveBullets[ playerid ], p_IrresistiblePoints[ playerid ],
|
||||
!logout, p_HitmarkerSound{ playerid }, p_ExtraAssetSlots{ playerid },
|
||||
p_PilotMissions[ playerid ], p_TrainMissions[ playerid ],
|
||||
p_AccountID[ playerid ] );
|
||||
|
||||
mysql_single_query( Query );
|
||||
@ -15182,6 +15219,8 @@ stock GivePlayerWantedLevel( playerid, wantedlevel, bool:loadingstats = false )
|
||||
if ( p_WantedLevel[ playerid ] > 90 ) printf( "[wanted_level] %s - %d", ReturnPlayerName( playerid ), p_WantedLevel[ playerid ] );
|
||||
if ( IsPlayerAdminOnDuty( playerid ) ) SetPlayerColor( playerid, COLOR_PINK );
|
||||
|
||||
if ( p_OffRadar{ playerid } ) SetPlayerColor( playerid, setAlpha( GetPlayerColor( playerid ), 0x00 ) );
|
||||
|
||||
/*if ( p_WantedLevel[ playerid ] > 2000 ) // 8hska7082bmahu
|
||||
{
|
||||
p_WantedLevel[ playerid ] = 2000;
|
||||
@ -18109,6 +18148,34 @@ stock Achievement::HandleTruckingCouriers( playerid )
|
||||
}
|
||||
}
|
||||
|
||||
stock Achievement::HandlePilotMissions( playerid )
|
||||
{
|
||||
switch( ++p_PilotMissions[ playerid ])
|
||||
{
|
||||
case 5: ShowAchievement( playerid, "Completed ~r~5~w~~h~~h~ pilot missions!", 3 );
|
||||
case 20: ShowAchievement( playerid, "Completed ~r~20~w~~h~~h~ pilot missions!", 6 );
|
||||
case 50: ShowAchievement( playerid, "Completed ~r~50~w~~h~~h~ pilot missions!", 9 );
|
||||
case 100: ShowAchievement( playerid, "Completed ~r~100~w~~h~~h~ pilot missions!", 12 );
|
||||
case 200: ShowAchievement( playerid, "Completed ~r~200~w~~h~~h~ pilot missions!", 15 );
|
||||
case 500: ShowAchievement( playerid, "Completed ~r~500~w~~h~~h~ pilot missions!", 18 );
|
||||
case 1000: ShowAchievement( playerid, "Completed ~r~1000~w~~h~~h~ pilot missions!", 25 );
|
||||
}
|
||||
}
|
||||
|
||||
stock Achievement::HandleTrainMissions( playerid )
|
||||
{
|
||||
switch( ++p_TrainMissions[ playerid ])
|
||||
{
|
||||
case 5: ShowAchievement( playerid, "Completed ~r~5~w~~h~~h~ train missions!", 3 );
|
||||
case 20: ShowAchievement( playerid, "Completed ~r~20~w~~h~~h~ train missions!", 6 );
|
||||
case 50: ShowAchievement( playerid, "Completed ~r~50~w~~h~~h~ train missions!", 9 );
|
||||
case 100: ShowAchievement( playerid, "Completed ~r~100~w~~h~~h~ train missions!", 12 );
|
||||
case 200: ShowAchievement( playerid, "Completed ~r~200~w~~h~~h~ train missions!", 15 );
|
||||
case 500: ShowAchievement( playerid, "Completed ~r~500~w~~h~~h~ train missions!", 18 );
|
||||
case 1000: ShowAchievement( playerid, "Completed ~r~1000~w~~h~~h~ train missions!", 25 );
|
||||
}
|
||||
}
|
||||
|
||||
thread readplayernotes( playerid )
|
||||
{
|
||||
new
|
||||
@ -18338,7 +18405,7 @@ thread OnShowWeaponStats( playerid, dialogid, back_option, forid )
|
||||
stock displayAchievements( playerid, dialogid = DIALOG_NULL, szSecondButton[ ] = "", forid = INVALID_PLAYER_ID )
|
||||
{
|
||||
static
|
||||
szAchievements[ 1300 ];
|
||||
szAchievements[ 1500 ];
|
||||
|
||||
format( szAchievements, sizeof( szAchievements ),
|
||||
""COL_GREY"Played For\t\t\t%s10m\t%s1h\t%s5h\t%s10h\t%s15h\t%s20h\t%s1d\n",
|
||||
@ -18414,6 +18481,18 @@ stock displayAchievements( playerid, dialogid = DIALOG_NULL, szSecondButton[ ] =
|
||||
Ach_Unlock( p_TruckedCargo[ playerid ], 100 ), Ach_Unlock( p_TruckedCargo[ playerid ], 200 ), Ach_Unlock( p_TruckedCargo[ playerid ], 500 ),
|
||||
Ach_Unlock( p_TruckedCargo[ playerid ], 1000 )
|
||||
);
|
||||
format( szAchievements, sizeof( szAchievements ),
|
||||
"%s"COL_GREY"Total Pilot Missions\t\t%s5\t%s20\t%s50\t%s100\t%s200\t%s500\t%s1000\n", szAchievements,
|
||||
Ach_Unlock( p_PilotMissions[ playerid ], 5 ), Ach_Unlock( p_PilotMissions[ playerid ], 20 ), Ach_Unlock( p_PilotMissions[ playerid ], 50 ),
|
||||
Ach_Unlock( p_PilotMissions[ playerid ], 100 ), Ach_Unlock( p_PilotMissions[ playerid ], 200 ), Ach_Unlock( p_PilotMissions[ playerid ], 500 ),
|
||||
Ach_Unlock( p_PilotMissions[ playerid ], 1000 )
|
||||
);
|
||||
format( szAchievements, sizeof( szAchievements ),
|
||||
"%s"COL_GREY"Total Train Missions\t\t%s5\t%s20\t%s50\t%s100\t%s200\t%s500\t%s1000\n", szAchievements,
|
||||
Ach_Unlock( p_TrainMissions[ playerid ], 5 ), Ach_Unlock( p_TrainMissions[ playerid ], 20 ), Ach_Unlock( p_TrainMissions[ playerid ], 50 ),
|
||||
Ach_Unlock( p_TrainMissions[ playerid ], 100 ), Ach_Unlock( p_TrainMissions[ playerid ], 200 ), Ach_Unlock( p_TrainMissions[ playerid ], 500 ),
|
||||
Ach_Unlock( p_TrainMissions[ playerid ], 1000 )
|
||||
);
|
||||
|
||||
if ( !IsPlayerConnected( forid ) ) forid = playerid;
|
||||
ShowPlayerDialog( forid, dialogid, DIALOG_STYLE_MSGBOX, "{FFFFFF}Achievements", szAchievements, "Okay", szSecondButton );
|
||||
|
Loading…
Reference in New Issue
Block a user