Textdraw does not working

Started by Slark__, Sep 29, 2016, 09:52 AM

Previous topic - Next topic

Slark__

hello i create Textdraw but doesn't working :/ and didnt get any error help pls

MessagePlayer( WHITE+"You've entered " + GetVehicleNameFromModel( player.Vehicle.Model ) + ".", player);
Textdraw <- CreateTextdraw( "" + GetVehicleNameFromModel( player.Vehicle.Model ) + "", 100, 100, 0xFF00BFFF);
Textdraw.ShowForPlayer(player);

     local Vehicle = FindVehicle;
     MessagePlayer( WHITE+"You've exited the " + GetVehicleNameFromModel( vehicle.Model ) + ".", player);
     Textdraw <- CreateTextdraw( "" + GetVehicleNameFromModel( player.Vehicle.Model ) + "", 100, 100, 0xFF00BFFF);
     Textdraw.Delete();

anyone help me?

Cool


Anik

Are you using 04rel003?? Because After 04rel004 update textdraws from server side has been removed. Use client side instead.

Slark__

Quote from: Anik on Sep 29, 2016, 10:42 AMAre you using 04rel003?? Because After 04rel004 update textdraws from server side has been removed. Use client side instead.

np im using 04rel003 !

Slark__


MatheuS

I think it's this:
Textdraw <- CreateTextdraw( "" + GetVehicleNameFromModel( player.Vehicle.Model ) + "", 100, 100, 0xFF00BFFF);
Textdraw <- CreateTextdraw( "" + GetVehicleNameFromModel( player.Vehicle.Model() ) + "", 100, 100, 0xFF00BFFF);
if( !sucess ) tryAgain();
Thanks to the VCMP community. It was the happiest period of my life.

Slark__

Quote from: MatheuS on Sep 29, 2016, 04:59 PMI think it's this:
Textdraw <- CreateTextdraw( "" + GetVehicleNameFromModel( player.Vehicle.Model ) + "", 100, 100, 0xFF00BFFF);
Textdraw <- CreateTextdraw( "" + GetVehicleNameFromModel( player.Vehicle.Model() ) + "", 100, 100, 0xFF00BFFF);



not working model does exist

Xmair

#7
Oh my f* God. Why on Earth are you guys trying to make something a string which is already a string? GetVehicleNameFromModel returns a string.

@MatheuS by adding () you're telling the compiler to call the 'model' function in the 'Vehicle' class.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

Anik

Quote from: Slark__ on Sep 29, 2016, 05:50 PM
Quote from: MatheuS on Sep 29, 2016, 04:59 PMI think it's this:
Textdraw <- CreateTextdraw( "" + GetVehicleNameFromModel( player.Vehicle.Model ) + "", 100, 100, 0xFF00BFFF);
Textdraw <- CreateTextdraw( "" + GetVehicleNameFromModel( player.Vehicle.Model() ) + "", 100, 100, 0xFF00BFFF);



not working model does exist
You have exited the vehicle then how can the model exist??

KAKAN

Quote from: Anik on Sep 30, 2016, 06:05 AMYou have exited the vehicle then how can the model exist??
because in the locals, vehicle is still a instance of the vehicle which the player was using.
oh no

Slark__

Quote from: KAKAN on Sep 30, 2016, 07:58 AM
Quote from: Anik on Sep 30, 2016, 06:05 AMYou have exited the vehicle then how can the model exist??
because in the locals, vehicle is still a instance of the vehicle which the player was using.

tY problem fixed !