Hallo,
dieser kleine Code will nicht so recht funktionieren. Fehler entdecke ich grundsätzlich keine. Ich habe die Parameterreihenfolge beachtet. Was mache ich falsch?
stock GivePlayerMoneyEx(playerid, money)
{
new mstring[15];
if(money > 0) format(mstring, sizeof(mstring), "~g~+%d$", money);
if(money < 0) format(mstring, sizeof(mstring), "~r~%d$", money);
TextDrawSetString(MoneyTD[playerid], mstring); //Tag Mismatch. <================
TextDrawShowForPlayer(playerid, MoneyTD[playerid]); //Tag Mismatch. <================
GivePlayerMoney(playerid, money);
SetTimerEx("MoneyTD_Timer", 3000, false, "i", playerid);
return 1;
}
forward MoneyTD_Timer(playerid);
public MoneyTD_Timer(playerid)
{
TextDrawHideForPlayer(playerid, MoneyTD[playerid]); //Tag Mismatch. <================
return 1;
}
new PlayerText:MoneyTD[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
MoneyTD[playerid] = CreatePlayerTextDraw(playerid, 496.000122, 81.303695, "+1000$");
PlayerTextDrawLetterSize(playerid, MoneyTD[playerid], 0.326666, 1.371852);
PlayerTextDrawAlignment(playerid, MoneyTD[playerid], 3);
PlayerTextDrawColor(playerid, MoneyTD[playerid], -1);
PlayerTextDrawSetShadow(playerid, MoneyTD[playerid], 0);
PlayerTextDrawSetOutline(playerid, MoneyTD[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, MoneyTD[playerid], 51);
PlayerTextDrawFont(playerid, MoneyTD[playerid], 3);
PlayerTextDrawSetProportional(playerid, MoneyTD[playerid], 1);
return TD_OnPlayerConnect(playerid);
}
Danke schonmal im voraus für eure Hilfe!