Hallo Heute, Ich habe 3 Textdraws Erstellt .
Level:
Fraktion:
Job :
Funktioniert auch alles Aber wenn ich mich in eine Andere Frakion Setzt oder Ein Lvl Up bekomme Steht dort immernoch das alte.
Wie Behebe ich den Bug ? Bitte Hilft Mit
Meinen Code :
Oben im Script :
new Showing[MAX_PLAYERS];
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
OnPlayerSpawn:
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid,Textdraw1);
Textdraw1 = TextDrawCreate(483.000000, 10.000000, "Selfmade Recordz");
TextDrawBackgroundColor(Textdraw1, 65535);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
{
TextDrawShowForPlayer(playerid,Textdraw1);
Textdraw1 = TextDrawCreate(483.000000, 10.000000, "Selfmade Recordz");
TextDrawBackgroundColor(Textdraw1, 65535);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
new fraktname[500];
switch(GetPVarInt(playerid,"Fraktion"))
{
case 0:{fraktname="Keine";}
case 1:{fraktname=fraktname1;}
case 2:{fraktname=fraktname2;}
case 3:{fraktname=fraktname3;}
case 4:{fraktname=fraktname4;}
case 5:{fraktname=fraktname5;}
case 6:{fraktname=fraktname6;}
case 7:{fraktname=fraktname7;}
}
new ss[500];
format(ss,500,"Fraktion: %s",fraktname);
Textdraw2 = TextDrawCreate(5.000000, 309.000000, ss);
TextDrawBackgroundColor(Textdraw2, 65535);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);
switch(GetPVarInt(playerid,"Fraktion"))
{
case 0:{fraktname="Keine";}
case 1:{fraktname=fraktname1;}
case 2:{fraktname=fraktname2;}
case 3:{fraktname=fraktname3;}
case 4:{fraktname=fraktname4;}
case 5:{fraktname=fraktname5;}
case 6:{fraktname=fraktname6;}
case 7:{fraktname=fraktname7;}
}
new ss[500];
format(ss,500,"Fraktion: %s",fraktname);
Textdraw2 = TextDrawCreate(5.000000, 309.000000, ss);
TextDrawBackgroundColor(Textdraw2, 65535);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);
new s[50];
format(s,50,"Level: %d",GetPlayerScore(playerid));
Textdraw3 = TextDrawCreate(4.000000, 294.000000, s);
TextDrawBackgroundColor(Textdraw3, 65535);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.500000, 1.000000);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 1);
TextDrawSetProportional(Textdraw3, 1);
format(s,50,"Level: %d",GetPlayerScore(playerid));
Textdraw3 = TextDrawCreate(4.000000, 294.000000, s);
TextDrawBackgroundColor(Textdraw3, 65535);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.500000, 1.000000);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 1);
TextDrawSetProportional(Textdraw3, 1);
new jobname[500];
switch(GetPVarInt(playerid,"Job"))
{
case 0:{jobname="Arbeitslos";}
case 1:{jobname=jobname1;}
case 2:{jobname=jobname2;}
case 3:{jobname=jobname3;}
}
new ssss[500];
format(ssss,500,"Job: %s",jobname);
Textdraw4 = TextDrawCreate(6.000000, 325.000000, ssss);
TextDrawBackgroundColor(Textdraw4, 65535);
TextDrawFont(Textdraw4, 1);
TextDrawLetterSize(Textdraw4, 0.500000, 1.000000);
TextDrawColor(Textdraw4, -1);
TextDrawSetOutline(Textdraw4, 1);
TextDrawSetProportional(Textdraw4, 1);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
TextDrawShowForPlayer(i, Textdraw1);
TextDrawShowForPlayer(i, Textdraw2);
TextDrawShowForPlayer(i, Textdraw3);
TextDrawShowForPlayer(i, Textdraw4);
}
}
switch(GetPVarInt(playerid,"Job"))
{
case 0:{jobname="Arbeitslos";}
case 1:{jobname=jobname1;}
case 2:{jobname=jobname2;}
case 3:{jobname=jobname3;}
}
new ssss[500];
format(ssss,500,"Job: %s",jobname);
Textdraw4 = TextDrawCreate(6.000000, 325.000000, ssss);
TextDrawBackgroundColor(Textdraw4, 65535);
TextDrawFont(Textdraw4, 1);
TextDrawLetterSize(Textdraw4, 0.500000, 1.000000);
TextDrawColor(Textdraw4, -1);
TextDrawSetOutline(Textdraw4, 1);
TextDrawSetProportional(Textdraw4, 1);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
TextDrawShowForPlayer(i, Textdraw1);
TextDrawShowForPlayer(i, Textdraw2);
TextDrawShowForPlayer(i, Textdraw3);
TextDrawShowForPlayer(i, Textdraw4);
}
}
Befehl zum Aus/anschalten der Infos :
ocmd:info(playerid,params[])
{
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
SendClientMessage(playerid,ROT,"Informationsleiste Ausgeschaltet, Anschalten mit /infoan!");
return 1;
}
ocmd:infoan(playerid,params[])
{
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4);
SendClientMessage(playerid,ROT,"Informationsleiste Angeschaltet, Ausschalten mit /info!");
return 1;
}
{
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
SendClientMessage(playerid,ROT,"Informationsleiste Ausgeschaltet, Anschalten mit /infoan!");
return 1;
}
ocmd:infoan(playerid,params[])
{
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4);
SendClientMessage(playerid,ROT,"Informationsleiste Angeschaltet, Ausschalten mit /info!");
return 1;
}