Car owner name on car.
#1

Hello,

I have a veh system where players can buy a veh from dealer, and use it. it has some commands like /myveh /lock.....etc

when its locked and another player enter's it server kicks him outta car saying its owned by... name
saving stuff is in sqlite.

now what i wanted to do is, on gamemodeinit attach all cars their owner name on car's head, like Owner\n name here.


anyone? sqlite?
Reply
#2

anyone?
Reply
#3

Can anyone explain how this can be done?

#bump
Reply
#4

Hey iLearner

You can use:
https://sampwiki.blast.hk/wiki/Attach3DTextLabelToVehicle

But first you need to create the text label using:
https://sampwiki.blast.hk/wiki/Create3DTextLabel

example;
pawn Код:
new Text3D:vehicle3Dtext[MAX_VEHICLES],vehicle_id;
// Creating the TextLabel for later use

public OnGameModeInit()
{
    Create3DTextLabel("I'm at the coordinates:\n30.0, 40.0, 50.0", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0, 0);
vehicle_id = CreateVehicle( 510, 0.0. 0.0, 15.0, 5, 0, 120 );
    vehicle3Dtext[ vehicle_id ] = Create3DTextLabel( "Example Text", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
    //Creating the Vehicle
    //Attaching Text Label To Vehicle
    Attach3DTextLabelToVehicle( vehicle3Dtext[ vehicle_id ] , vehicle_id, 0.0, 0.0, 2.0);
    return 1;
}
Remember to remove the text label when the gamemode exits
pawn Код:
public OnGameModeExit ( )
{
    Delete3DTextLabel( vehicle3Dtext[ vehicle_id ] );
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)