23.10.2014, 00:57
(
Последний раз редактировалось Jimmmy; 23.10.2014 в 14:45.
)
Ai mano agora pega se nгo pegar me mato talvez
Coloquei == Pra Evitar que fique atualizando toda hora .. mais no caso ta fazendo a funзгo da mesma .
Coloquei == Pra Evitar que fique atualizando toda hora .. mais no caso ta fazendo a funзгo da mesma .
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid == PLAYER_STATE_DRIVER))
{
new Carro = GetPlayerVehicleID(playerid);
new Float:vHealth;
GetVehicleHealth(Carro, vHealth);
vehicle_id = Carro;
new Bar[80];
if(vHealth == 250 || vHealth == 300 || vHealth == 350){
Delete3DTextLabel( vehicle3Dtext[ Carro ] );
format(Bar, sizeof(Bar), "_");
}
if(vHealth == 400 || vHealth == 450 || vHealth == 500){
Delete3DTextLabel( vehicle3Dtext[ Carro ] );
format(Bar, sizeof(Bar), "__");
}
if(vHealth == 550 || vHealth == 600 || vHealth == 650){
Delete3DTextLabel( vehicle3Dtext[ Carro ] );
format(Bar, sizeof(Bar), "___");
}
if(vHealth == 700 || vHealth == 750 || vHealth == 800){
Delete3DTextLabel( vehicle3Dtext[ Carro ] );
format(Bar, sizeof(Bar), "_____");
}
if(vHealth >= 850){
Delete3DTextLabel( vehicle3Dtext[ Carro ] );
format(Bar, sizeof(Bar), "______");
}
vehicle3Dtext[ Carro ] = Create3DTextLabel( Bar, 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
Attach3DTextLabelToVehicle( vehicle3Dtext[ Carro ] , Carro, 0.0, 0.0, 2.0);
}
}
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_DRIVER)
{
Delete3DTextLabel( vehicle3Dtext[ vehicle_id ] );
}
return 1;
}