Voilà j'ai rendu le code comme ca mais toujours il marche pas ni en voiture ni à pieds
forward Vie();
public Vie()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gPlayerSpawned[i] == 1)
{
new Float:health;
GetPlayerHealth(i, health);
if(health <= 10)
{
if(IsPlayerInAnyVehicle(i))
{
RemovePlayerFromVehicle(i);
ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
TogglePlayerControllable(i, 0);
GameTextForPlayer(i, "~r~Vous êtes blessé, vous avez besoin d'un médecin !", 5000, 3);
SendClientMessage(i, COLOR_GRAD1, "Vous êtes blessé, faites /mourrir ou /appeler 103");
}
else
{
ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
TogglePlayerControllable(i, 0);
GameTextForPlayer(i, "~r~Vous êtes blessé, vous avez besoin d'un médecin !", 5000, 3);
SendClientMessage(i, COLOR_GRAD1, "Vous êtes blessé, faites /mourrir ou /appeler 103");
}
}
}
}
}
return 1;
}