Textdraws disappears - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Textdraws disappears (
/showthread.php?tid=442286)
Textdraws disappears -
Danyels - 06.06.2013
Hi, i have a problem with textraws for players [MAX_PLAYERS] . don't work, or if are working, it's disappear after a while. were it's the problem? i tried many filterscripts, i have included in gamemode but don't working good.
Re: Textdraws disappears -
OpticKiller - 06.06.2013
mind showing the code. also did you add textdrawshowforplayer
Re: Textdraws disappears -
Pottus - 06.06.2013
The problem is you didn't even post any code of the problem.
Re: Textdraws disappears -
Danyels - 08.06.2013
the fuel bar dissapear too.
Код:
public OnPlayerUpdate(playerid)
{
new
Float:fPos[3],
Float:Pos[4][2],
Float:fSpeed;
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
GetVehicleVelocity(GetPlayerVehicleID(playerid), fPos[0], fPos[1], fPos[2]);
fSpeed = floatsqroot(floatpower(fPos[0], 2) + floatpower(fPos[1], 2) +
floatpower(fPos[2], 2)) * 200;
new Float:alpha = 320 - fSpeed;
if(alpha < 60)
alpha = 60;
for(new i; i < 4; i++)
{
TextDrawHideForPlayer(playerid, TextDrawsd[playerid][i]);
TextDrawDestroy(TextDrawsd[playerid][i]);
GetDotXY(548, 401, Pos[i][0], Pos[i][1], alpha, (i + 1) * 8);
TextDrawsd[playerid][i] = TextDrawCreate(Pos[i][0], Pos[i][1], "~b~.");
TextDrawLetterSize(TextDrawsd[playerid][i], 0.73, -2.60);
TextDrawSetOutline(TextDrawsd[playerid][i], 0);
TextDrawSetShadow(TextDrawsd[playerid][i], 1);
TextDrawShowForPlayer(playerid, TextDrawsd[playerid][i]);
}
new szString[128];
TextDrawHideForPlayer(playerid, GPSText[playerid]);
TextDrawDestroy(GPSText[playerid]);
format(szString, 128, "%s", GetPlayerArea(playerid));
GPSText[playerid] = TextDrawCreate(507.000000, 423.000000, szString);
TextDrawBackgroundColor(GPSText[playerid], 255);
TextDrawFont(GPSText[playerid], 1);
TextDrawLetterSize(GPSText[playerid], 0.320000, 1.500000);
TextDrawColor(GPSText[playerid], -16776961);
TextDrawSetOutline(GPSText[playerid], 0);
TextDrawSetProportional(GPSText[playerid], 1);
TextDrawSetShadow(GPSText[playerid], 1);
TextDrawShowForPlayer(playerid, GPSText[playerid]);
// Fuel
SetProgressBarValue(GasBar[playerid], Gas[GetPlayerVehicleID(playerid)]);
UpdateProgressBar(GasBar[playerid], playerid);
}
return 1;
}
Re: Textdraws disappears -
Danyels - 09.06.2013
Up, the problem can be the hight ping ?
Re: Textdraws disappears -
Stefand - 09.06.2013
....
Post them under "ON PLAYER CONNECT"
then they should work.
Re: Textdraws disappears -
Danyels - 12.06.2013
Quote:
Originally Posted by Stefand
....
Post them under "ON PLAYER CONNECT"
then they should work.
|
hmm
but i need a timer..
Re: Textdraws disappears -
ReVo_ - 12.06.2013
If a Textdraw disappear without a reason the cause can be a conflict of id.