Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: MacTavish on Nov 23, 2014, 10:08 AM

Title: how to set text like this
Post by: MacTavish on Nov 23, 2014, 10:08 AM
How?

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Ftiny-img.com%2Fimage.php%3Fdi%3DXNO8&hash=3b6e220111975c4bcaba8350346b70b0695f94e4)
Title: Re: how to set text like this
Post by: Honey on Nov 23, 2014, 10:33 AM
That Is a TextDraw, You can create textdraws anywhere on screen.

You can find more information about Textdraws at the Wiki.
Title: Re: how to set text like this
Post by: MacTavish on Nov 23, 2014, 10:54 AM
Textdraw info has not been added yet bro see (http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/CreateTextdraw)
Title: Re: how to set text like this
Post by: Honey on Nov 23, 2014, 11:17 AM
If you cannot find something in the Wiki then you can try finding it in the source code or another OutDated Information Page.

Outdated Information Page : https://bitbucket.org/stormeus/0.4-squirrel/wiki
Source :  https://bitbucket.org/stormeus/0.4-squirrel/src

Syntax For Creating a TextDraw : CreateTextdraw("Title",Screen X Pos,Screen Y Pos,Color);
Title: Re: how to set text like this
Post by: Sk on Nov 23, 2014, 12:29 PM
Quote from: Honey on Nov 23, 2014, 11:17 AMSyntax For Creating a TextDraw : CreateTextdraw("Title",Screen X Pos,Screen Y Pos,Color);
yup you can create it like this but u need to make it visible for all or a specific person caze the server will make this textdraw but will not show it to any one.
for example
u can use post it any where u want like onScriptload etc
title <- CreateTextdraw("My Server Title",100,200,0xFFE1FF00);
title.ShowForAll();
or for specific Person use
title.ShowForPlayer(player);
and for colours the last one i posted is 0xFFE1FF00
in a format 0xRRBBGG00
so all you need to do is replace this RRBBGG with hex colour which u can find on google very easily well i use these pdf files
Clicky (http://www.techfak.uni-bielefeld.de/~walter/misc/colorRGB.pdf)
and another file
Clicky part 2 (http://www.umsiko.co.za/links/RGB-ColourNamesHex.pdf)
Note: Don,t Use # just post the next Hex codes
Good Luck

Title: Re: how to set text like this
Post by: MacTavish on Nov 23, 2014, 01:06 PM
Thanks Both of you :)
Title: Re: how to set text like this
Post by: MacTavish on Nov 23, 2014, 09:15 PM
Bro i did this for getting district name but the name is not changing when player goto other district here is my code

dis <- CreateTextdraw("District: " + GetDistrictName( player.Pos.x, player.Pos.y ) + "",20,550,0xFFFF0000);

dis.ShowForPlayer(player);
Title: Re: how to set text like this
Post by: Sebastian on Nov 23, 2014, 09:50 PM
Quote from: RATHORE on Nov 23, 2014, 09:15 PMBro i did this for getting district name but the name is not changing when player goto other district here is my code

dis <- CreateTextdraw("District: " + GetDistrictName( player.Pos.x, player.Pos.y ) + "",20,550,0xFFFF0000);

dis.ShowForPlayer(player);

Similar "problem":
Quote from: You should understandBro i did this for changing vehicle model but the model is not changing
here is my code

dis <- CreateVehicle(blabla);

How do you expect for it to change, when you just create another textdraw ?
You have to remove the old one, then create the new one having the correct district name.
Title: Re: how to set text like this
Post by: MacTavish on Nov 23, 2014, 09:53 PM
I want it just like as Ethical Dm can someone help me