Quantcast

Jump to content

» «
Photo

[CLEO]small script request

10 replies to this topic
lolleroz
  • lolleroz

    Homeboy

  • Members
  • Joined: 29 Jul 2010
  • None

#1

Posted 05 April 2012 - 06:45 PM

I'm wondering if it's possible to script a 'text-draw' (w/e its called) which would look similar to this: (look at the HUD)
user posted image
thanks in advance...and my scripting knowledge restricts to common sense (changing keys and basic things in other's scripts, compiling n stuff) so if anyone has time to make a full-ready script...

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None

#2

Posted 05 April 2012 - 06:56 PM

Adler made it using Wesser's functions: http://gtag.gtagamin...findpost&p=1376
See it:
QUOTE
Compiled .CS Script

lolleroz
  • lolleroz

    Homeboy

  • Members
  • Joined: 29 Jul 2010
  • None

#3

Posted 05 April 2012 - 08:39 PM Edited by lolleroz, 05 April 2012 - 08:42 PM.

Sorry if I sound arrogant but what does this have to do with the thingy I want? It seems to just show ped IDs, I'd just like simple text-draw on the HUD which I could fill out myself and it'd show up forever

I mean something like this:
user posted image

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci
  • Joined: 24 Dec 2007
  • None

#4

Posted 05 April 2012 - 09:59 PM

Why would you wanna create something that looks like that? It's not very nice-looking.

Anyway, to answer your question "I'm wondering if it's possible...". Yes.

lolleroz
  • lolleroz

    Homeboy

  • Members
  • Joined: 29 Jul 2010
  • None

#5

Posted 06 April 2012 - 07:48 AM

It was an example, I just want a small text input with nice font that I could fill out myself

Basically I'd like to have my mob name and my mob rank showed on the hud, for a pseudo-RP server. Similar to Godfather 1 the game, is it that bad? tounge.gif

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None

#6

Posted 06 April 2012 - 08:22 AM

CODE
{$CLEO}
0000: NOP

   while true
   wait 0
   03F0: enable_text_draw 1    // required to clear currently drawn textures and texts from screen
   
   gosub @SetTextProperties    // thou shalt always set text properties before text draw!        
   033E: set_draw_text_position 320.0 240.0 GXT 'CRED008'
   end
   
:SetTextProperties
03E0: draw_text_behind_textures 1
033F: set_text_draw_letter_size 0.4 1.2
0343: set_text_draw_linewidth 640.0
03E3: set_texture_to_be_drawn_antialiased 0              
060D: draw_text_shadow 1 color_RGBA 0 0 0 255
return

lolleroz
  • lolleroz

    Homeboy

  • Members
  • Joined: 29 Jul 2010
  • None

#7

Posted 06 April 2012 - 10:41 AM

uh, any idea how can I get proper coordinates on the HUD? Also I have some trouble with FXT, I made a new one and did
CRED008 Rank: Veteran Mobster


but it seems to show 'Senior Programmer' while ingame, lol

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None

#8

Posted 06 April 2012 - 10:52 AM

GTA SA PS2 scale: 640.0 x 448.0
It's whole screen.

Use MS Paint and resize screenshot to 640.0 x 448.0
Get the XY by moving cursor on image.

Remember the XY is used for top-right position of text.

Silent
  • Silent

    Moderating Cookie Monster

  • Feroci
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [GTA] 2013
    Most Helpful [Modding] 2013
    Most Talented [Modding] 2013
    Best Map 2013 "ViceCityStories PC Edition"
    Best Vehicle 2013 "III Aircraft"
    Most Helpful [Modding] 2012
    Modder of the Year 2012

#9

Posted 06 April 2012 - 12:39 PM

FXT fails in samp, you need to edit the GXT.

Actually, it's interesting why it fails. I might take a look in it.

lolleroz
  • lolleroz

    Homeboy

  • Members
  • Joined: 29 Jul 2010
  • None

#10

Posted 07 April 2012 - 09:27 AM

Thanks Fastman, I'll look into it

So SilentPL, can I just find some random unused entry in gxt (lets say sh*t0001 for example), edit the text, and change the text entry in cleo script to sh*t0001 to get it to work?

Silent
  • Silent

    Moderating Cookie Monster

  • Feroci
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [GTA] 2013
    Most Helpful [Modding] 2013
    Most Talented [Modding] 2013
    Best Map 2013 "ViceCityStories PC Edition"
    Best Vehicle 2013 "III Aircraft"
    Most Helpful [Modding] 2012
    Modder of the Year 2012

#11

Posted 07 April 2012 - 10:10 AM

You can even add a new one.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users