[Ajuda] Carro
#1

Olб pessoal nгo queria ser preguiзoso ou folgado. Mais sou inciante em PAWM queria criar um sistema que exemplo quando chega na fumaзa PRETA o carro parasse ou simplesmente desliga-se quando pessoa tentava ligar o carro fala tipo em textdraw "Falha no motor"
Mais se for possнvel e tiver tempo se nгo tiver ok, vo tentar mais tarde.

Abraзo
Waldrey
Reply
#2

Obter a vida do Veнculo constantemente (GetVehicleHealth). Checar se ela й menor que 300 e parar o motor.(SetVehicleParamsEx. Params 2 off).
Reply
#3

pawn Code:
public OnPlayerUpdate(playerid)
{
    new vehicleid, Float:Lataria;
    vehicleid = GetPlayerVehicleID(playerid);
    GetVehicleHealth(vehicleid, Lataria);
    if(Lataria < 300)
    {
        GameTextForPlayer(playerid, "Falha no Motor", 3000, 4);
    }
    return 1;
}
Infelizmente, nгo sei fazer com que o motor desligue.
Reply
#4

pawn Code:
new e, l, a, d, b, bo, o;
GetVehicleParamsEx(vehicleid, e, l, a, d, b, bo, o);
SetVehicleParamsEx(vehicleid, false, l, a, d, b, bo, o);
Reply
#5

Quote:
Originally Posted by Ouro
View Post
pawn Code:
public OnPlayerUpdate(playerid)
{
    new vehicleid, Float:Lataria;
    vehicleid = GetPlayerVehicleID(playerid);
    GetVehicleHealth(vehicleid, Lataria);
    if(Lataria < 300)
    {
        GameTextForPlayer(playerid, "Falha no Motor", 3000, 4);
    }
    return 1;
}
Infelizmente, nгo sei fazer com que o motor desligue.
й melhor criar um Timer de 2 segundos ou isso.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)