SA-MP Forums Archive
[Ajuda] Sirene veiculo - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Sirene veiculo (/showthread.php?tid=573137)



Sirene veiculo - MaykonStriker - 04.05.2015

Alguem pode me ajudar instalar sirene nos veículos?


PHP код:
native CreateVehicle(vehicletypeFloat:xFloat:yFloat:zFloat:rotationcolor1color2respawndelayaddsiren=0);
native AddStaticVehicleEx(modelidFloat:spawn_xFloat:spawn_yFloat:spawn_zFloat:z_anglecolor1color2respawn_delayaddsiren=0);
forward OnVehicleSirenStateChange(playeridvehicleidnewstate);
native GetVehicleParamsSirenState(vehicleid); 



Re: Sirene veiculo - Bruno13 - 04.05.2015

Й simples...basta vocк alterar o valor de "addsiren" para 1...

Код:
Example:
  - CreateVehicle(506, 0.0, 0.0, 0.0, 0.0, 1, 1, 0, 1);
O mesmo se aplica para AddStaticVehicleEx.

public OnVehicleSirenStateChange(playerid, vehicleid, newstate);
- Й chamada sempre que o estado da sirene de um veнculo й alterada, ou seja, ativada ela ou desativada.
• playerid - id do player que aplicou esta aзгo
• vehicleid - id do veнculo que esta aзгo foi aplicada
• newstate - o novo estado da sirene (ligado/desligado)

func GetVehicleParamsSirenState(vehicleid);
- Й usada para obter o estado da sirene de um veнculo (true or false, on or off).