Guten Abend
Folgendes Problem
Ich wollte das dass geld auf dem server im Textdraw angezeigt wird allerdings bleibt es auf 0 stehen wenn ich denn wert in der datenbank ändere
new PlayerText:Money3[MAX_PLAYERS];
new PlayerText:Money[MAX_PLAYERS];
new PlayerText:Money2[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
PlayerTextDrawShow(playerid,Money3[playerid]);
PlayerTextDrawShow(playerid,Money[playerid]);
PlayerTextDrawShow(playerid,Money2[playerid]);
return 1;
}
public OnPlayerSpawn(playerid)
{
Money3[playerid] = CreatePlayerTextDraw(playerid,616.000000, 78.000000, "~n~~n~");
PlayerTextDrawBackgroundColor(playerid,Money3[playerid], 255);
PlayerTextDrawFont(playerid,Money3[playerid], 1);
PlayerTextDrawLetterSize(playerid,Money3[playerid], 0.800000, 1.200000);
PlayerTextDrawColor(playerid,Money3[playerid], -1);
PlayerTextDrawSetOutline(playerid,Money3[playerid], 0);
PlayerTextDrawSetProportional(playerid,Money3[playerid], 1);
PlayerTextDrawSetShadow(playerid,Money3[playerid], 1);
PlayerTextDrawUseBox(playerid,Money3[playerid], 1);
PlayerTextDrawBoxColor(playerid,Money3[playerid], -1);
PlayerTextDrawTextSize(playerid,Money3[playerid], 492.000000, 31.000000);
Money2[playerid] = CreatePlayerTextDraw(playerid,515,85.0,"0 Euro");
PlayerTextDrawLetterSize(playerid,Money2[playerid],0.299999,1.000000);
PlayerTextDrawColor(playerid,Money2[playerid],0xffffffff);
PlayerTextDrawFont(playerid,Money2[playerid],2);
Money[playerid] = CreatePlayerTextDraw(playerid,498,80.0,"~n~~n~");
PlayerTextDrawFont(playerid,Money[playerid],2);
PlayerTextDrawUseBox(playerid,Money[playerid],1);
PlayerTextDrawBoxColor(playerid,Money[playerid],0x000000FF);
PlayerTextDrawTextSize(playerid,Money[playerid],610.000000,150.000000);
PlayerTextDrawLetterSize(playerid,Money[playerid],0.299999,1.000000);
PlayerTextDrawColor(playerid,Money[playerid],0xffffffff);
PlayerTextDrawSetProportional(playerid,Money[playerid],1);
PlayerTextDrawShow(playerid,Money3[playerid]);
PlayerTextDrawShow(playerid,Money[playerid]);
PlayerTextDrawShow(playerid,Money2[playerid]);
return 1;
}
stock GivePlayerEuro(playerid,euros)
{
SetPVarInt(playerid,"Euros",GetPVarInt(playerid,"Euros")+euros);
new cashtext[64];
format(cashtext,64,"%d Euro",GetPVarInt(playerid,"Euros"));
PlayerTextDrawSetString(playerid,Money2[playerid],cashtext);
}
stock EnoughEuro(playerid,euros)
{
if(GetPVarInt(playerid,"Euros") > euros) return 1;
else if((GetPVarInt(playerid,"Euros") == euros)) return 1;
else return 0;
}
stock ResetPlayerEuro(playerid)
{
SetPVarInt(playerid,"Euros",0);
GivePlayerEuro(playerid,0);
}
stock GetPlayerEuros(playerid)
{
return GetPVarInt(playerid,"Euros");
}
stock SetPlayerEuro(playerid,euros)
{
SetPVarInt(playerid,"Euros",0);
GivePlayerEuro(playerid,euros);
}
Es kommen auch keine Error´s oder warning´s