• 07 Juillet 2025, 15:10:20


Auteur Sujet: Probleme textdraw Stats joueur qui s'affiche a moitier  (Lu 681 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne scott1

  • *
  • Gangster
  • Messages: 1440
    • Voir le profil
Bonjour à toutes et a tous, j'ai un soucis avec un carrer avec les stats des joueurs en textdraw que j'ai créé.

Voila le code

J'ai mis tout les new et forward nécessaires.


Dans le OnGameModeInit

INFO = SetTimer("Info",1000,1);
public Info()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && Inf[i] == 1 && gPlayerLogged[i] != 0)
{
new tmp[265], couleur1[2], couleur2[2], couleur3[2], couleur4[2];
new argent = GetPlayerMoney(i);
new pourcent = 100;
    new soif = PlayerInfo[i][pSoif]*pourcent/180;
    new faim = PlayerInfo[i][pAp]*pourcent/240;
    new fatigue = PlayerInfo[i][pDormir]*pourcent/950;
    new pipi = PlayerInfo[i][pBesoin]*pourcent/60;
    if(soif < 51) { couleur1 = "g"; } else if(soif >= 51 && soif < 81) { couleur1 = "y"; } else if(soif >= 81) { couleur1 = "r"; }
    if(faim < 51) { couleur2 = "g"; } else if(faim >= 51 && faim < 81) { couleur2 = "y"; } else if(faim >= 81) { couleur2 = "r"; }
    if(fatigue < 51) { couleur3 = "g"; } else if(fatigue >= 51 && fatigue < 81) { couleur3 = "y"; } else if(fatigue >= 81) { couleur3 = "r"; }
    if(pipi < 51) { couleur4 = "g"; } else if(pipi >= 51 && pipi < 81) { couleur4 = "y"; } else if(pipi >= 81) { couleur4 = "r"; }
if(BilgiGosterge[i] == true)
{

TextDrawHideForPlayer(i, Text:Fondcarrerstats);
TextDrawDestroy(Bilgi[i]);
}
format(tmp, sizeof(tmp), "~b~Argent~w~: %d~g~$~n~~b~Soif~w~:    ~%s~%d~w~%%~n~~b~Faim~w~:   ~%s~%d~w~%%~n~~b~Pipi~w~:     ~%s~%d~w~%%~n~~b~Fatigue~w~: ~%s~%d~w~%%", argent,couleur1,soif,couleur2,faim,couleur4,pipi,couleur3,fatigue);

            Bilgi[i] = TextDrawCreate(526.000000, 387.000000,tmp);
            TextDrawAlignment(Bilgi[i],0);
TextDrawBackgroundColor(Bilgi[i],0x000000ff);
TextDrawFont(Bilgi[i],1);
TextDrawLetterSize(Bilgi[i],0.299999,1.000000);
TextDrawColor(Bilgi[i],0x00ffffff);
TextDrawSetProportional(Bilgi[i],1);
TextDrawSetShadow(Bilgi[i],1);
  TextDrawShowForPlayer(i, Bilgi[i]);
  TextDrawSetOutline(Bilgi[i], 1);

    TextDrawShowForPlayer(i, Text:Fondcarrerstats);
            BilgiGosterge[i] = true;
           
}
else
{
    if(BilgiGosterge[i] == true)
{

TextDrawHideForPlayer(i, Text:Fondcarrerstats);
TextDrawDestroy(Bilgi[i]);
}
}
}
}

Le soucis s'est que des fois, pour certain joueur, quand la texdraw s'actualise, seul le fond, (( Fondcarrerstats )), s'affiche, donc j'ai le fond mais pas le texte.

:s

Merci d'avance
Refait un Game mode a partir d'une page blanche



Mes partages:

Systeme de Radio avec Frequence Création

Ajouter des véhicule dans le LARP - Godfather Tuto

Anti Cheat "JunkBuster" traduit en FR Traduction

LARP Traduit FR, V0.3 Traduction