Taxi light object not showing -
Adamoneoone - 04.07.2018
Hello, i'm trying to getthe taxi sign to light up when you do /taxi, here is my code, nothing happens:
I've made it using the
https://sampforum.blast.hk/showthread.php?tid=282883 script to make it.
PHP Code:
new veh, Float:Pos[4];
GetPlayerPos(playerid, Float:Pos[0], Float:Pos[1], Float:Pos[2]);
GetPlayerFacingAngle(playerid, Float:Pos[3]); veh = CreateVehicle(420, Float:Pos[0], Float:Pos[1], Float:Pos[2], Float:Pos[3], -1, -1, 50000);
AttachObjectToVehicle(VehicleObject[0], veh, 0.000000,-0.415,0.92, 0.000000,0.000000,0.000000);
VehicleObject[0] = CreateObject(19294,0,0,-1000,0,0,0,100);
Thanks for your help.
Re: Taxi light object not showing -
m3shys - 04.07.2018
You are using VehicleObject[0] prior to defining it.
Re: Taxi light object not showing -
Adamoneoone - 05.07.2018
Quote:
Originally Posted by m3shys
You are using VehicleObject[0] prior to defining it.
|
Oh I did, just didn't post that, it was
PHP Code:
new VehicleObject[1];
Re: Taxi light object not showing -
4D1L - 05.07.2018
Swap lines 04 & 05 around (starting from line 00). I am presuming VehicleObject[0] is empty at line 04 since you assign it a value (CreateObject(19294,0,0,-1000,0,0,0,100)) in line 05.
Re: Taxi light object not showing -
Sew_Sumi - 06.07.2018
^^ That will be correct.
Re: Taxi light object not showing -
Adamoneoone - 06.07.2018
Quote:
Originally Posted by Sew_Sumi
^^ That will be correct.
|
Quote:
Originally Posted by 4D1L
Swap lines 04 & 05 around (starting from line 00). I am presuming VehicleObject[0] is empty at line 04 since you assign it a value (CreateObject(19294,0,0,-1000,0,0,0,100)) in line 05.
|
Quote:
Originally Posted by m3shys
You are using VehicleObject[0] prior to defining it.
|
Oh alright thank you all, I tested it and nothing showed up, however changing the weather using /rcon weather and putting a rainy one did the trick, the light showed up. However, the light is blinking, any idea how to make it persistent? Thanks
Re: Taxi light object not showing -
Sew_Sumi - 06.07.2018
Weather shouldn't affect it... Try the code on a bare script, and then if it comes fine there, then something else on the server is messing with it.
If you're using the streamer, that'll cause trouble as you should be using the streamers object functions, not the vanilla sa-mp ones.