Taxi light object not showing
#1

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 vehFloat:Pos[4];
GetPlayerPos(playeridFloat:Pos[0], Float:Pos[1], Float:Pos[2]);
GetPlayerFacingAngle(playeridFloat:Pos[3]); veh CreateVehicle(420Float:Pos[0], Float:Pos[1], Float:Pos[2], Float:Pos[3], -1, -150000);
AttachObjectToVehicle(VehicleObject[0], veh0.000000,-0.415,0.920.000000,0.000000,0.000000);
VehicleObject[0] = CreateObject(19294,0,0,-1000,0,0,0,100); 
Thanks for your help.
Reply
#2

You are using VehicleObject[0] prior to defining it.
Reply
#3

Quote:
Originally Posted by m3shys
View Post
You are using VehicleObject[0] prior to defining it.
Oh I did, just didn't post that, it was
PHP Code:
new VehicleObject[1]; 
Reply
#4

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.
Reply
#5

^^ That will be correct.
Reply
#6

Quote:
Originally Posted by Sew_Sumi
View Post
^^ That will be correct.
Quote:
Originally Posted by 4D1L
View Post
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
View Post
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
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)