19.04.2014, 12:35
(
Последний раз редактировалось Dark.Angel; 19.04.2014 в 13:25.
)
Fiz um bem simples pra vc..
Em OnGameModeInit:
Vocк pediu pra quando alguem entrar no veiculo ele liga, entгo:
OnPlayerEnterVehicle:
E Quando sair do veiculo desliga:
OnPlayerExitVehicle:
Caso prefira por comandos ou algo do tipo (acho que a maioria dos RPGs fazem isso...)
https://sampwiki.blast.hk/wiki/SetVehicleParamsEx
https://sampwiki.blast.hk/wiki/ManualVehicleEngineAndLights
Em OnGameModeInit:
pawn Код:
ManualVehicleEngineAndLights();
OnPlayerEnterVehicle:
pawn Код:
SetVehicleParamsEx(vehicleid, 1, 0, 0, 0, 0, 0, 0); // liga o motor
OnPlayerExitVehicle:
pawn Код:
SetVehicleParamsEx(vehicleid, 0, 0, 0, 0, 0, 0, 0); // desliga o motor
Caso prefira por comandos ou algo do tipo (acho que a maioria dos RPGs fazem isso...)
pawn Код:
YCMD:ligar(playerid,params[],help)
{
SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, 0, 0, 0, 0, 0, 0); // Sу vai ligar o ENGINE (motor)
SendClientMessage(playerid,-1,"Ligou");
return true;
}
pawn Код:
YCMD:desligar(playerid,params[],help)
{
SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, 0, 0, 0, 0, 0); // Sу vai desligar a ENGINE (motor)
SendClientMessage(playerid,-1,"Desligou");
return true;
}
https://sampwiki.blast.hk/wiki/ManualVehicleEngineAndLights