Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Textdraw problem...

$
0
0
PHP Code:

forward RemoveTDraw(playerid);
forward ShowCashTDraw(playerid,amountgained);
public 
ShowCashTDraw(playeridamountgained)
{
new 
cashcountstring[56];
if(
revenuerecorded[playerid] ==0)
{
    
revenuerecorded[playerid]=1;
    
format(cashcountstringsizeof(cashcountstring), "+$%i"amountgained);
    
TextDrawShowForPlayer(playerid,CashAmountShown[playerid]);
    
TextDrawSetString(CashAmountShown[playerid], cashcountstring);
    
KillTimer(RemoveTDrawTimer[playerid]);
    
RemoveTDrawTimer[playerid] = SetTimer("RemoveTDraw"20000);
    }
    return 
1;
}
public 
RemoveTDraw(playerid)
{
    
revenuerecorded[playerid]=0;
    
TextDrawSetString(CashAmountShown[playerid], " ");
    
TextDrawHideForPlayer(playerid,CashAmountShown[playerid]);
    return 
1;


Can someone explain to me why is this only working for id 0?
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...

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>