Hay Leute,
Mein letztes Problem war,dass ich kein Text auf den TextDraw raufgekriegt habe.Das geht jetzt alles einwandfrei,dass Problem ist nur ,dass ich z.B das Geld mit dem Integer %i anzeigen lassen möchte.
Es wird auch angezeigt,allerdings steht überall eine "1",wo z.B für das Geld 500 sein müsste.Also InGame bei Level,Geld,Adminlevel,Skin ,einfach überall auf dem TextDraw.Falls ihr dazu noch'nen Screenshot braucht,sagt bescheid
Hier mal ein bisschen Code [VARIABELN meiner Statsbox!]
-> Ich denke mal ,die Variabeln etc. sind nicht nötig,da es ja eig. am laden bzw. setzten liegen muss ...
Bei "OnPlayerConnect",habe ich das Laden bzw. setzen des Strings mal hingepackt ....
////////////////////////////////////////////
new strLevelDraw[64]; /* LEVEL */
format(strLevelDraw,sizeof(strLevelDraw),"Level: %i",SetPlayerScore(playerid,dini_Int(accFormat,"level")));
TextDrawSetString(LevelDraw,strLevelDraw);
////////////////////////////////////////////
new strGeldDraw[64]; /* GELD */
format(strGeldDraw,sizeof(strGeldDraw),"Geld: %i",GivePlayerMoney(playerid,dini_Int(accFormat,"geld")));
TextDrawSetString(GeldDraw,strGeldDraw);
////////////////////////////////////////////
new strSkinDraw[64]; /* SKIN */
format(strSkinDraw,sizeof(strSkinDraw),"Skin: %i",SetPlayerSkin(playerid,dini_Int(accFormat,"skin")));
TextDrawSetString(SkinDraw,strSkinDraw);
////////////////////////////////////////////
new strAdminrangDraw[64]; /* ADMIN */
format(strAdminrangDraw,sizeof(strAdminrangDraw),"Admin: %i",SetPVarInt(playerid,"Adminlevel",dini_Int(accFormat,"Adminlevel")));
TextDrawSetString(AdminrangDraw,strAdminrangDraw);
////////////////////////////////////////////
new strPremiumrangDraw[64]; /* PREMIUM */
format(strPremiumrangDraw,sizeof(strPremiumrangDraw),"Premium: %i",SetPVarInt(playerid,"PRang",dini_Int(accFormat,"PRang")));
TextDrawSetString(PremiumrangDraw,strPremiumrangDraw);
////////////////////////////////////////////
new strKDraw[64]; /* KD -DRAW */
format(strKDraw,sizeof(strKDraw),"K/D: %i/%i",SetPVarInt(playerid,"Kills",dini_Int(accFormat,"Kills")),SetPVarInt(playerid,"Tode",dini_Int(accFormat,"Tode")));
TextDrawSetString(KDraw,strKDraw);
////////////////////////////////////////////
und der Befehl,welcher auch einwandfrei funktioniert ...
ocmd:stats(playerid)
{
if(GetPVarInt(playerid,"statsdraw") == 0)
{
TextDrawShowForPlayer(playerid,LevelDraw);
TextDrawShowForPlayer(playerid,StatistikenDraw);
TextDrawShowForPlayer(playerid,Linie1);
TextDrawShowForPlayer(playerid,GeldDraw);
TextDrawShowForPlayer(playerid,SkinDraw);
TextDrawShowForPlayer(playerid,Linie2);
TextDrawShowForPlayer(playerid,AdminrangDraw);
TextDrawShowForPlayer(playerid,PremiumrangDraw);
TextDrawShowForPlayer(playerid,Linie3);
TextDrawShowForPlayer(playerid,KDraw);
TextDrawShowForPlayer(playerid,statsbox); // Box
SetPVarInt(playerid,"statsdraw",1);
}
else if(GetPVarInt(playerid,"statsdraw") == 1)
{
TextDrawHideForPlayer(playerid,LevelDraw);
TextDrawHideForPlayer(playerid,StatistikenDraw);
TextDrawHideForPlayer(playerid,Linie1);
TextDrawHideForPlayer(playerid,GeldDraw);
TextDrawHideForPlayer(playerid,SkinDraw);
TextDrawHideForPlayer(playerid,Linie2);
TextDrawHideForPlayer(playerid,AdminrangDraw);
TextDrawHideForPlayer(playerid,PremiumrangDraw);
TextDrawHideForPlayer(playerid,Linie3);
TextDrawHideForPlayer(playerid,KDraw);
TextDrawHideForPlayer(playerid,statsbox); // Box
SetPVarInt(playerid,"statsdraw",0);
}
return 1;
}
-mfg.