[TUT] How To Edit Hud/Main Menu [ZP4.3/ZP50/<OR>Any Modes]
Nov 24, 2017 13:37:13 GMT
zmd94, lindi, and 1 more like this
Post by P!KaChu~ on Nov 24, 2017 13:37:13 GMT
Hello Guys
Tutorial For Beginners
How To Edit Hud Info [ZP50/ZP4.3] or Any
<OR>
How To Edit Main Menu [ZP50/ZP4.3] Or Any
Lets Start...
First For ZP50 Tut's
Open Your zp50_hud_info.sma
[1]. Question , How To Change Hud Color?
Here,
You can use hud generator For Help
[2]. Question, How To Change Hud Position ?
Here,
You can use hud generator For Help
Edit: Im Edited It.
[3]. Now Third How To Edit Man!!
Just Chill And Follow Me
Find This,
This Is Spectator Hud For Example If Im in Spec So if i spec someone so it show that player info
So How To Edit?
Ohk For Basic..
I Will Take Example
Right?
You Can See That Part
Alright If You Dont Know How To Edit A String So Dont Change it
Then i wanna add "[ZPPV Zombie Plague]"
Right? Before That Show's
You Can See The Part
Also You Can Change Your Info That Is
Now -= ZP50 Main Menu =-
Lets Follow Again
Open This zp50_main_menu.sma
[1]. Question When im add more lines/Color so it invisible Right?
Ans: Find This
What? What is ?
See
To
[2]. Question How To Top Not Menu, top Head Line/Menu Top
My Reco Please Remove String "ZP_VERSION_STR_LONG"
\r = Red
\y = Yellow
\w = White
\d = Grey/Dark
I Wanna Add [ZPPV Main Menu]
With Colorful ?
Let's Do It
What You Think What is this ?
"[" That Brackit is Red And The Under Portion Is Yellow
How To Edit Menu or Add?
I Will Take Example
Is That 1st Menu On Main Menu
I Wanna Edit
I Do Yellow You Can See
=>>>>
[3]. Question What is else After why line add ?
ANS: Its for when you dead you dont have to open that menu ofc, it would be dark for that user "\d= Dark"
Alright How to Add New Menu ?
In My Sma I Found A Space! On Line 8 , on line 8 there is nothing i wanna add
For example i wanna add Vip Menu? WIth Color?
Add This After 7
Note: Im adding on 8 so after the 7, before the 9
Its Only 1 Step?, No Man! Go To "case"
NOTE: If you add Line 8? so case is also 8? Nope, Case is 7, Dont Over Mind Please Do It "-1"
For Example
After case 6 add line
What is client_cmd ?
client_cmd is that player do it if someone press m,8 so it said: /vm
This Request Is For Nova
Feel Free Its For Beginners
Good Luck & Have Fun
Edit: I Will Update The Thread When Im Free Or Add zp4.3 Tutorial
ThankYou Soo Much..
Tutorial For Beginners
How To Edit Hud Info [ZP50/ZP4.3] or Any
<OR>
How To Edit Main Menu [ZP50/ZP4.3] Or Any
Lets Start...
First For ZP50 Tut's
Open Your zp50_hud_info.sma
[1]. Question , How To Change Hud Color?
Here,
You can use hud generator For Help
const HUD_STATS_ZOMBIE_R = 255
const HUD_STATS_ZOMBIE_G = 0
const HUD_STATS_ZOMBIE_B = 85
const HUD_STATS_HUMAN_R = 0
const HUD_STATS_HUMAN_G = 255
const HUD_STATS_HUMAN_B = 255
const HUD_STATS_SPEC_R = 255
const HUD_STATS_SPEC_G = 255
const HUD_STATS_SPEC_B = 255
[2]. Question, How To Change Hud Position ?
Here,
You can use hud generator For Help
Edit: Im Edited It.
const Float:HUD_SPECT_X = -1.0
const Float:HUD_SPECT_Y = 0.75
const Float:HUD_STATS_X = -1.0
const Float:HUD_STATS_Y = 0.75
[3]. Now Third How To Edit Man!!
Just Chill And Follow Me
Find This,
// Spectating someone else?
if (player != ID_SHOWHUD)
{
new player_name[32]
get_user_name(player, player_name, charsmax(player_name))
// Show name, health, class, and money
set_hudmessage(HUD_STATS_SPEC_R, HUD_STATS_SPEC_G, HUD_STATS_SPEC_B, HUD_SPECT_X, HUD_SPECT_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
if (LibraryExists(LIBRARY_AMMOPACKS, LibType_Library))
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "%L: %s^nHP: %d - %L %s - %L %d", ID_SHOWHUD, "SPECTATING", player_name, get_user_health(player), ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "AMMO_PACKS1", zp_ammopacks_get(player))
else
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "%L: %s^nHP: %d - %L %s - %L $ %d", ID_SHOWHUD, "SPECTATING", player_name, get_user_health(player), ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "MONEY1", cs_get_user_money(player))
}
This Is Spectator Hud For Example If Im in Spec So if i spec someone so it show that player info
So How To Edit?
Ohk For Basic..
I Will Take Example
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "%L: %s^nHP: %d - %L %s - %L %d", ID_SHOWHUD, "SPECTATING", player_name, get_user_health(player), ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "AMMO_PACKS1", zp_ammopacks_get(player))
Right?
You Can See That Part
"%L: %s^nHP: %d - %L %s - %L %d"
Alright If You Dont Know How To Edit A String So Dont Change it
Then i wanna add "[ZPPV Zombie Plague]"
Right? Before That Show's
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "[ZPPV Zombie Plague]^n%L: %s^nHP: %d - %L %s - %L %d", ID_SHOWHUD, "SPECTATING", player_name, get_user_health(player), ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "AMMO_PACKS1", zp_ammopacks_get(player))
You Can See The Part
"[ZPPV Zombie Plague]^n%L: %s^nHP: %d - %L %s - %L %d"
Also You Can Change Your Info That Is
// Show health, class
set_hudmessage(red, green, blue, HUD_STATS_X, HUD_STATS_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
if (LibraryExists(LIBRARY_AMMOPACKS, LibType_Library))
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "HP: %d - %L %s - %L %d", get_user_health(ID_SHOWHUD), ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "AMMO_PACKS1", zp_ammopacks_get(ID_SHOWHUD))
else
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "HP: %d - %L %s", get_user_health(ID_SHOWHUD), ID_SHOWHUD, "CLASS_CLASS", class_name)
}
Now -= ZP50 Main Menu =-
Lets Follow Again
Open This zp50_main_menu.sma
[1]. Question When im add more lines/Color so it invisible Right?
Ans: Find This
// Main Menu
show_menu_main(id)
{
static menu[250]
What? What is ?
See
menu[250]
To
menu[512]
[2]. Question How To Top Not Menu, top Head Line/Menu Top
// Title
len += formatex(menu[len], charsmax(menu) - len, "\yZombie Plague %s^n^n", ZP_VERSION_STR_LONG)
My Reco Please Remove String "ZP_VERSION_STR_LONG"
\r = Red
\y = Yellow
\w = White
\d = Grey/Dark
I Wanna Add [ZPPV Main Menu]
With Colorful ?
Let's Do It
// Title
len += formatex(menu[len], charsmax(menu) - len, "\r[\yZPPV Main Menu\r]^n^n")
What You Think What is this ?
"[" That Brackit is Red And The Under Portion Is Yellow
How To Edit Menu or Add?
I Will Take Example
// 1. Buy menu
if (LibraryExists(LIBRARY_BUYMENUS, LibType_Library) && (get_pcvar_num(cvar_buy_custom_primary)
|| get_pcvar_num(cvar_buy_custom_secondary) || get_pcvar_num(cvar_buy_custom_grenades)) && is_user_alive(id))
len += formatex(menu[len], charsmax(menu) - len, "\r1.\w %L^n", id, "MENU_BUY")
else
len += formatex(menu[len], charsmax(menu) - len, "\d1. %L^n", id, "MENU_BUY")
Is That 1st Menu On Main Menu
I Wanna Edit
len += formatex(menu[len], charsmax(menu) - len, "\r1.\y %L^n", id, "MENU_BUY")
else
len += formatex(menu[len], charsmax(menu) - len, "\d1. %L^n", id, "MENU_BUY")
I Do Yellow You Can See
"\r1.\w %L^n"
=>>>>
"\r1.\y %L^n"
[3]. Question What is else After why line add ?
ANS: Its for when you dead you dont have to open that menu ofc, it would be dark for that user "\d= Dark"
Alright How to Add New Menu ?
In My Sma I Found A Space! On Line 8 , on line 8 there is nothing i wanna add
For example i wanna add Vip Menu? WIth Color?
Add This After 7
Note: Im adding on 8 so after the 7, before the 9
// 8. VIP Menu
len += formatex(menu[len], charsmax(menu) - len, "\r8. \yVIP Menu^n")
Its Only 1 Step?, No Man! Go To "case"
NOTE: If you add Line 8? so case is also 8? Nope, Case is 7, Dont Over Mind Please Do It "-1"
For Example
case 6: = 7Line
After case 6 add line
case 7: // VIP Menu
{
client_cmd(id, "say /vm")
}
What is client_cmd ?
client_cmd is that player do it if someone press m,8 so it said: /vm
This Request Is For Nova
Feel Free Its For Beginners
Good Luck & Have Fun
Edit: I Will Update The Thread When Im Free Or Add zp4.3 Tutorial
ThankYou Soo Much..