16/09/2022 19:40
(16/09/2022 19:27)RosaScripter Escreveu:(16/09/2022 09:52)Device-Black Escreveu:Puder me enviar esses plugins ai !Código PHP:#include <evf> // Extended Vehicles Functions
#include <ysf> // Y_Less's Server Fixes
forward void:UpdateVehicleHealth();
public void:UpdateVehicleHealth()
{
static i;
for(i = GetVehiclePoolSize(); i > 0; i--)
{
if(!IsValidVehicle(i)) continue;
static Float:health;
GetVehicleHealth(i, health);
// evitar explosao
float_clamp(health, 250.0, 1000.0);
SetVehicleHealth(i, health);
// verificar se esta quebrado e desligar
if(health < 300.0)
{
SwitchVehicleEngine(i, false);
static driver;
driver = GetVehicleLastDriver(i);
if(IsPlayerInVehicle(driver, i))
GameTextForPlayer(driver, "~r~Veiculo quebrado", 1000, 6);
}
}
}
stock float_clamp(&Float:value, Float:min, Float:max)
{
if(value < min) value = min;
else if(value > max) value = max;
}Código PHP:public OnGameModeInit()
{
SetTimer("UpdateVehicleHealth", 1000, 1);
return 1;
}
Include EVF
Plugin YSF
Seu trouxa favorito 2