Hallo, mein Textdraw Updatet irgendwie nicht..
Hier mal Bischen Code:
new Text:Textdraw0;
new Text:Textdraw1;
OnGamemodeInit
for(new i = 0; i < MAX_PLAYERS; i++)
{
Textdraw0 = TextDrawCreate(499.000000, 106.000000, "Kills:");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, 255);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
Textdraw1 = TextDrawCreate(499.000000, 118.000000, "Deaths:");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, 255);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
}
SetTimer("UpdateTextDraws2",60001,true);
OnPlayerSpawn
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
OnPlayerDisconnect
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
OnPlayerDeatH
SetPVarInt(playerid,"Tode",GetPVarInt(playerid,"Tode") +1 );
SetPVarInt(killerid,"Kills",GetPVarInt(killerid,"Kills") +1);
stock AccountLaden(playerid)
{
new Playerdatei[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Playerdatei,sizeof(Playerdatei),"/Accounts/%s.ini",name);
Spieler[playerid][Level] = dini_Int(Playerdatei,"Level");
Spieler[playerid][Admin] = dini_Int(Playerdatei,"Admin");
Spieler[playerid][Tode] = dini_Int(Playerdatei,"Tode");
Spieler[playerid][Kills] = dini_Int(Playerdatei,"Kills");
SetPVarInt(playerid,"Eingeloggt",1);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
return 1;
}
stock SpielerSpeichern(playerid)
{
if(GetPVarInt(playerid,"Eingeloggt") == 1)
{
new Playerdatei[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Playerdatei,sizeof(Playerdatei),"/Accounts/%s.ini",name);
dini_IntSet(Playerdatei,"Level", Spieler[playerid][Level]);
dini_IntSet(Playerdatei, "Admin", Spieler[playerid][Admin]);
dini_IntSet(Playerdatei, "Tode", Spieler[playerid][Tode]);
dini_IntSet(Playerdatei, "Kills",Spieler[playerid][Kills]);
}
}
forward UpdateTextDraws2(playerid);
public UpdateTextDraws2(playerid)
{
new string[128],string2[128];
format(string,sizeof(string),"Kills: %i",GetPVarInt(playerid,"Kills"));
format(string2,sizeof(string2),"Deaths: %i",GetPVarInt(playerid,"Tode"));
TextDrawSetString(Textdraw0,string);
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawSetString(Textdraw1,string2);
TextDrawShowForPlayer(playerid,Textdraw1);
}
Hoffe jemand kann mir Helfen....
#push