convert more player textdraws (that use global td) to actual player textdraw

This commit is contained in:
Lorenc Pekaj 2018-09-16 15:34:42 +10:00
parent 655197d59a
commit 7ea55e0743
6 changed files with 156 additions and 133 deletions

View File

@ -9,7 +9,7 @@
#include < YSI\y_hooks > #include < YSI\y_hooks >
/* ** Definitions ** */ /* ** Definitions ** */
#define PILOT_BONUS ( 6000 ) #define PILOT_BONUS ( 4000 )
#define INVALID_PILOT_ROUTE ( 0xFF ) #define INVALID_PILOT_ROUTE ( 0xFF )
/* ** Variables ** */ /* ** Variables ** */
@ -142,7 +142,7 @@ hook OnPlayerEnterDynRaceCP( playerid, checkpointid )
static aPlayer[ 1 ]; aPlayer[ 0 ] = playerid; static aPlayer[ 1 ]; aPlayer[ 0 ] = playerid;
p_PilotPositionTimer[ playerid ] = SetTimerEx( "OnPilotPositionUpdate", 750, false, "dd", playerid, p_PilotRoute[ playerid ] { 1 } ); p_PilotPositionTimer[ playerid ] = SetTimerEx( "OnPilotPositionUpdate", 750, false, "dd", playerid, p_PilotRoute[ playerid ] { 1 } );
TextDrawShowForPlayer( playerid, p_TruckingTD[ playerid ] ); PlayerTextDrawShow( playerid, p_TruckingTD[ playerid ] );
KillTimer( p_PilotLoadTimer[ playerid ] ); KillTimer( p_PilotLoadTimer[ playerid ] );
p_PilotLoadTimer [ playerid ] = 0xFFFF; p_PilotLoadTimer [ playerid ] = 0xFFFF;
@ -164,14 +164,9 @@ hook OnPlayerEnterDynRaceCP( playerid, checkpointid )
else if ( p_PilotRoute[ playerid ] { 1 } != INVALID_PILOT_ROUTE ) else if ( p_PilotRoute[ playerid ] { 1 } != INVALID_PILOT_ROUTE )
{ {
new new
iCashEarned; iCashEarned = floatround( p_PilotDistance[ playerid ] * ( p_PilotDifficulty[ playerid ] == RISK_FACTOR_EASY ? 1.0 : 2.0 ) + PILOT_BONUS );
if ( p_PilotDifficulty[ playerid ] == RISK_FACTOR_EASY) PlayerTextDrawHide( playerid, p_TruckingTD[ playerid ] );
iCashEarned = floatround( p_PilotDistance[ playerid ] * 1.0 + PILOT_BONUS );
else
iCashEarned = floatround( p_PilotDistance[ playerid ] * 2.0 + PILOT_BONUS );
TextDrawHideForPlayer( playerid, p_TruckingTD[ playerid ] );
GivePlayerScore( playerid, 1 + floatround( p_PilotDistance[ playerid ] / 1000.0 ) ); GivePlayerScore( playerid, 1 + floatround( p_PilotDistance[ playerid ] / 1000.0 ) );
GivePlayerCash( playerid, iCashEarned ); GivePlayerCash( playerid, iCashEarned );
@ -229,7 +224,7 @@ stock StopPlayerPilotWork( playerid )
p_PilotCargo [ playerid ] = -1; p_PilotCargo [ playerid ] = -1;
p_PilotVehicle [ playerid ] = INVALID_VEHICLE_ID; p_PilotVehicle [ playerid ] = INVALID_VEHICLE_ID;
TextDrawHideForPlayer( playerid, p_TruckingTD[ playerid ] ); PlayerTextDrawHide( playerid, p_TruckingTD[ playerid ] );
} }
stock IsVehiclePlane ( vehicleid ) stock IsVehiclePlane ( vehicleid )
@ -242,7 +237,7 @@ stock IsVehiclePlane ( vehicleid )
function OnPilotPositionUpdate( playerid, routeid ) function OnPilotPositionUpdate( playerid, routeid )
{ {
if ( !IsPlayerInAnyVehicle( playerid ) && !p_hasPilotJob{ playerid } && ( p_PilotRoute[ playerid ] { 0 } == 0 && p_PilotRoute[ playerid ] { 1 } == 0 ) ) { if ( !IsPlayerInAnyVehicle( playerid ) && !p_hasPilotJob{ playerid } && ( p_PilotRoute[ playerid ] { 0 } == 0 && p_PilotRoute[ playerid ] { 1 } == 0 ) ) {
TextDrawHideForPlayer( playerid, p_TruckingTD[ playerid ] ); PlayerTextDrawHide( playerid, p_TruckingTD[ playerid ] );
return ( p_PilotPositionTimer[ playerid ] = 0xFFFF ); return ( p_PilotPositionTimer[ playerid ] = 0xFFFF );
} }
@ -251,11 +246,11 @@ function OnPilotPositionUpdate( playerid, routeid )
if ( routeid == p_PilotRoute[ playerid ] { 0 }) { if ( routeid == p_PilotRoute[ playerid ] { 0 }) {
fDistance = GetPlayerDistanceFromPoint( playerid, g_AirportLocations[ routeid ] [ E_X ], g_AirportLocations[ routeid ] [ E_Y ], g_AirportLocations[ routeid ] [ E_Z ] ); fDistance = GetPlayerDistanceFromPoint( playerid, g_AirportLocations[ routeid ] [ E_X ], g_AirportLocations[ routeid ] [ E_Y ], g_AirportLocations[ routeid ] [ E_Z ] );
TextDrawSetString( p_TruckingTD[ playerid ], sprintf( "~b~Location:~w~ %s~n~~b~Distance:~w~ %0.2fm", g_AirportLocations[ routeid ] [ E_NAME ], fDistance ) ); PlayerTextDrawSetString( playerid, p_TruckingTD[ playerid ], sprintf( "~b~Location:~w~ %s~n~~b~Distance:~w~ %0.2fm", g_AirportLocations[ routeid ] [ E_NAME ], fDistance ) );
} }
else if ( routeid == p_PilotRoute[ playerid ] { 1 }) { else if ( routeid == p_PilotRoute[ playerid ] { 1 }) {
fDistance = GetPlayerDistanceFromPoint( playerid, g_DropOffLocations[ routeid ] [ E_X ], g_DropOffLocations[ routeid ] [ E_Y ], g_DropOffLocations[ routeid ] [ E_Z ] ); fDistance = GetPlayerDistanceFromPoint( playerid, g_DropOffLocations[ routeid ] [ E_X ], g_DropOffLocations[ routeid ] [ E_Y ], g_DropOffLocations[ routeid ] [ E_Z ] );
TextDrawSetString( p_TruckingTD[ playerid ], sprintf( "~b~Location:~w~ %s~n~~b~Distance:~w~ %0.2fm", g_DropOffLocations[ routeid ] [ E_NAME ], fDistance ) ); PlayerTextDrawSetString( playerid, p_TruckingTD[ playerid ], sprintf( "~b~Location:~w~ %s~n~~b~Distance:~w~ %0.2fm", g_DropOffLocations[ routeid ] [ E_NAME ], fDistance ) );
} }
return ( p_PilotPositionTimer[ playerid ] = SetTimerEx( "OnPilotPositionUpdate", 750, false, "dd", playerid, routeid ) ); return ( p_PilotPositionTimer[ playerid ] = SetTimerEx( "OnPilotPositionUpdate", 750, false, "dd", playerid, routeid ) );
@ -266,7 +261,7 @@ function cancelPlayerPilotWork( playerid, vehicleid, ticks )
if ( p_PilotVehicle[ playerid ] == vehicleid && ticks ) if ( p_PilotVehicle[ playerid ] == vehicleid && ticks )
return KillTimer( p_PilotCancelTimer[ playerid ] ), p_PilotCancelTimer[ playerid ] = 0xFFFF; return KillTimer( p_PilotCancelTimer[ playerid ] ), p_PilotCancelTimer[ playerid ] = 0xFFFF;
if ( ticks < 1 || !IsPlayerConnected( playerid ) || !IsPlayerSpawned( playerid ) ) if ( ticks < 1 || !IsPlayerConnected( playerid ) || !IsPlayerSpawned( playerid ) || ! p_hasPilotJob{ playerid } )
{ {
StopPlayerPilotWork( playerid ); StopPlayerPilotWork( playerid );
return SendServerMessage( playerid, "Your pilot mission has been stopped." ); return SendServerMessage( playerid, "Your pilot mission has been stopped." );
@ -337,7 +332,7 @@ CMD:pilot( playerid, params[ ] )
p_PilotCheckPoint [ playerid ] = CreateDynamicRaceCP( 0, g_AirportLocations[ p_PilotRoute[ playerid ] { 0 } ] [ E_X ], g_AirportLocations[ p_PilotRoute[ playerid ] { 0 } ] [ E_Y ], g_AirportLocations[ p_PilotRoute[ playerid ] { 0 } ] [ E_Z ], 0.0, 0.0, 0.0, 10.0, -1, -1, playerid ); p_PilotCheckPoint [ playerid ] = CreateDynamicRaceCP( 0, g_AirportLocations[ p_PilotRoute[ playerid ] { 0 } ] [ E_X ], g_AirportLocations[ p_PilotRoute[ playerid ] { 0 } ] [ E_Y ], g_AirportLocations[ p_PilotRoute[ playerid ] { 0 } ] [ E_Z ], 0.0, 0.0, 0.0, 10.0, -1, -1, playerid );
p_PilotPositionTimer[ playerid ] = SetTimerEx( "OnPilotPositionUpdate", 750, false, "dd", playerid, p_PilotRoute[ playerid ] { 0 } ); p_PilotPositionTimer[ playerid ] = SetTimerEx( "OnPilotPositionUpdate", 750, false, "dd", playerid, p_PilotRoute[ playerid ] { 0 } );
TextDrawShowForPlayer( playerid, p_TruckingTD[ playerid ] ); PlayerTextDrawShow( playerid, p_TruckingTD[ playerid ] );
ShowPlayerHelpDialog( playerid, 7500, "A ~g~~h~truck blip~w~~h~ has been shown on your radar. Go to where the truck blip is to pickup your cargo full of %s.", g_CargoName[ p_PilotCargo[ playerid ] ] ); ShowPlayerHelpDialog( playerid, 7500, "A ~g~~h~truck blip~w~~h~ has been shown on your radar. Go to where the truck blip is to pickup your cargo full of %s.", g_CargoName[ p_PilotCargo[ playerid ] ] );
} }

View File

@ -150,7 +150,7 @@ hook OnPlayerEnterDynRaceCP( playerid, checkpointid )
{ {
static aPlayer[ 1 ]; aPlayer[ 0 ] = playerid; static aPlayer[ 1 ]; aPlayer[ 0 ] = playerid;
p_TruckingPositionTimer[ playerid ] = SetTimerEx( "OnTruckPositionUpdate", 750, false, "dd", playerid, p_TruckingRoute[ playerid ] { 1 } ); p_TruckingPositionTimer[ playerid ] = SetTimerEx( "OnTruckPositionUpdate", 750, false, "dd", playerid, p_TruckingRoute[ playerid ] { 1 } );
TextDrawShowForPlayer( playerid, p_TruckingTD[ playerid ] ); PlayerTextDrawShow( playerid, p_TruckingTD[ playerid ] );
ShowPlayerHelpDialog( playerid, 7500, "Your trailer has been loaded with %s. ~g~~h~Follow the truck blip on your radar to meet the destination.", g_aTrailerData[ p_TruckingTrailerModel{ playerid } ] [ p_TruckingTrailer{ playerid } ] [ E_NAME ] ); ShowPlayerHelpDialog( playerid, 7500, "Your trailer has been loaded with %s. ~g~~h~Follow the truck blip on your radar to meet the destination.", g_aTrailerData[ p_TruckingTrailerModel{ playerid } ] [ p_TruckingTrailer{ playerid } ] [ E_NAME ] );
p_TruckingMapIcon [ playerid ] = CreateDynamicMapIconEx( g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 1 } ] [ E_X ], g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 1 } ] [ E_Y ], g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 1 } ] [ E_Z ], 51, 0, MAPICON_GLOBAL, 6000.0, { -1 }, { -1 }, aPlayer ); p_TruckingMapIcon [ playerid ] = CreateDynamicMapIconEx( g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 1 } ] [ E_X ], g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 1 } ] [ E_Y ], g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 1 } ] [ E_Z ], 51, 0, MAPICON_GLOBAL, 6000.0, { -1 }, { -1 }, aPlayer );
@ -176,7 +176,7 @@ hook OnPlayerEnterDynRaceCP( playerid, checkpointid )
iCashEarned = floatround( p_TruckingDistance[ playerid ] * 2.0 + g_aTrailerData[ p_TruckingTrailerModel{ playerid } ] [ p_TruckingTrailer{ playerid } ] [ E_BONUS ] ); iCashEarned = floatround( p_TruckingDistance[ playerid ] * 2.0 + g_aTrailerData[ p_TruckingTrailerModel{ playerid } ] [ p_TruckingTrailer{ playerid } ] [ E_BONUS ] );
ach_HandleTruckingCouriers( playerid ); ach_HandleTruckingCouriers( playerid );
TextDrawHideForPlayer( playerid, p_TruckingTD[ playerid ] ); PlayerTextDrawHide( playerid, p_TruckingTD[ playerid ] );
GivePlayerScore( playerid, 1 + floatround( p_TruckingDistance[ playerid ] / 1000.0 ) ); GivePlayerScore( playerid, 1 + floatround( p_TruckingDistance[ playerid ] / 1000.0 ) );
GivePlayerCash( playerid, iCashEarned ); GivePlayerCash( playerid, iCashEarned );
@ -297,7 +297,7 @@ CMD:work( playerid, params[ ] )
p_TruckingCheckPoint[ playerid ] = CreateDynamicRaceCP( 0, g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 0 } ] [ E_X ], g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 0 } ] [ E_Y ], g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 0 } ] [ E_Z ], g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 1 } ] [ E_X ], g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 1 } ] [ E_Y ], g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 1 } ] [ E_Z ], 10.0, -1, -1, playerid ); p_TruckingCheckPoint[ playerid ] = CreateDynamicRaceCP( 0, g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 0 } ] [ E_X ], g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 0 } ] [ E_Y ], g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 0 } ] [ E_Z ], g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 1 } ] [ E_X ], g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 1 } ] [ E_Y ], g_aTruckingLocations[ p_TruckingRoute[ playerid ] { 1 } ] [ E_Z ], 10.0, -1, -1, playerid );
p_TruckingPositionTimer[ playerid ] = SetTimerEx( "OnTruckPositionUpdate", 750, false, "dd", playerid, p_TruckingRoute[ playerid ] { 0 } ); p_TruckingPositionTimer[ playerid ] = SetTimerEx( "OnTruckPositionUpdate", 750, false, "dd", playerid, p_TruckingRoute[ playerid ] { 0 } );
TextDrawShowForPlayer( playerid, p_TruckingTD[ playerid ] ); PlayerTextDrawShow( playerid, p_TruckingTD[ playerid ] );
ShowPlayerHelpDialog( playerid, 7500, "A ~g~~h~truck blip~w~~h~ has been shown on your radar. Go to where the truck blip is load your trailer with %s.", g_aTrailerData[ p_TruckingTrailerModel{ playerid } ] [ p_TruckingTrailer{ playerid } ] [ E_NAME ] ); ShowPlayerHelpDialog( playerid, 7500, "A ~g~~h~truck blip~w~~h~ has been shown on your radar. Go to where the truck blip is load your trailer with %s.", g_aTrailerData[ p_TruckingTrailerModel{ playerid } ] [ p_TruckingTrailer{ playerid } ] [ E_NAME ] );
} }
@ -326,7 +326,7 @@ stock StopPlayerTruckingCourier( playerid )
p_TruckingRoute [ playerid ] { 0 } = INVALID_TRUCKING_ROUTE; p_TruckingRoute [ playerid ] { 0 } = INVALID_TRUCKING_ROUTE;
p_TruckingRoute [ playerid ] { 1 } = INVALID_TRUCKING_ROUTE; p_TruckingRoute [ playerid ] { 1 } = INVALID_TRUCKING_ROUTE;
TextDrawHideForPlayer( playerid, p_TruckingTD[ playerid ] ); PlayerTextDrawHide( playerid, p_TruckingTD[ playerid ] );
} }
stock getRandomTrailerLoad( iModel, iRisk ) { stock getRandomTrailerLoad( iModel, iRisk ) {
@ -359,14 +359,14 @@ stock getClosestTruckingRoute( playerid, &Float: distance = FLOAT_INFINITY ) {
function OnTruckPositionUpdate( playerid, routeid ) function OnTruckPositionUpdate( playerid, routeid )
{ {
if ( !IsPlayerInAnyVehicle( playerid ) && !p_hasTruckingJob{ playerid } && ( p_TruckingRoute[ playerid ] { 0 } == 0 && p_TruckingRoute[ playerid ] { 1 } == 0 ) ) { if ( !IsPlayerInAnyVehicle( playerid ) && !p_hasTruckingJob{ playerid } && ( p_TruckingRoute[ playerid ] { 0 } == 0 && p_TruckingRoute[ playerid ] { 1 } == 0 ) ) {
TextDrawHideForPlayer( playerid, p_TruckingTD[ playerid ] ); PlayerTextDrawHide( playerid, p_TruckingTD[ playerid ] );
return ( p_TruckingPositionTimer[ playerid ] = 0xFFFF ); return ( p_TruckingPositionTimer[ playerid ] = 0xFFFF );
} }
new new
Float: fDistance = GetPlayerDistanceFromPoint( playerid, g_aTruckingLocations[ routeid ] [ E_X ], g_aTruckingLocations[ routeid ] [ E_Y ], g_aTruckingLocations[ routeid ] [ E_Z ] ); Float: fDistance = GetPlayerDistanceFromPoint( playerid, g_aTruckingLocations[ routeid ] [ E_X ], g_aTruckingLocations[ routeid ] [ E_Y ], g_aTruckingLocations[ routeid ] [ E_Z ] );
TextDrawSetString( p_TruckingTD[ playerid ], sprintf( "~b~Location:~w~ %s~n~~b~Distance:~w~ %0.2fm", g_aTruckingLocations[ routeid ] [ E_NAME ], fDistance ) ); PlayerTextDrawSetString( playerid, p_TruckingTD[ playerid ], sprintf( "~b~Location:~w~ %s~n~~b~Distance:~w~ %0.2fm", g_aTruckingLocations[ routeid ] [ E_NAME ], fDistance ) );
return ( p_TruckingPositionTimer[ playerid ] = SetTimerEx( "OnTruckPositionUpdate", 750, false, "dd", playerid, routeid ) ); return ( p_TruckingPositionTimer[ playerid ] = SetTimerEx( "OnTruckPositionUpdate", 750, false, "dd", playerid, routeid ) );
} }

View File

@ -18,7 +18,7 @@
#endif*/ #endif*/
/* ** Definitions ** */ /* ** Definitions ** */
#define MAX_BLACKJACK_TABLES ( 50 ) // 33 #define MAX_BLACKJACK_TABLES ( 33 )
#define MAX_BLACKJACK_CARDS ( 5 ) #define MAX_BLACKJACK_CARDS ( 5 )
#define MAX_BLACKJACK_PLAYERS ( 3 ) #define MAX_BLACKJACK_PLAYERS ( 3 )
#define BLACKJACK_DEALER_WAIT ( 500 ) #define BLACKJACK_DEALER_WAIT ( 500 )

View File

@ -36,16 +36,9 @@ new
Text: g_NotManyPlayersTD = Text: INVALID_TEXT_DRAW, Text: g_NotManyPlayersTD = Text: INVALID_TEXT_DRAW,
// Server Player Textdraws (Needs Converting) // Server Player Textdraws (Needs Converting)
Text: p_TrackPlayerTD [ MAX_PLAYERS ] = { Text: INVALID_TEXT_DRAW, ... },
Text: p_FireDistance1 [ MAX_PLAYERS ] = { Text: INVALID_TEXT_DRAW, ... },
Text: p_FireDistance2 [ MAX_PLAYERS ] = { Text: INVALID_TEXT_DRAW, ... },
Text: p_AchievementTD [ MAX_PLAYERS ] = { Text: INVALID_TEXT_DRAW, ... },
Text: p_GPSInformation [ MAX_PLAYERS ] = { Text: INVALID_TEXT_DRAW, ... },
Text: p_ProgressBoxOutsideTD [ MAX_PLAYERS ] = { Text: INVALID_TEXT_DRAW, ... }, Text: p_ProgressBoxOutsideTD [ MAX_PLAYERS ] = { Text: INVALID_TEXT_DRAW, ... },
Text: p_ProgressBoxTD [ MAX_PLAYERS ] = { Text: INVALID_TEXT_DRAW, ... }, Text: p_ProgressBoxTD [ MAX_PLAYERS ] = { Text: INVALID_TEXT_DRAW, ... },
Text: p_ProgressTitleTD [ MAX_PLAYERS ] = { Text: INVALID_TEXT_DRAW, ... }, Text: p_ProgressTitleTD [ MAX_PLAYERS ] = { Text: INVALID_TEXT_DRAW, ... },
Text: p_HelpBoxTD [ MAX_PLAYERS ] = { Text: INVALID_TEXT_DRAW, ... },
Text: p_TruckingTD [ MAX_PLAYERS ] = { Text: INVALID_TEXT_DRAW, ... },
// Player Textdraws // Player Textdraws
PlayerText: p_LocationTD [ MAX_PLAYERS ] = { PlayerText: INVALID_TEXT_DRAW, ... }, PlayerText: p_LocationTD [ MAX_PLAYERS ] = { PlayerText: INVALID_TEXT_DRAW, ... },
@ -60,6 +53,13 @@ new
PlayerText: p_DamageTD [ MAX_PLAYERS ] = { PlayerText: INVALID_TEXT_DRAW, ... }, PlayerText: p_DamageTD [ MAX_PLAYERS ] = { PlayerText: INVALID_TEXT_DRAW, ... },
PlayerText: p_JailTimeTD [ MAX_PLAYERS ] = { PlayerText: INVALID_TEXT_DRAW, ... }, PlayerText: p_JailTimeTD [ MAX_PLAYERS ] = { PlayerText: INVALID_TEXT_DRAW, ... },
PlayerText: g_ZoneOwnerTD [ MAX_PLAYERS ] = { PlayerText: INVALID_TEXT_DRAW, ... }, PlayerText: g_ZoneOwnerTD [ MAX_PLAYERS ] = { PlayerText: INVALID_TEXT_DRAW, ... },
PlayerText: p_HelpBoxTD [ MAX_PLAYERS ] = { PlayerText: INVALID_TEXT_DRAW, ... },
PlayerText: p_TruckingTD [ MAX_PLAYERS ] = { PlayerText: INVALID_TEXT_DRAW, ... },
PlayerText: p_TrackPlayerTD [ MAX_PLAYERS ] = { PlayerText: INVALID_TEXT_DRAW, ... },
PlayerText: p_GPSInformation [ MAX_PLAYERS ] = { PlayerText: INVALID_TEXT_DRAW, ... },
PlayerText: p_AchievementTD [ MAX_PLAYERS ] = { PlayerText: INVALID_TEXT_DRAW, ... },
PlayerText: p_FireDistance1 [ MAX_PLAYERS ] = { PlayerText: INVALID_TEXT_DRAW, ... },
PlayerText: p_FireDistance2 [ MAX_PLAYERS ] = { PlayerText: INVALID_TEXT_DRAW, ... },
PlayerText: p_VehiclePreviewTD [ 7 ] = { PlayerText: INVALID_TEXT_DRAW, ... } PlayerText: p_VehiclePreviewTD [ 7 ] = { PlayerText: INVALID_TEXT_DRAW, ... }
; ;
@ -458,72 +458,6 @@ hook OnScriptInit( )
TextDrawColor(p_ProgressTitleTD[ playerid ], -1); TextDrawColor(p_ProgressTitleTD[ playerid ], -1);
TextDrawSetOutline(p_ProgressTitleTD[ playerid ], 1); TextDrawSetOutline(p_ProgressTitleTD[ playerid ], 1);
TextDrawSetProportional(p_ProgressTitleTD[ playerid ], 1); TextDrawSetProportional(p_ProgressTitleTD[ playerid ], 1);
p_AchievementTD[ playerid ] = TextDrawCreate(325.000000, 137.000000, "_");
TextDrawAlignment(p_AchievementTD[ playerid ], 2);
TextDrawBackgroundColor(p_AchievementTD[ playerid ], 80);
TextDrawFont(p_AchievementTD[ playerid ], 1);
TextDrawLetterSize(p_AchievementTD[ playerid ], 0.209999, 1.000000);
TextDrawColor(p_AchievementTD[ playerid ], -1);
TextDrawSetOutline(p_AchievementTD[ playerid ], 1);
TextDrawSetProportional(p_AchievementTD[ playerid ], 1);
p_FireDistance1[ playerid ] = TextDrawCreate(26.000000, 182.000000, "_");
TextDrawBackgroundColor(p_FireDistance1[ playerid ], 255);
TextDrawFont(p_FireDistance1[ playerid ], 2);
TextDrawLetterSize(p_FireDistance1[ playerid ], 0.210000, 1.200000);
TextDrawColor(p_FireDistance1[ playerid ], -1);
TextDrawSetOutline(p_FireDistance1[ playerid ], 1);
TextDrawSetProportional(p_FireDistance1[ playerid ], 1);
p_FireDistance2[ playerid ] = TextDrawCreate(26.000000, 236.000000, "_");
TextDrawBackgroundColor(p_FireDistance2[ playerid ], 255);
TextDrawFont(p_FireDistance2[ playerid ], 2);
TextDrawLetterSize(p_FireDistance2[ playerid ], 0.209999, 1.200000);
TextDrawColor(p_FireDistance2[ playerid ], -1);
TextDrawSetOutline(p_FireDistance2[ playerid ], 1);
TextDrawSetProportional(p_FireDistance2[ playerid ], 1);
p_GPSInformation[ playerid ] = TextDrawCreate(26.000000, 200.000000, "~g~Location:~w~ No-where~n~~g~Distance:~w~ 0.0m");
TextDrawBackgroundColor(p_GPSInformation[ playerid ], 255);
TextDrawFont(p_GPSInformation[ playerid ], 2);
TextDrawLetterSize(p_GPSInformation[ playerid ], 0.209999, 1.099999);
TextDrawColor(p_GPSInformation[ playerid ], -1);
TextDrawSetOutline(p_GPSInformation[ playerid ], 1);
TextDrawSetProportional(p_GPSInformation[ playerid ], 1);
TextDrawSetSelectable(p_GPSInformation[ playerid ], 0);
p_TruckingTD[ playerid ] = TextDrawCreate(26.000000, 220.000000, "~b~Location:~w~ No-where~n~~b~Distance:~w~ 0.0m");
TextDrawBackgroundColor(p_TruckingTD[ playerid ], 255);
TextDrawFont(p_TruckingTD[ playerid ], 2);
TextDrawLetterSize(p_TruckingTD[ playerid ], 0.210000, 1.100000);
TextDrawColor(p_TruckingTD[ playerid ], -1);
TextDrawSetOutline(p_TruckingTD[ playerid ], 1);
TextDrawSetProportional(p_TruckingTD[ playerid ], 1);
TextDrawSetSelectable(p_TruckingTD[ playerid ], 0);
p_TrackPlayerTD[ playerid ] = TextDrawCreate(571.000000, 258.000000, "Loading~n~~w~NaN.0m");
TextDrawAlignment(p_TrackPlayerTD[ playerid ], 2);
TextDrawBackgroundColor(p_TrackPlayerTD[ playerid ], 80);
TextDrawFont(p_TrackPlayerTD[ playerid ], 1);
TextDrawLetterSize(p_TrackPlayerTD[ playerid ], 0.260000, 1.100000);
TextDrawColor(p_TrackPlayerTD[ playerid ], COLOR_RED);
TextDrawSetOutline(p_TrackPlayerTD[ playerid ], 1);
TextDrawSetProportional(p_TrackPlayerTD[ playerid ], 1);
TextDrawSetSelectable(p_TrackPlayerTD[ playerid ], 0);
p_HelpBoxTD[ playerid ] = TextDrawCreate(30.000000, 161.000000, "... Loading Help ...");
TextDrawBackgroundColor(p_HelpBoxTD[ playerid ], 255);
TextDrawFont(p_HelpBoxTD[ playerid ], 1);
TextDrawLetterSize(p_HelpBoxTD[ playerid ], 0.219999, 1.200000);
TextDrawColor(p_HelpBoxTD[ playerid ], -1);
TextDrawSetOutline(p_HelpBoxTD[ playerid ], 0);
TextDrawSetProportional(p_HelpBoxTD[ playerid ], 1);
TextDrawSetShadow(p_HelpBoxTD[ playerid ], 1);
TextDrawUseBox(p_HelpBoxTD[ playerid ], 1);
TextDrawBoxColor(p_HelpBoxTD[ playerid ], 117);
TextDrawTextSize(p_HelpBoxTD[ playerid ], 170.000000, 0.000000);
TextDrawSetSelectable(p_HelpBoxTD[ playerid ], 0);
} }
return Y_HOOKS_CONTINUE_RETURN_1; return Y_HOOKS_CONTINUE_RETURN_1;
} }
@ -533,6 +467,52 @@ hook OnPlayerConnect( playerid )
if ( ! ( 0 <= playerid < MAX_PLAYERS ) ) if ( ! ( 0 <= playerid < MAX_PLAYERS ) )
return Y_HOOKS_CONTINUE_RETURN_1; return Y_HOOKS_CONTINUE_RETURN_1;
p_AchievementTD[ playerid ] = CreatePlayerTextDraw(playerid, 325.000000, 137.000000, "_");
PlayerTextDrawAlignment(playerid, p_AchievementTD[ playerid ], 2);
PlayerTextDrawBackgroundColor(playerid, p_AchievementTD[ playerid ], 80);
PlayerTextDrawFont(playerid, p_AchievementTD[ playerid ], 1);
PlayerTextDrawLetterSize(playerid, p_AchievementTD[ playerid ], 0.209999, 1.000000);
PlayerTextDrawColor(playerid, p_AchievementTD[ playerid ], -1);
PlayerTextDrawSetOutline(playerid, p_AchievementTD[ playerid ], 1);
PlayerTextDrawSetProportional(playerid, p_AchievementTD[ playerid ], 1);
p_GPSInformation[ playerid ] = CreatePlayerTextDraw(playerid, 26.000000, 200.000000, "~g~Location:~w~ No-where~n~~g~Distance:~w~ 0.0m");
PlayerTextDrawBackgroundColor(playerid, p_GPSInformation[ playerid ], 255);
PlayerTextDrawFont(playerid, p_GPSInformation[ playerid ], 2);
PlayerTextDrawLetterSize(playerid, p_GPSInformation[ playerid ], 0.209999, 1.099999);
PlayerTextDrawColor(playerid, p_GPSInformation[ playerid ], -1);
PlayerTextDrawSetOutline(playerid, p_GPSInformation[ playerid ], 1);
PlayerTextDrawSetProportional(playerid, p_GPSInformation[ playerid ], 1);
p_TrackPlayerTD[ playerid ] = CreatePlayerTextDraw(playerid, 571.000000, 258.000000, "Loading~n~~w~NaN.0m");
PlayerTextDrawAlignment(playerid, p_TrackPlayerTD[ playerid ], 2);
PlayerTextDrawBackgroundColor(playerid, p_TrackPlayerTD[ playerid ], 80);
PlayerTextDrawFont(playerid, p_TrackPlayerTD[ playerid ], 1);
PlayerTextDrawLetterSize(playerid, p_TrackPlayerTD[ playerid ], 0.260000, 1.100000);
PlayerTextDrawColor(playerid, p_TrackPlayerTD[ playerid ], COLOR_RED);
PlayerTextDrawSetOutline(playerid, p_TrackPlayerTD[ playerid ], 1);
PlayerTextDrawSetProportional(playerid, p_TrackPlayerTD[ playerid ], 1);
p_TruckingTD[ playerid ] = CreatePlayerTextDraw(playerid, 26.000000, 220.000000, "~b~Location:~w~ No-where~n~~b~Distance:~w~ 0.0m");
PlayerTextDrawBackgroundColor(playerid, p_TruckingTD[ playerid ], 255);
PlayerTextDrawFont(playerid, p_TruckingTD[ playerid ], 2);
PlayerTextDrawLetterSize(playerid, p_TruckingTD[ playerid ], 0.210000, 1.100000);
PlayerTextDrawColor(playerid, p_TruckingTD[ playerid ], -1);
PlayerTextDrawSetOutline(playerid, p_TruckingTD[ playerid ], 1);
PlayerTextDrawSetProportional(playerid, p_TruckingTD[ playerid ], 1);
p_HelpBoxTD[ playerid ] = CreatePlayerTextDraw(playerid, 30.000000, 161.000000, "... Loading Help ...");
PlayerTextDrawBackgroundColor(playerid, p_HelpBoxTD[ playerid ], 255);
PlayerTextDrawFont(playerid, p_HelpBoxTD[ playerid ], 1);
PlayerTextDrawLetterSize(playerid, p_HelpBoxTD[ playerid ], 0.219999, 1.200000);
PlayerTextDrawColor(playerid, p_HelpBoxTD[ playerid ], -1);
PlayerTextDrawSetOutline(playerid, p_HelpBoxTD[ playerid ], 0);
PlayerTextDrawSetProportional(playerid, p_HelpBoxTD[ playerid ], 1);
PlayerTextDrawSetShadow(playerid, p_HelpBoxTD[ playerid ], 1);
PlayerTextDrawUseBox(playerid, p_HelpBoxTD[ playerid ], 1);
PlayerTextDrawBoxColor(playerid, p_HelpBoxTD[ playerid ], 117);
PlayerTextDrawTextSize(playerid, p_HelpBoxTD[ playerid ], 170.000000, 0.000000);
g_ZoneOwnerTD[ playerid ] = CreatePlayerTextDraw( playerid, 86.000000, 296.000000, "_" ); g_ZoneOwnerTD[ playerid ] = CreatePlayerTextDraw( playerid, 86.000000, 296.000000, "_" );
PlayerTextDrawAlignment( playerid, g_ZoneOwnerTD[ playerid ], 2 ); PlayerTextDrawAlignment( playerid, g_ZoneOwnerTD[ playerid ], 2 );
PlayerTextDrawBackgroundColor( playerid, g_ZoneOwnerTD[ playerid ], 255 ); PlayerTextDrawBackgroundColor( playerid, g_ZoneOwnerTD[ playerid ], 255 );
@ -644,5 +624,52 @@ hook OnPlayerConnect( playerid )
PlayerTextDrawSetOutline(playerid, p_RobberyAmountTD[ playerid ], 1); PlayerTextDrawSetOutline(playerid, p_RobberyAmountTD[ playerid ], 1);
PlayerTextDrawSetProportional(playerid, p_RobberyAmountTD[ playerid ], 1); PlayerTextDrawSetProportional(playerid, p_RobberyAmountTD[ playerid ], 1);
PlayerTextDrawSetSelectable(playerid, p_RobberyAmountTD[ playerid ], 0); PlayerTextDrawSetSelectable(playerid, p_RobberyAmountTD[ playerid ], 0);
p_FireDistance1[ playerid ] = CreatePlayerTextDraw(playerid, 26.000000, 182.000000, "_");
PlayerTextDrawBackgroundColor(playerid, p_FireDistance1[ playerid ], 255);
PlayerTextDrawFont(playerid, p_FireDistance1[ playerid ], 2);
PlayerTextDrawLetterSize(playerid, p_FireDistance1[ playerid ], 0.210000, 1.200000);
PlayerTextDrawColor(playerid, p_FireDistance1[ playerid ], -1);
PlayerTextDrawSetOutline(playerid, p_FireDistance1[ playerid ], 1);
PlayerTextDrawSetProportional(playerid, p_FireDistance1[ playerid ], 1);
p_FireDistance2[ playerid ] = CreatePlayerTextDraw(playerid, 26.000000, 236.000000, "_");
PlayerTextDrawBackgroundColor(playerid, p_FireDistance2[ playerid ], 255);
PlayerTextDrawFont(playerid, p_FireDistance2[ playerid ], 2);
PlayerTextDrawLetterSize(playerid, p_FireDistance2[ playerid ], 0.209999, 1.200000);
PlayerTextDrawColor(playerid, p_FireDistance2[ playerid ], -1);
PlayerTextDrawSetOutline(playerid, p_FireDistance2[ playerid ], 1);
PlayerTextDrawSetProportional(playerid, p_FireDistance2[ playerid ], 1);
return Y_HOOKS_CONTINUE_RETURN_1; return Y_HOOKS_CONTINUE_RETURN_1;
} }
/* ** Hooked Functions ** */
/*stock Text: TD_TextDrawCreate( Float: x, Float: y, text[ ] )
{
static count;
printf("%d", ++count);
return TextDrawCreate( x, y, text );
}
#if defined _ALS_TextDrawCreate
#undef TextDrawCreate
#else
#define _ALS_TextDrawCreate
#endif
#define TextDrawCreate TD_TextDrawCreate*/
/*stock PlayerText: TD_CreatePlayerTextDraw( playerid, Float: x, Float: y, text[ ] )
{
static count;
printf("%d", ++count);
return CreatePlayerTextDraw( playerid, x, y, text );
}
#if defined _ALS_CreatePlayerTextDraw
#undef CreatePlayerTextDraw
#else
#define _ALS_CreatePlayerTextDraw
#endif
#define CreatePlayerTextDraw TD_CreatePlayerTextDraw*/

