GTAOnline.net
San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: Xolokos le 27 Décembre 2010, 13:45:47
-
Salut alors j'ai fait des TextDraw dans la callback onplayerspawn suivant le score mais malheureusement je me rend compte que par exemple le score est a 50 il a Major Général en bas a droite et ensuite son score passe a 70 il est Général la il a les 2 TextDraw afficher ensemble comment remédier a cela ?
-
salut
tu detruit le 1er avec TextDrawDestroy
http://wiki.sa-mp.com/wiki/TextDrawDestroy (http://wiki.sa-mp.com/wiki/TextDrawDestroy)
Une petite recherche sur le wiki ne fait pas de mal.
++ brian
-
Ben j'ai fait ça regarde
if ( scores >= 50 && scores <= 99 )
{
pRang[playerid] = RECRUE;
new Text:texta = TextDrawCreate(450.0, 425.0,"~g~Recrue");
TextDrawUseBox(texta, 0);
TextDrawFont(texta, 0);
TextDrawSetShadow(texta,1);
TextDrawSetOutline(texta,1);
TextDrawBackgroundColor(texta,0x000000FF);
TextDrawColor(texta,0xFFFFFFFF);
TextDrawShowForPlayer(playerid, texta);
}
else if ( scores >= 100 && scores <= 149 )
{
pRang[playerid] = CORPORAL;
new Text:textb = TextDrawCreate(450.0, 425.0,"~g~Corporal");
TextDrawUseBox(textb, 0);
TextDrawFont(textb, 0);
TextDrawSetShadow(textb,1);
TextDrawSetOutline(textb,1);
TextDrawBackgroundColor(textb,0x000000FF);
TextDrawColor(textb,0xFFFFFFFF);
TextDrawShowForPlayer(playerid, textb);
TextDrawDestroy(texta,playerid);
}
Et il me dit
J:\[FR] Projet's MW2\gamemodes\[FR]MW2(2).pwn(578) : error 017: undefined symbol "texta"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Alors qu'il est definie en haut ?
-
normale tes new Text:texta et new Text:textb doivent etre placer en haut du script ;)
apres tu fera pour to, texta: texta = TextDrawCreate(450.0, 425.0,"~g~Recrue");
pour le b: textb = TextDrawCreate(450.0, 425.0,"~g~Corporal");