need help
#4

PHP код:
#include <a_samp>

forward test(playerid);

new 
timer;
new 
count = 120;

public 
OnPlayerCommandText(playerid, cmdtext[])
{
    if(
strcmp("/startcount", cmdtext, true, 11) == 0)
    {
        
timer = SetTimerEx("test", 1000, 1, "d", playerid);
        return 
1;
        }
    return 
1;
}
public 
test(playerid)
{
    
count--;
    if(
count==0)
    {
        
KillTimer(timer);
        
GameTextForPlayer(playerid,"~r~Go Go Go",2000,5);
        }else{
            new 
string[24];
            
format(string, sizeof(string), "Please wait: %d", count);
            return 
GameTextForPlayer(playerid, string, 100, 5);
        }
    return 
1;
} 
Hope it work
Reply


Messages In This Thread
need help - by lanix - 12.08.2015, 13:03
Re: need help - by jlalt - 12.08.2015, 13:05
Re: need help - by lanix - 12.08.2015, 13:11
Re: need help - by jlalt - 12.08.2015, 13:23
Re: need help - by lanix - 12.08.2015, 14:00
Re: need help - by jlalt - 12.08.2015, 14:04
Re: need help - by lanix - 12.08.2015, 14:10
Re: need help - by jlalt - 12.08.2015, 19:06
Re: need help - by lanix - 12.08.2015, 20:03
Re: need help - by jlalt - 12.08.2015, 20:41

Forum Jump:


Users browsing this thread: 1 Guest(s)