Can someone give me a timer
#1

it work
Reply
#2

Can i See What Is The Callback of
pawn Код:
TextDrawShowForPlayer(playerid, Welcome0);
TextDrawShowForPlayer(playerid, Welcome1);
TextDrawShowForPlayer(playerid, Welcome2);
TextDrawShowForPlayer(playerid, Welcome3);
Reply
#3

ty for the code.
Reply
#4

So I'm guessing you want a timer to hide all the textdraws?

pawn Код:
forward HideText(playerid);
pawn Код:
public HideText(playerid)
{
TextDrawHideForPlayer(playerid, Text:Welcome0);
TextDrawHideForPlayer(playerid, Text:Welcome1);
TextDrawHideForPlayer(playerid, Text:Welcome2);
TextDrawHideForPlayer(playerid, Text:Welcome3);
return 1;
}
Under OnPlayerConnect

pawn Код:
SetTimerEx("HideText", 20000,  0, "i", playerid);
You can change the 20000 to whatever you want. 20000 = 20 seconds, 1000 = 1 second.
Reply
#5

Quote:
Originally Posted by Da_Noob
Посмотреть сообщение
Under OnPlayerConnect

pawn Код:
SetTimerEx("HideText", 20000,  0, "i", playerid);
You can change the 20000 to whatever you want. 20000 = 20 seconds, 1000 = 1 second.
That is correct but you should always kill a timer after using it!
PHP код:
new HideTxtDrwTimer[MAX_PLAYERS]; //put this at the top of your script somewhere under #include <a_samp> make sure its above OnGameModeInit though and outside of any other callbacks or functions.
HideTxtDrwTimer[playerid] = SetTimerEx("HideTxtDrws",25000false,"i",playerid);//put this in OnPlayerConnect
forward HideTxtDrws(playerid);
public 
HideTxtDrws(playerid)
{
    
TextDrawHideForPlayer(playeridText:Welcome0);
    
TextDrawHideForPlayer(playeridText:Welcome1);
    
TextDrawHideForPlayer(playeridText:Welcome2);
    
TextDrawHideForPlayer(playeridText:Welcome3);
    
KillTimer(HideTxtDrwTimer[playerid]);
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)