В OnPlayerConnect:
TextDrawHideForPlayer(playerid,Box);
TextDrawHideForPlayer(playerid,Speed);
TextDrawHideForPlayer(playerid,SpeedShow[playerid]);
TextDrawHideForPlayer(playerid,Fuel);
TextDrawHideForPlayer(playerid,FuelShow[playerid]);
TextDrawHideForPlayer(playerid,Status);
TextDrawHideForPlayer(playerid,StatusShow[playerid]);
TextDrawHideForPlayer(playerid,KMShow);
TextDrawShowForPlayer(playerid,URL);
TextDrawHideForPlayer(playerid, Box);
SpeedShow[playerid] = TextDrawCreate(355.000000,400.000000,"0"); //сам Text Draw km/h
TextDrawBackgroundColor(SpeedShow[playerid],COLOR_BLACK);//обводка текста
TextDrawLetterSize(SpeedShow[playerid],0.399999,2.010000);//размер текста
TextDrawFont(SpeedShow[playerid],3);//стиль
TextDrawColor(SpeedShow[playerid],COLOR_CLUB);//цвет текста
TextDrawSetOutline(SpeedShow[playerid],1);//размер обводки
TextDrawSetProportional(SpeedShow[playerid],1);
TextDrawSetShadow(SpeedShow[playerid],1);//тень
StatusShow[playerid] = TextDrawCreate(425.000000,420.000000, "_");//сам Text Draw Status
TextDrawBackgroundColor(StatusShow[playerid], COLOR_BLACK);//обводка текста
TextDrawLetterSize(StatusShow[playerid],0.399999,1.010000);//размер текста
TextDrawFont(StatusShow[playerid], 1);//стиль
TextDrawColor(StatusShow[playerid], COLOR_GREEN);//цвет текста
TextDrawSetOutline(StatusShow[playerid], 1);//размер обводки
TextDrawSetProportional(StatusShow[playerid],1);
TextDrawSetShadow(StatusShow[playerid],1);//тень
FuelShow[playerid] = TextDrawCreate(425.000000,390.000000, "_");//сам Text Draw fuel
TextDrawBackgroundColor(FuelShow[playerid], COLOR_BLACK);//обводка текста
TextDrawLetterSize(FuelShow[playerid],0.399999,1.010000);//размер текста
TextDrawFont(FuelShow[playerid], 1);//стиль
TextDrawColor(FuelShow[playerid], COLOR_RED);//цвет текста
TextDrawSetOutline(FuelShow[playerid], 1);//размер обводки
TextDrawSetProportional(FuelShow[playerid],1);
TextDrawSetShadow(FuelShow[playerid],1);//тень
В OnPlayerDisconnect:
TextDrawDestroy(SpeedShow[playerid]);
TextDrawDestroy(FuelShow[playerid]);
TextDrawDestroy(StatusShow[playerid]);
При спавне:
TextDrawHideForPlayer(playerid,Box);
TextDrawHideForPlayer(playerid,Speed);
TextDrawHideForPlayer(playerid,SpeedShow[playerid]);
TextDrawHideForPlayer(playerid,Fuel);
TextDrawHideForPlayer(playerid,FuelShow[playerid]);
TextDrawHideForPlayer(playerid,Status);
TextDrawHideForPlayer(playerid,StatusShow[playerid]);
TextDrawHideForPlayer(playerid,KMShow);
В OnPlayerStateChange:
if(oldstate == PLAYER_STATE_DRIVER)
{
TextDrawHideForPlayer(playerid,Box);
TextDrawHideForPlayer(playerid,Speed);
TextDrawHideForPlayer(playerid,SpeedShow[playerid]);
TextDrawHideForPlayer(playerid,Fuel);
TextDrawHideForPlayer(playerid,FuelShow[playerid]);
TextDrawHideForPlayer(playerid,Status);
TextDrawHideForPlayer(playerid,StatusShow[playerid]);
TextDrawHideForPlayer(playerid,KMShow);
}
if(newstate == PLAYER_STATE_DRIVER)
{
TextDrawShowForPlayer(playerid,Box);
TextDrawShowForPlayer(playerid,Speed);
TextDrawShowForPlayer(playerid,SpeedShow[playerid]);
TextDrawShowForPlayer(playerid,Fuel);
TextDrawShowForPlayer(playerid,FuelShow[playerid]);
TextDrawShowForPlayer(playerid,Status);
TextDrawShowForPlayer(playerid,StatusShow[playerid]);
TextDrawShowForPlayer(playerid,KMShow);
}
При коннекте ты скрываешь несуществующий текстдрав, поэтому они создаются друг на друге.
|
При коннекте ты скрываешь несуществующий текстдрав, поэтому они создаются друг на друге.
|