Hi
ich habe das Problem dass manchmal einfach der Textdraw nicht mehr angezeigt wird.
So nach 10 Stunden Serverlaufzeit, werden einfach alle Textdraws, egal welche Uhr, Tacho, etc ausgeblendet.
Hier sind ein paar Codes:
new Text: pTank[MAX_PLAYERS];
public OnGameModeExit()
{
//TextDrawDestroy(Date);
//TextDrawDestroy(Clock);
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
TextDrawDestroy(pTank[i]);
TextDrawDestroy(LoginText[i]);
TextDrawDestroy(RegisterText[i]);
}
}
return 1;
}
public OnPlayerDisconnect(playerid,reason)
{
TextDrawHideForPlayer(playerid,pTank[playerid]);
TextDrawHideForPlayer(playerid,LoginText[playerid]);
TextDrawHideForPlayer(playerid,RegisterText[playerid]);
return 1;
}
Im allgemeinen timer der sich jede sek wiederholt:
format(msg, sizeof msg, "TACHO");
TextDrawSetString(pTank[i], msg);
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
pTank[playerid] = TextDrawCreate(200,350,"~w~loading");
TextDrawLetterSize(pTank[playerid], 0.5, 1.5);
TextDrawFont(pTank[playerid], 3);
TextDrawSetOutline(pTank[playerid], 2);
TextDrawShowForPlayer(playerid, pTank[playerid]);
OnPlayerMotorCall(playerid, GetPlayerVehicleID(playerid));