PHP Code:
forward RemoveTDraw(playerid);
forward ShowCashTDraw(playerid,amountgained);
public ShowCashTDraw(playerid, amountgained)
{
new cashcountstring[56];
if(revenuerecorded[playerid] ==0)
{
revenuerecorded[playerid]=1;
format(cashcountstring, sizeof(cashcountstring), "+$%i", amountgained);
TextDrawShowForPlayer(playerid,CashAmountShown[playerid]);
TextDrawSetString(CashAmountShown[playerid], cashcountstring);
KillTimer(RemoveTDrawTimer[playerid]);
RemoveTDrawTimer[playerid] = SetTimer("RemoveTDraw", 2000, 0);
}
return 1;
}
public RemoveTDraw(playerid)
{
revenuerecorded[playerid]=0;
TextDrawSetString(CashAmountShown[playerid], " ");
TextDrawHideForPlayer(playerid,CashAmountShown[playerid]);
return 1;
}
the textdraw shows for the player i call the function by ShowCashTDraw but the timer isn't hiding the textdraw its like it isn't even getting called, it only works and gets called for ID 0 ONLY, where did i go wrong? thanks in advance, note that I've defined the right variables and functions and the compiler doesn't call any error/warning but the problem continues...