[Q] Attach Text To Vehicle
#1

I got a question, how to Attach text to all vehicle. if there is a new car , then it automatically attach text to vehicle ?
Same this can i do SetVehicleNumberPlate with all vehicle ? I wanted to set numberplate to all vehicle and using this number plate for Attachtexttovehicle. Anyone can help me pls !

with example number plate SF-XXX
Reply
#2

You can put it under OnVehicleSpawn
pawn Код:
public OnVehicleSpawn(vehicleid)
{
        for(new v=0; v<MAX_VEHICLES; v++)
        {
                Attach3DTextLabelToVehicle(888 , v, Float:OffsetX, Float:OffsetY, Float:OffsetZ);  
                SetVehicleNumberPlate(v,"SF-XXX");
        }
        return 1;
}
So, Whenever a vehicle spawn, it will attach a 3D Text Label to it, and it will set its number plate.
Reply
#3

What the hell is that loop for if you have "vehicleid" variable right there? Also beware of limits. I don't know what the exact behavior is, but I'm pretty sure that labels aren't destroyed when the vehicle is destroyed. Thus if you keep recreating them you will eventually hit the limit.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)