[Ajuda] Carro nгo explodir, Parar
#2

Topo GM:
pawn Код:
new engineOn[MAX_PLAYERS];
Cуdigo:
pawn Код:
forward CheckCarHealth();

public CheckCarHealth()
{
new string[256];
new sendername[MAX_PLAYER_NAME];
for (new i=0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
new Float:health;
GetVehicleHealth(GetPlayerVehicleID(i),health);
if(health <= 400)
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
TogglePlayerControllable(i, 0);
SendClientMessage(i, COLOR_LIGHTBLUE, "Seu veiculo quebrou, tente ligar novamente ou ligue para um mecanico! (/sair para sair do veiculo)");
engineOn[i] = false;
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "* O veiculo de %s quebrou.", sendername);
ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
}
}
}
}
OnGameModeInit:
pawn Код:
SetTimer("CheckCarHealth",2000,true);

Agradeзa
Reply


Messages In This Thread
[Ajuda] Carro nгo explodir, Parar - by Danilo_Grut - 24.07.2010, 04:15
Re: [Duvida] Carro nгo explodir, Parar - by ipsBruno - 24.07.2010, 22:15
Re: [Duvida] Carro nгo explodir, Parar - by Danilo_Grut - 25.07.2010, 17:07
Re: [Duvida] Carro nгo explodir, Parar - by Baddark2131 - 25.07.2010, 17:38
Re: [Duvida] Carro nгo explodir, Parar - by Danilo_Grut - 25.07.2010, 18:01
Re: [Duvida] Carro nгo explodir, Parar - by Nightwish - 14.01.2011, 10:23
[No subject] - by Sergio_MOW - 05.05.2011, 02:28
Re: [Duvida] Carro nгo explodir, Parar - by Shadoww5 - 05.05.2011, 09:12
Re: [Ajuda] Carro nгo explodir, Parar - by Bruno_Furious - 31.07.2011, 21:57

Forum Jump:


Users browsing this thread: 1 Guest(s)