[Pedido] Funзгo Prisгo
#3

Aqui estб uma funзгo simples, modo de uso:

Код:
Prender(playerid, tempo);
PHP код:
new PlayerTempoPreso[MAX_PLAYERS],
Timer[MAX_PLAYERS];
stock Prender(playeridtempo)
{
    
PlayerTempoPreso[playerid] = tempo;
    
SetPlayerPos(playerid322.197998,302.497985,999.148437);
    
SetPlayerInterior(playerid5);
    
ResetPlayerWeapons(playerid);
    
Timer[playerid] = SetTimerEx("AtualizarTempo"1000true"d"playerid);
    return 
true;
}
forward AtualizarTempo(playerid);
public 
AtualizarTempo(playerid)
{
    if(
PlayerTempoPreso[playerid] > 0)
    {
        
PlayerTempoPreso[playerid] -= 1;
    }else{
        
KillTimer(Timer[playerid]);
        
SendClientMessage(playerid, -1"INFO: Vocк agora estб livre.");
        
SpawnPlayer(playerid);
    }
    return 
true;

Reply


Messages In This Thread
Funзгo Prisгo - by felipelm3g - 18.12.2015, 17:24
Re: Funзгo Prisгo - by fdsda - 18.12.2015, 18:37
Re: Funзгo Prisгo - by cicinho - 18.12.2015, 20:23
Re: Funзгo Prisгo - by felipelm3g - 18.12.2015, 21:41
Re: Funзгo Prisгo - by F1N4L - 18.12.2015, 22:37
Re: Funзгo Prisгo - by felipelm3g - 18.12.2015, 22:56
Re: Funзгo Prisгo - by Ever_SH - 19.12.2015, 13:47
Re: Funзгo Prisгo - by felipelm3g - 19.12.2015, 14:31

Forum Jump:


Users browsing this thread: 1 Guest(s)