[BUG / Problem with Streaming] Emergency Lights
#1

I've found a small, but really annoying problem (especially for roleplay servers with police department). If you get out of a vehicle with siren and emergency lights turned on, it will appear turned off for players, who didn't have the car streamed-in while you were getting out. So, basically, if you are blocking road with police car with emergency lights turned on, they will be turned off for all players, who just drive to your vehicle's stream-in zone.

The problem is propably with streaming-in. It won't save siren and lights status, so it will just spawn for new players without it.
Reply
#2

Vehicle lights dont show up at all for me . . When I press H
Reply
#3

Quote:
Originally Posted by gemadon
Vehicle lights dont show up at all for me . . When I press H
its always showing for me
Reply
#4

This might not be a real solution but for now you could easily use this:

So, whenever you turn on the sirens of a vehicle or turn them off, you just use a command before exitting your vehicle which uses this function:

Attach3DTextLabelToVehicle

Then, you create a 3d text label, calling it "SIRENS ON" or anything similar and attach it to the vehicle. Now, whenever a person passes by the vehicle and it gets streamed in, he can see that the sirens are supposed to be on.
Reply
#5

Can you give code of this way? I can't understand that i should do...

BTW: As i can understand, this command can put off/on lightbar without siren?
Reply
#6

Well i hope you fix it because if you change might weather (moring) you can't see lightbar... This is not possible for police teams
Reply
#7

No, it does not turn on the lights. Think about it as a text above the vehicle. So, first of all you have to create it with this function:

Create3DTextLabel

So, once it is created and you have stored the result of the function, a.k.a the ID of the 3DTextLabel, you will now assign it to the vehicle:

Attach3DTextLabelToVehicle

If you are done with that, you have the Text attached to your vehicle and people should be able to see them now, you should for a start call it SIRENS OFF or anything similar.

Alright, we are done with that bit.


Now, whenever a person types a command, e.g. /sirens, it checks if the vehicles sirens are off or on and acts accordingly:

Update3DTextLabelText

We update the text, calling it "SIRENS ON" or "SIRENS OFF" according to the result and now each person coming closer to the vehicle will be able to see the displayed text and knows if the sirens are on or off.

Small example:

pawn Код:
public OnVehicleSpawn(vehicleid)
{
  new Text3D:nIDOfLabel = Create3DTextLabel("SIRENS OFF"/*continue here choosing ya colors etc*/); // the "n" is a habbit of me, indicating its a value
  Attach3DTextLabelToVehicle(nIDofLabel, vehicleid/*the needed coordinations*/);
}
// Lets use zcmd as a example for the command:
zcmd(sirens, playerid, params[])
{
  if(/*check if the sirens are on*/)
  {
     // update the text here
  }
  else
  {
     // update the text here
  }
}
This example may not be totally accurate and some things are possibly different, as well as a static variable to hold the ID, to be able to use it later on might be something you should consider.. but I hope it helps.
Reply
#8

This is help of course. But looks not really for real life mods... In 0.2x we had no problem. So why you change it in 0.3 if if looks not really..
Reply
#9

I am not the developer of sa-mp nor did i give you a "solution" for your problem. All I did was give you a work-around until it is fixed. I am sure Kye will work something out which will fix the issue, but for now my work-around might be helping you until this issue is fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)