View File

@ -13,7 +13,7 @@
*/ */
#pragma compat 1 #pragma compat 1
//#pragma option -d3 #pragma option -d3
#pragma dynamic 7200000 #pragma dynamic 7200000
#define DEBUG_MODE #define DEBUG_MODE
@ -3725,7 +3725,7 @@ public OnServerUpdateTimer( )
if ( IsPlayerInRangeOfPoint( playerid, 10.0, g_gpsData[ id ] [ E_X ], g_gpsData[ id ] [ E_Y ], g_gpsData[ id ] [ E_Z ] ) ) if ( IsPlayerInRangeOfPoint( playerid, 10.0, g_gpsData[ id ] [ E_X ], g_gpsData[ id ] [ E_Y ], g_gpsData[ id ] [ E_Z ] ) )
{ {
TextDrawHideForPlayer ( playerid, p_GPSInformation[ playerid ] ); PlayerTextDrawHide( playerid, p_GPSInformation[ playerid ] );
DestroyDynamicObject( p_GPSObject[ playerid ] ); DestroyDynamicObject( p_GPSObject[ playerid ] );
KillTimer( p_GPSTimer[ playerid ] ); KillTimer( p_GPSTimer[ playerid ] );
@ -4273,7 +4273,7 @@ public OnPlayerRequestClass( playerid, classid )
PlayerTextDrawHide( playerid, p_PlayerRankTextTD[ playerid ] ); PlayerTextDrawHide( playerid, p_PlayerRankTextTD[ playerid ] );
KillTimer( p_TrackingTimer[ playerid ] ); KillTimer( p_TrackingTimer[ playerid ] );
p_TrackingTimer[ playerid ] = -1; p_TrackingTimer[ playerid ] = -1;
TextDrawHideForPlayer( playerid, p_TrackPlayerTD[ playerid ] ); PlayerTextDrawHide( playerid, p_TrackPlayerTD[ playerid ] );
PlayerTextDrawHide( playerid, p_ExperienceTD[ playerid ] ); PlayerTextDrawHide( playerid, p_ExperienceTD[ playerid ] );
HidePlayerTogglableTextdraws( playerid ); HidePlayerTogglableTextdraws( playerid );
TextDrawHideForPlayer( playerid, g_CurrentRankTD ); TextDrawHideForPlayer( playerid, g_CurrentRankTD );
@ -4281,8 +4281,8 @@ public OnPlayerRequestClass( playerid, classid )
TextDrawHideForPlayer( playerid, g_DoubleXPTD ); TextDrawHideForPlayer( playerid, g_DoubleXPTD );
KillTimer( p_FireDistanceTimer[ playerid ] ); KillTimer( p_FireDistanceTimer[ playerid ] );
p_FireDistanceTimer[ playerid ] = 0xFF; p_FireDistanceTimer[ playerid ] = 0xFF;
TextDrawHideForPlayer( playerid, p_FireDistance1[ playerid ] ); PlayerTextDrawHide( playerid, p_FireDistance1[ playerid ] );
TextDrawHideForPlayer( playerid, p_FireDistance2[ playerid ] ); PlayerTextDrawHide( playerid, p_FireDistance2[ playerid ] );
p_MoneyBag{ playerid } = false; p_MoneyBag{ playerid } = false;
RemovePlayerAttachedObject( playerid, 1 ); RemovePlayerAttachedObject( playerid, 1 );
@ -5841,14 +5841,14 @@ public OnPlayerDeath( playerid, killerid, reason )
p_TrackingTimer[ playerid ] = -1; p_TrackingTimer[ playerid ] = -1;
p_GPSLocation [ playerid ] = 0; p_GPSLocation [ playerid ] = 0;
p_GPSToggled { playerid } = false; p_GPSToggled { playerid } = false;
TextDrawHideForPlayer( playerid, p_GPSInformation[ playerid ] ); PlayerTextDrawHide( playerid, p_GPSInformation[ playerid ] );
DestroyDynamicObject( p_GPSObject[ playerid ] ); DestroyDynamicObject( p_GPSObject[ playerid ] );
KillTimer( p_GPSTimer[ playerid ] ); KillTimer( p_GPSTimer[ playerid ] );
DeletePVar( playerid, "AlcatrazWantedCD" ); DeletePVar( playerid, "AlcatrazWantedCD" );
DeletePVar( playerid, "ShotCopWantedCD" ); DeletePVar( playerid, "ShotCopWantedCD" );
p_GPSTimer[ playerid ] = 0xFF; p_GPSTimer[ playerid ] = 0xFF;
p_GPSObject[ playerid ] = INVALID_OBJECT_ID; p_GPSObject[ playerid ] = INVALID_OBJECT_ID;
TextDrawHideForPlayer( playerid, p_TrackPlayerTD[ playerid ] ); PlayerTextDrawHide( playerid, p_TrackPlayerTD[ playerid ] );
PlayerTextDrawHide( playerid, p_ExperienceTD[ playerid ] ); PlayerTextDrawHide( playerid, p_ExperienceTD[ playerid ] );
TextDrawHideForPlayer( playerid, g_WebsiteTD ); TextDrawHideForPlayer( playerid, g_WebsiteTD );
PlayerTextDrawHide( playerid, p_WantedLevelTD[ playerid ] ); PlayerTextDrawHide( playerid, p_WantedLevelTD[ playerid ] );
@ -6483,10 +6483,10 @@ function OnPlayerFireDistanceUpdate( playerid )
else format( szFire2, sizeof( szFire2 ), "%s~r~FIRE %d:%s~w~ %0.0f m~n~", szFire2, i,i==1?("_"):(""), dis ); else format( szFire2, sizeof( szFire2 ), "%s~r~FIRE %d:%s~w~ %0.0f m~n~", szFire2, i,i==1?("_"):(""), dis );
} }
} }
TextDrawSetString( p_FireDistance1[ playerid ], szFire1 ); PlayerTextDrawSetString( playerid, p_FireDistance1[ playerid ], szFire1 );
TextDrawSetString( p_FireDistance2[ playerid ], szFire2 ); PlayerTextDrawSetString( playerid, p_FireDistance2[ playerid ], szFire2 );
TextDrawShowForPlayer( playerid, p_FireDistance1[ playerid ] ); PlayerTextDrawShow( playerid, p_FireDistance1[ playerid ] );
TextDrawShowForPlayer( playerid, p_FireDistance2[ playerid ] ); PlayerTextDrawShow( playerid, p_FireDistance2[ playerid ] );
return 1; return 1;
} }
@ -9605,8 +9605,8 @@ CMD:rfiretracker( playerid, params[ ] )
{ {
KillTimer( p_FireDistanceTimer[ playerid ] ); KillTimer( p_FireDistanceTimer[ playerid ] );
p_FireDistanceTimer[ playerid ] = 0xFF; p_FireDistanceTimer[ playerid ] = 0xFF;
TextDrawHideForPlayer( playerid, p_FireDistance1[ playerid ] ); PlayerTextDrawHide( playerid, p_FireDistance1[ playerid ] );
TextDrawHideForPlayer( playerid, p_FireDistance2[ playerid ] ); PlayerTextDrawHide( playerid, p_FireDistance2[ playerid ] );
SendServerMessage( playerid, "You have turned off your fire tracker." ); SendServerMessage( playerid, "You have turned off your fire tracker." );
return 1; return 1;
} }
@ -9669,7 +9669,7 @@ CMD:gps( playerid, params[ ] )
KillTimer( p_GPSTimer[ playerid ] ); KillTimer( p_GPSTimer[ playerid ] );
p_GPSTimer[ playerid ] = 0xFF; p_GPSTimer[ playerid ] = 0xFF;
p_GPSObject[ playerid ] = INVALID_OBJECT_ID; p_GPSObject[ playerid ] = INVALID_OBJECT_ID;
TextDrawHideForPlayer( playerid, p_GPSInformation[ playerid ] ); PlayerTextDrawHide( playerid, p_GPSInformation[ playerid ] );
return SendServerMessage( playerid, "You have de-activated your GPS." ), 1; return SendServerMessage( playerid, "You have de-activated your GPS." ), 1;
} }
else else
@ -11173,7 +11173,7 @@ CMD:hidetracker( playerid, params[ ] )
SendServerMessage(playerid, "You have de-activated the tracker."); SendServerMessage(playerid, "You have de-activated the tracker.");
KillTimer( p_TrackingTimer[ playerid ] ); KillTimer( p_TrackingTimer[ playerid ] );
p_TrackingTimer[ playerid ] = -1; p_TrackingTimer[ playerid ] = -1;
TextDrawHideForPlayer( playerid, p_TrackPlayerTD[ playerid ] ); PlayerTextDrawHide( playerid, p_TrackPlayerTD[ playerid ] );
return 1; return 1;
} }
@ -11194,7 +11194,7 @@ CMD:track( playerid, params[ ] )
{ {
KillTimer( p_TrackingTimer[ playerid ] ); KillTimer( p_TrackingTimer[ playerid ] );
p_TrackingTimer[ playerid ] = SetTimerEx( "TrackPlayer_timer", 1000, true, "dd", playerid, pID ); p_TrackingTimer[ playerid ] = SetTimerEx( "TrackPlayer_timer", 1000, true, "dd", playerid, pID );
TextDrawShowForPlayer( playerid, p_TrackPlayerTD[ playerid ] ); PlayerTextDrawShow( playerid, p_TrackPlayerTD[ playerid ] );
SendServerMessage( playerid, "You have activated the tracker, you can hide it with /hidetracker." ); SendServerMessage( playerid, "You have activated the tracker, you can hide it with /hidetracker." );
} }
return 1; return 1;
@ -11205,7 +11205,7 @@ function TrackPlayer_timer( playerid, victimid )
if ( !IsPlayerConnected( victimid ) || p_AdminOnDuty{ victimid } == true || GetPlayerState( victimid ) == PLAYER_STATE_SPECTATING || !JobEquals( playerid, JOB_HITMAN ) || p_Class[ playerid ] != CLASS_CIVILIAN ) if ( !IsPlayerConnected( victimid ) || p_AdminOnDuty{ victimid } == true || GetPlayerState( victimid ) == PLAYER_STATE_SPECTATING || !JobEquals( playerid, JOB_HITMAN ) || p_Class[ playerid ] != CLASS_CIVILIAN )
{ {
KillTimer( p_TrackingTimer[ playerid ] ), p_TrackingTimer[ playerid ] = -1; KillTimer( p_TrackingTimer[ playerid ] ), p_TrackingTimer[ playerid ] = -1;
TextDrawHideForPlayer( playerid, p_TrackPlayerTD[ playerid ] ); PlayerTextDrawHide( playerid, p_TrackPlayerTD[ playerid ] );
} }
else else
{ {
@ -11236,7 +11236,7 @@ function TrackPlayer_timer( playerid, victimid )
if ( !fDistance || fDistance > 9999.9 ) if ( !fDistance || fDistance > 9999.9 )
fDistance = 9999.9; fDistance = 9999.9;
TextDrawSetString( p_TrackPlayerTD[ playerid ], fDistance != 9999.0 ? sprintf( "%s~n~~w~%0.1fm", ReturnPlayerName( victimid ), fDistance ) : sprintf( "%s~n~~w~unknown", ReturnPlayerName( victimid ) ) ); PlayerTextDrawSetString( playerid, p_TrackPlayerTD[ playerid ], fDistance != 9999.0 ? sprintf( "%s~n~~w~%0.1fm", ReturnPlayerName( victimid ), fDistance ) : sprintf( "%s~n~~w~unknown", ReturnPlayerName( victimid ) ) );
} }
} }
@ -16665,7 +16665,7 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
p_GPSToggled{ playerid } = true; p_GPSToggled{ playerid } = true;
SendClientMessageFormatted( playerid, -1, ""COL_GREY"[GPS]"COL_WHITE" You have set your destination to %s. Follow the arrow to reach your destination.", g_gpsData[ i ] [ E_NAME ] ); SendClientMessageFormatted( playerid, -1, ""COL_GREY"[GPS]"COL_WHITE" You have set your destination to %s. Follow the arrow to reach your destination.", g_gpsData[ i ] [ E_NAME ] );
TextDrawShowForPlayer( playerid, p_GPSInformation[ playerid ] ); PlayerTextDrawShow( playerid, p_GPSInformation[ playerid ] );
break; break;
} }
x++; x++;
@ -19937,7 +19937,7 @@ function gps_Update( playerid )
KillTimer( p_GPSTimer[ playerid ] ); KillTimer( p_GPSTimer[ playerid ] );
p_GPSTimer[ playerid ] = 0xFF; p_GPSTimer[ playerid ] = 0xFF;
p_GPSObject[ playerid ] = INVALID_OBJECT_ID; p_GPSObject[ playerid ] = INVALID_OBJECT_ID;
TextDrawHideForPlayer( playerid, p_GPSInformation[ playerid ] ); PlayerTextDrawHide( playerid, p_GPSInformation[ playerid ] );
SendServerMessage( playerid, "You have de-activated your GPS." ); SendServerMessage( playerid, "You have de-activated your GPS." );
return 0; return 0;
} }
@ -19948,7 +19948,7 @@ function gps_Update( playerid )
; ;
pos = GetPlayerDistanceFromPoint( playerid, g_gpsData[ p_GPSLocation[ playerid ] ] [ E_X ], g_gpsData[ p_GPSLocation[ playerid ] ] [ E_Y ], g_gpsData[ p_GPSLocation[ playerid ] ] [ E_Z ]); pos = GetPlayerDistanceFromPoint( playerid, g_gpsData[ p_GPSLocation[ playerid ] ] [ E_X ], g_gpsData[ p_GPSLocation[ playerid ] ] [ E_Y ], g_gpsData[ p_GPSLocation[ playerid ] ] [ E_Z ]);
format( string, sizeof( string ), "~g~Location:~w~ %s~n~~g~Distance:~w~ %0.2fm", g_gpsData[ p_GPSLocation[ playerid ] ] [ E_NAME ], pos ); format( string, sizeof( string ), "~g~Location:~w~ %s~n~~g~Distance:~w~ %0.2fm", g_gpsData[ p_GPSLocation[ playerid ] ] [ E_NAME ], pos );
TextDrawSetString( p_GPSInformation[ playerid ], string ); PlayerTextDrawSetString( playerid, p_GPSInformation[ playerid ], string );
v = GetPlayerVehicleID( playerid ); v = GetPlayerVehicleID( playerid );
GetVehiclePos( v, X, Y, Z ); GetVehiclePos( v, X, Y, Z );
GetVehicleZAngle( v, fAZ ); GetVehicleZAngle( v, fAZ );
@ -23174,8 +23174,8 @@ stock ShowAchievement( playerid, achievement[ ], score = -1 )
} }
KillTimer( p_AchievementTimer[ playerid ] ); KillTimer( p_AchievementTimer[ playerid ] );
p_AchievementTimer[ playerid ] = 0xFF; p_AchievementTimer[ playerid ] = 0xFF;
TextDrawSetString( p_AchievementTD[ playerid ], achievement ); PlayerTextDrawSetString( playerid, p_AchievementTD[ playerid ], achievement );
TextDrawShowForPlayer( playerid, p_AchievementTD[ playerid ] ); PlayerTextDrawShow( playerid, p_AchievementTD[ playerid ] );
TextDrawShowForPlayer( playerid, g_AchievementTD[ 0 ] ); TextDrawShowForPlayer( playerid, g_AchievementTD[ 0 ] );
TextDrawShowForPlayer( playerid, g_AchievementTD[ 1 ] ); TextDrawShowForPlayer( playerid, g_AchievementTD[ 1 ] );
TextDrawShowForPlayer( playerid, g_AchievementTD[ 2 ] ); TextDrawShowForPlayer( playerid, g_AchievementTD[ 2 ] );
@ -23185,7 +23185,7 @@ stock ShowAchievement( playerid, achievement[ ], score = -1 )
} }
function Achievement_Hide( playerid ) { function Achievement_Hide( playerid ) {
TextDrawHideForPlayer( playerid, p_AchievementTD[ playerid ] ); PlayerTextDrawHide( playerid, p_AchievementTD[ playerid ] );
TextDrawHideForPlayer( playerid, g_AchievementTD[ 0 ] ); TextDrawHideForPlayer( playerid, g_AchievementTD[ 0 ] );
TextDrawHideForPlayer( playerid, g_AchievementTD[ 1 ] ); TextDrawHideForPlayer( playerid, g_AchievementTD[ 1 ] );
TextDrawHideForPlayer( playerid, g_AchievementTD[ 2 ] ); TextDrawHideForPlayer( playerid, g_AchievementTD[ 2 ] );
@ -24108,8 +24108,8 @@ stock ShowPlayerHelpDialog( playerid, timeout, format[ ], va_args<> )
va_format( out, sizeof( out ), format, va_start<3> ); va_format( out, sizeof( out ), format, va_start<3> );
TextDrawSetString( p_HelpBoxTD[ playerid ], out ); PlayerTextDrawSetString( playerid, p_HelpBoxTD[ playerid ], out );
TextDrawShowForPlayer( playerid, p_HelpBoxTD[ playerid ] ); PlayerTextDrawShow( playerid, p_HelpBoxTD[ playerid ] );
KillTimer( p_HideHelpDialogTimer[ playerid ] ); KillTimer( p_HideHelpDialogTimer[ playerid ] );
@ -24122,7 +24122,7 @@ stock ShowPlayerHelpDialog( playerid, timeout, format[ ], va_args<> )
function HidePlayerHelpDialog( playerid ) function HidePlayerHelpDialog( playerid )
{ {
p_HideHelpDialogTimer[ playerid ] = 0xFFFF; p_HideHelpDialogTimer[ playerid ] = 0xFFFF;
TextDrawHideForPlayer( playerid, p_HelpBoxTD[ playerid ] ); PlayerTextDrawHide( playerid, p_HelpBoxTD[ playerid ] );
} }
stock fix_NightThermalVisionHack( playerid ) // Created by wups stock fix_NightThermalVisionHack( playerid ) // Created by wups

View File

@ -1,4 +1,5 @@
(+) Adds pool system minigame, like in singleplayer. (+) Adds pool system minigame, like in singleplayer.
(+) Adds pilot minijob, accessible using pilot in specific plane models.
(+) Adds "/p" to be able to chat inside the paintball lobby (+) Adds "/p" to be able to chat inside the paintball lobby
(+) Adds "/b production" to see what the status of your business production is. (+) Adds "/b production" to see what the status of your business production is.
(+) Adds "/reconnectchuff" for level 5 administrators. (+) Adds "/reconnectchuff" for level 5 administrators.