10.07.2011, 07:52
Well, I made a test command for my paycheck system, but my textdraw won't hide. When I create it on OnPlayerConnect, I managed to hide it. But, when I show it again when a player gets his paycheck, it shows up but won't hide again.
pawn Код:
public GivePlayerPaycheck(playerid, ammount)
{
new string[80]
pInfo[playerid][pPaycheck] += ammount;
format(string ,sizeof(string), "[Paycheck] + $ %i [Total: $ %i", ammount, pInfo[playerid][pPaycheck]);
TextDrawShowForPlayer(playerid, PaycheckTD[playerid]);
TextDrawSetString(PaycheckTD[playerid], string);
SetTimerEx("HidePaycheckTD", 5000, false, "i", playerid);
return 1;
}
public HidePaycheckTD(playerid)
{
TextDrawHideForPlayer(playerid, PaycheckTD[playerid]);
return 1;
}