SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 04/07/2018, 08:21 PM   #1
Adamoneoone
Huge Clucker
 
Join Date: Sep 2014
Posts: 488
Reputation: 37
Default Taxi light object not showing

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 http://forum.sa-mp.com/showthread.php?t=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.
__________________
If you want to have your own custom script, or even want to have one of our already released scripts, join our SCRIPTING SERVICES DISCORD, or send me a private message!
Adamoneoone is online now   Reply With Quote
Old 04/07/2018, 10:40 PM   #2
m3shys
Big Clucker
 
m3shys's Avatar
 
Join Date: Jul 2014
Posts: 76
Reputation: 24
Default Re: Taxi light object not showing

You are using VehicleObject[0] prior to defining it.
m3shys is offline   Reply With Quote
Old 05/07/2018, 07:46 AM   #3
Adamoneoone
Huge Clucker
 
Join Date: Sep 2014
Posts: 488
Reputation: 37
Default Re: Taxi light object not showing

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]; 
__________________
If you want to have your own custom script, or even want to have one of our already released scripts, join our SCRIPTING SERVICES DISCORD, or send me a private message!
Adamoneoone is online now   Reply With Quote
Old 05/07/2018, 10:23 PM   #4
4D1L
Big Clucker
 
Join Date: Mar 2016
Location: United Kingdom
Posts: 74
Reputation: 22
Default Re: Taxi light object not showing

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.
4D1L is offline   Reply With Quote
Old 06/07/2018, 01:46 AM   #5
Sew_Sumi
Banned
 
Join Date: Jun 2008
Location: Azerbaijan
Posts: 6,243
Reputation: 525
Default Re: Taxi light object not showing

^^ That will be correct.
Sew_Sumi is offline   Reply With Quote
Old 06/07/2018, 08:02 AM   #6
Adamoneoone
Huge Clucker
 
Join Date: Sep 2014
Posts: 488
Reputation: 37
Default Re: Taxi light object not showing

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
__________________
If you want to have your own custom script, or even want to have one of our already released scripts, join our SCRIPTING SERVICES DISCORD, or send me a private message!
Adamoneoone is online now   Reply With Quote
Old 06/07/2018, 09:28 AM   #7
Sew_Sumi
Banned
 
Join Date: Jun 2008
Location: Azerbaijan
Posts: 6,243
Reputation: 525
Default Re: Taxi light object not showing

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.
Sew_Sumi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Taxi light tag Lidor124 Scripting Help 3 10/04/2014 12:42 PM
taxi light help DamonD Scripting Help 2 25/01/2014 01:02 AM
Taxi light Jstylezzz Scripting Help 0 30/04/2012 08:10 AM
Taxi Light CONTROLA Scripting Help 6 18/12/2011 05:58 PM
Taxi light r0v3r Help Archive 5 21/01/2011 10:24 AM


All times are GMT. The time now is 07:20 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.