Ich möchte gerne das immer wenn der Spieler Geld dazu oder abgezogen bekommt ein textdraw erscheint .
Jetzt hab ich nur das Problem das der Textdraw dem andern Spieler angezigt wird und mir selber nicht.
new Text:moneychange[MAX_PLAYERS];
new Text:moneychangenegative[MAX_PLAYERS];
public OnGameModeInit()
{
for( new x = 0;x<MAX_PLAYERS;x++)
{
moneychangenegative[x]= TextDrawCreate(497.000000, 98.000000, "");
TextDrawBackgroundColor(moneychangenegative[x], 255);
TextDrawFont(moneychangenegative[x], 2);
TextDrawLetterSize(moneychangenegative[x], 0.310000, 1.200000);
TextDrawColor(moneychangenegative[x], 0xFE0000FF);
TextDrawSetOutline(moneychangenegative[x], 1);
TextDrawSetProportional(moneychangenegative[x], 1);
//____________________________________________________________________
moneychange[x] = TextDrawCreate(497.000000, 98.000000, "");
TextDrawBackgroundColor(moneychange[x], 255);
TextDrawFont(moneychange[x], 2);
TextDrawLetterSize(moneychange[x], 0.310000, 1.200000);
TextDrawColor(moneychange[x], -1711328257);
TextDrawSetOutline(moneychange[x], 1);
TextDrawSetProportional(moneychange[x], 1);
}
}
public OnPlayerMoneyChange(playerid, amount, totalamount)
{
for(new i = 0;i<MAX_PLAYERS;i++)
{
if(amount <= 0)
{
new string[15];
format(string, sizeof(string), " %i", amount);
TextDrawSetString(moneychangenegative[i], string);
TextDrawShowForPlayer(i, moneychangenegative[playerid]);
SetTimer("MCN",2500,false);
return 1;
}
if(amount >= 1)
{
new string[15];
format(string, sizeof(string), "+%i", amount);
TextDrawSetString(moneychange[i], string);
TextDrawShowForPlayer(i, moneychange[playerid]);
SetTimer("MC",2500,false);
return 1;
}
}
return 1;
}
public MCN(playerid)
{
for(new i = 0;i<MAX_PLAYERS;i++)
{
TextDrawHideForPlayer(playerid, moneychangenegative[i]);
return 1;
}
return 1;
}
public MC(playerid)
{
for(new i = 0;i<MAX_PLAYERS;i++)
{
TextDrawHideForPlayer(playerid, moneychange[i]);
return 1;
}
return 1;
}
benutze das include http://forum.sa-mp.com/showthread.php?t=254019