Guten Tag liebe Community,
Ich habe einen Textdraw erstellt,womit man die Statistiken [Stats] sehen kann,naja solte .... Das Problem ist,die box wird mit einver verlängerung angezeigt und der Inhalt ,also "Geld,Level,Name" gar nicht.
Ich denke mal es liegt am "TextDrawSetString",aber ich hab keine Ahnung,bitte um Hilfe !
oben im Script
new Text:statsbox;
bei OnGameModeInit // ab hier spackt der pwn Code
statsbox = TextDrawCreate(640.125000, 153.750000, "usebox");
TextDrawLetterSize(statsbox, 0.000000, 20.424076);
TextDrawTextSize(statsbox, 549.875000, 0.000000);
TextDrawAlignment(statsbox, 1);
TextDrawColor(statsbox, 0);
TextDrawUseBox(statsbox, true);
TextDrawBoxColor(statsbox, 102);
TextDrawSetShadow(statsbox, 0);
TextDrawSetOutline(statsbox, 0); TextDrawFont(statsbox, 0);
TextDrawLetterSize(statsbox, 0.000000, 20.424076);
TextDrawTextSize(statsbox, 549.875000, 0.000000);
TextDrawAlignment(statsbox, 1);
TextDrawColor(statsbox, 0);
TextDrawUseBox(statsbox, true);
TextDrawBoxColor(statsbox, 102);
TextDrawSetShadow(statsbox, 0);
TextDrawSetOutline(statsbox, 0); TextDrawFont(statsbox, 0);
und hier der Befehl via ocmd
ocmd:stats(playerid)
{
if(GetPVarInt(playerid,"stats") == 0)
{
new str[128];
format(str,sizeof(str),"Name %s\nLevel %i\nGeld %i",SpielerName(playerid),GetPlayerScore(playerid),GetPlayerMoney(playerid));
TextDrawSetString(statsbox,str);
TextDrawShowForPlayer(playerid,statsbox);
SetPVarInt(playerid,"stats",1);
}
else if(GetPVarInt(playerid,"stats") == 1)
{
TextDrawDestroy(statsbox);
SetPVarInt(playerid,"stats",0);
}
return 1;}
{
if(GetPVarInt(playerid,"stats") == 0)
{
new str[128];
format(str,sizeof(str),"Name %s\nLevel %i\nGeld %i",SpielerName(playerid),GetPlayerScore(playerid),GetPlayerMoney(playerid));
TextDrawSetString(statsbox,str);
TextDrawShowForPlayer(playerid,statsbox);
SetPVarInt(playerid,"stats",1);
}
else if(GetPVarInt(playerid,"stats") == 1)
{
TextDrawDestroy(statsbox);
SetPVarInt(playerid,"stats",0);
}
return 1;}
- mfg.