[Ajuda] o passegueiro liga o carro como faz so pra o condutor ligar?
#2

Use o estado DRIVER.

https://sampwiki.blast.hk/wiki/GetPlayerState

Seu cуdigo ficaria semelhante a isso:

PHP код:
if((newkeys == KEY_YES)&&(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)) {
    static
        
carroa = GetPlayerVehicleID(playerid),
        
mot, lu, alar, por, cap, porma, ob
    
;
    
GetVehicleParamsEx( carroa, mot, lu, alar, por, cap, porma, ob );
    return 
mot == VEHICLE_PARAMS_OFF ? (SendClientMessage(playerid, Azul, "Veiculo Ligado"),
        
SetVehicleParamsEx( carroa, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob )):(SendClientMessage(playerid, Vermelho, "Veiculo Desligado"),
        
SetVehicleParamsEx(carroa, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob));
} 
Na verdade й isso, digo semelhante, pelo fato de eu nгo ter compilado.


Abз!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)