Help to fix textdrow
#1

Hi i have a new bug with when players like over 10 textdrow in server hide and not show until server restart for example textdrow for odometer or jail time and ... how can i fix this?
Reply
#2

hm

show where you create the textdraw
Reply
#3

Quote:
Originally Posted by justjamie
Посмотреть сообщение
hm

show where you create the textdraw
I have make them some on
OnPlayerConnect
and some on
OnPlayerLogin
Reply
#4

Quote:
Originally Posted by keyvanik
Посмотреть сообщение
I have make them some on
OnPlayerConnect
and some on
OnPlayerLogin
ok so show us your OnPlayerConnect and your OnPlayerLogin
Reply
#5

Quote:
Originally Posted by justjamie
Посмотреть сообщение
ok so show us your OnPlayerConnect and your OnPlayerLogin
PHP код:
    public OnPlayerLogin(playerid)
{
    if(
IsPlayerConnected(playerid))
/*----------------------------------------------------------------------------*/
    
FuelTextDraw[playerid] = TextDrawCreate(532.000000250.000000"Fuel: %");
    
TextDrawAlignment(FuelTextDraw[playerid], 1);
    
TextDrawBackgroundColor(FuelTextDraw[playerid], 255);
    
TextDrawFont(FuelTextDraw[playerid], 2);
    
TextDrawLetterSize(FuelTextDraw[playerid], 0.2000001.200000);
    
TextDrawColor(FuelTextDraw[playerid], -1);
    
TextDrawSetOutline(FuelTextDraw[playerid], 1);
    
TextDrawSetProportional(FuelTextDraw[playerid], 1);
    
TextDrawSetShadow(FuelTextDraw[playerid], 1);
    
/*----------------------------------------------------------------------------*/
    
JailTextDraw[playerid] = TextDrawCreate(480.000000400.000000"");
    
TextDrawAlignment(JailTextDraw[playerid], 1);
    
TextDrawBackgroundColor(JailTextDraw[playerid], 255);
    
TextDrawFont(JailTextDraw[playerid], 2);
    
TextDrawLetterSize(JailTextDraw[playerid], 0.2500001.200000);
    
TextDrawColor(JailTextDraw[playerid], -1);
    
TextDrawSetOutline(JailTextDraw[playerid], 1);
    
TextDrawSetProportional(JailTextDraw[playerid], 1);
    
TextDrawSetSelectable(JailTextDraw[playerid], 0);
    
TextDrawSetShadow(JailTextDraw[playerid], 1);
    
/*----------------------------------------------------------------------------*/
    
KiloTextDraw[playerid] = TextDrawCreate(532.000000270.000000"Kilometer: Km");
    
TextDrawAlignment(KiloTextDraw[playerid], 1);
    
TextDrawBackgroundColor(KiloTextDraw[playerid], 255);
    
TextDrawFont(KiloTextDraw[playerid],2);
    
TextDrawLetterSize(KiloTextDraw[playerid], 0.2000001.200000);
    
TextDrawColor(KiloTextDraw[playerid], -1);
    
TextDrawSetOutline(KiloTextDraw[playerid], 1);
    
TextDrawSetProportional(KiloTextDraw[playerid], 1);
    
TextDrawSetShadow(KiloTextDraw[playerid], 1);
    
TextDrawSetSelectable(KiloTextDraw[playerid], 0);
    
/*----------------------------------------------------------------------------*/
    
ExamTD[playerid] = TextDrawCreate(532.000000270.000000"1/40");
    
TextDrawLetterSize(ExamTD[playerid], 0.2000001.200000);
    
TextDrawAlignment(ExamTD[playerid], 1);
    
TextDrawColor(ExamTD[playerid], -1);
    
TextDrawSetShadow(ExamTD[playerid], 1);
    
TextDrawSetOutline(ExamTD[playerid], 1);
    
TextDrawBackgroundColor(ExamTD[playerid], 255);
    
TextDrawFont(ExamTD[playerid], 2);
    
TextDrawSetProportional(ExamTD[playerid], 1);
    return 
1;

PHP код:
public OnPlayerConnect(playerid)
{
    
/*----------------------------------------------------------------------------*/
    
SpeedoTextDraw[playerid] = TextDrawCreate(532.000000260.000000"Speed: 0 Km/h");
    
TextDrawAlignment(SpeedoTextDraw[playerid], 1);
    
TextDrawBackgroundColor(SpeedoTextDraw[playerid], 255);
    
TextDrawFont(SpeedoTextDraw[playerid], 2);
    
TextDrawLetterSize(SpeedoTextDraw[playerid], 0.2000001.200000);
    
TextDrawColor(SpeedoTextDraw[playerid], -1);
    
TextDrawSetOutline(SpeedoTextDraw[playerid], 1);
    
TextDrawSetProportional(SpeedoTextDraw[playerid], 1);
    
TextDrawSetShadow(SpeedoTextDraw[playerid], 1);
    return 
1;
}
this is my textdrow codes 
Reply
#6

Quote:

Hi i have a new bug with when players like over 10 textdrow in server hide and not show until server restart for example textdrow for odometer or jail time and ... how can i fix this?

elaborate
Reply
#7

Don't create (show) speed, fuel and other changeable vehicle's information with TextDrawCreate (TextDrawShowForPlayer), because it will show nonsense for other players (one player can see other player vehicle's information). Instead of these functions (only for steady information), use CreatePlayerTextdraw (PlayerTextDrawShow) (for changeable information).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)