GameModeTextShowForPlayer question
#5

PHP код:
new JailTimer[MAX_PLAYERS];
time[targetid] = 60//Time (60 seconds -> 1 minute)
JailTimer[targetid] = SetTimerEx("TimeOut"1000true"i"targetid);
forward TimeOut(playerid)
public 
TimeOut(playerid);
{
    
time[playerid] -= 1;
    if(
time[playerid] <= 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
time[playerid] = 0;
            
KillTimer(JailTimer[playerid]);
            
SendClientMessage(playerid, -1"You have left prison");
            return 
1;
        }
    }
    
    new 
str[24]; format(strsizeof str"Time:_%d"TimeConvert(time[playerid]));
    
GameTextForPlayer(playeridstr20003);
    return 
1;
}
TimeConvert(seconds)
{
    new 
tmp[16];
     new 
minutes floatround(seconds/60);
      
seconds -= minutes*60;
       
format(tmpsizeof(tmp), "%d:%02d"minutesseconds);
       return 
tmp;

Reply


Messages In This Thread
GameModeTextShowForPlayer question - by Deken - 26.12.2018, 14:19
Re: GameModeTextShowForPlayer question - by UFF - 26.12.2018, 14:29
Re: GameModeTextShowForPlayer question - by Deken - 26.12.2018, 17:38
Re: GameModeTextShowForPlayer question - by Deken - 26.12.2018, 17:48
Re: GameModeTextShowForPlayer question - by N3mesiS - 26.12.2018, 18:04
Re: GameModeTextShowForPlayer question - by Deken - 26.12.2018, 18:30
Re: GameModeTextShowForPlayer question - by Deken - 26.12.2018, 18:46
Re: GameModeTextShowForPlayer question - by N3mesiS - 26.12.2018, 19:14
Re: GameModeTextShowForPlayer question - by Deken - 28.12.2018, 17:50

Forum Jump:


Users browsing this thread: 1 Guest(s)