English [Menu] Type's

14 replies
Goto Page
To the start Previous 1 Next To the start
26.09.12 05:38:02 pm
Up
Jhony
User
Offline Off
Hello US
How to Make a HUD TEXT + IMAGE?
Example : http://unrealsoftware.de/forum_posts.php?post=330760#jn

Help me please??
Thanks !!
28.09.12 11:45:53 pm
Up
Happy eyes
User
Offline Off
You need a blank image of that sub menu, then you have to add image every time when player opens menu, and delete image when player closes menu (use HUD mode on image).
Also you need to do same with hudtxt lines, to add text (add text when menu is opened, and delete text when menu is closed) Commands you will need is cs2d lua cmd image and cs2d cmd hudtxt
29.09.12 07:30:36 am
Up
Gaios
Security Supporter
Offline Off

I am senting you image tomorrow.
29.09.12 12:43:53 pm
Up
Suprise
BANNED
Offline Off
I have one. If you need it, use it.
IMG:http://i30.servimg.com/u/f30/17/30/54/57/start_10.jpg

I created this for my mod, but since I can't use image correctly, I don't need it.
29.09.12 05:34:55 pm
Up
Jhony
User
Offline Off
Ok,Ok...But..How create?
29.09.12 05:38:43 pm
Up
Avo
User
Offline Off
@user Jhony: use image function and hudtxt command to write text over it. And advice for the future: do not comment files like "0/-0" .
29.09.12 06:59:22 pm
Up
Suprise
BANNED
Offline Off
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
function Array(size,value)
     local array = {}
     for i = 1, size do
          array[i] = value
     end
     return array
end

news_image = Array(32,0)

imagepath = "gfx/start" -- Your image! 

locked={}
     
addhook("serveraction","_action")
function _action(id,action)
     if action == 1 then
          if locked[id]==true then
               menu(id,"Player menu,(News),News off")
          else
               menu(id,"Player menu,News,(News off)")
          end
     end
end

addhook("menu","_menu")
function _menu(id,title,button)
     if title == "Player menu" then
          if button == 1 then
               if locked[id]==nil or locked[id]==false then
                    locked[id]=true
                    news_image[id] = image(imagepath..".bmp",440,80,2,source)
                    parse('hudtxt2 '..id..' 1 "©255255255Today news!" 400 23') --Add more texts! This show only the title! If you need help with it PM me.
               end
          elseif button == 2 then
               if locked[id]==true then
                    locked[id]=false
                    freeimage(news_image[id])
                    parse('hudtxt2 '..id..' 1 "" 400 23')
               end
          end
     end
end
29.09.12 08:48:25 pm
Up
Jhony
User
Offline Off
@user Suprise: how learn to Position Images and Texts?
29.09.12 09:36:16 pm
Up
Gaios
Security Supporter
Offline Off
My img: http://imageshack.us/a/img407/2111/infoform.png

I'm making script for you and me ...
29.09.12 09:45:33 pm
Up
Jhony
User
Offline Off
Ok '-'
But How to Position Images and Texts, Do not Know the Numbers of Positions
I want to learn the positions of images and texts
29.09.12 10:07:38 pm
Up
Gaios
Security Supporter
Offline Off
user Jhony has written:
Ok '-'
But How to Position Images and Texts, Do not Know the Numbers of Positions
I want to learn the positions of images and texts


You must change script, line:
Code:
1
2
news_image[id] = image(imagepath..".bmp",440,80,2,source)
parse('hudtxt2 '..id..' 1 "©255255255Today news!" 400 23') --Add more texts!

Change:
440 80 x and y image
400 23 x and y text
29.09.12 10:09:39 pm
Up
Jhony
User
Offline Off
@user Gaios: I Want to Learn them Positions
Example: Putting the picture in Half
Example: Putting the picture below

I do not know the Codes of Positions
There is a Tutorial Showing them?
29.09.12 10:14:38 pm
Up
Gaios
Security Supporter
Offline Off
Spoiler >


not understand.
Screen in cs2d 640x480
center in cs2d 320x240
ok?
29.09.12 10:22:01 pm
Up
Jhony
User
Offline Off
user Gaios has written:
Spoiler >


not understand.
Screen in cs2d 640x480
center in cs2d 320x240
ok?


wtf??

What Hell is that?
So I want to Learn Numbers of Positions
Example: Placing Images below (Number of Position? <- Example)
30.09.12 08:21:36 am
Up
Eternal
User
Offline Off
@user Jhony: You mean X , Y position or what i don't understand and don't often use the capital letters.
To the start Previous 1 Next To the start