Resolved MAIN MENU

Unpaid Requests, Public Plugins
User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 640
Joined: 3 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

MAIN MENU

#1

Post by Spir0x » 3 Years Ago

Yow guys there's a perfect [ZE] Main Menu :)
with:
Unstuck
Choosing Team
Getting Prize
Choosing View

Image

and please Who can explain me how can i put this message ?

Image
I trynna make money, not friends.

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 2016
Joined: 3 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 117 times
Age: 22
Contact:

#2

Post by Raheem » 3 Years Ago

I'll make TUT soon how to add items to this main menu.
Loading Raheem's signature, Please wait...
Image

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 640
Joined: 3 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#3

Post by Spir0x » 3 Years Ago

Yes bro with Player Config?
we just wait :)
Thank you Raheem!

What about that message when round starting

But i have a little problem u can solv it for me in 3 minutes.

Raheem Please can you compile this for me ? and upload. it's knife menu only for vips with flag A u gave me :)

Code: Select all

#include <zombie_escape>
 
#define is_user_valid(%1) (is_user_alive(%1) && !is_user_bot(%1) && !is_user_hltv(%1))
 
// Models
new const Compat_Models[][] =
{
	"models/zombie_escape/v_combat_knife.mdl",
	"models/zombie_escape/p_combat_knife.mdl"
}

new const Strong_Models[][] =
{
	"models/zombie_escape/v_strong_knife.mdl",
	"models/zombie_escape/p_strong_knife.mdl"
}

new const Katana_Models[][] =
{
	"models/zombie_escape/v_katana_knife.mdl",
	"models/zombie_escape/p_katana_knife.mdl"
}

new const Hammer_Models[][] =
{ 
    "models/zombie_escape/v_hammer_knife.mdl",
    "models/zombie_escape/p_hammer_knife.mdl" 
}

// Sounds
new const g_sound_knife[] = "items/gunpickup2.wav"

new const combat_sounds[][] =
{
	"zombie_escape/knife_menu/combat_deploy.wav",
	"zombie_escape/knife_menu/combat_hit.wav",
	"zombie_escape/knife_menu/combat_hit.wav",
	"zombie_escape/knife_menu/combat_hit.wav",
	"zombie_escape/knife_menu/combat_hit.wav",
	"zombie_escape/knife_menu/combat_hitwall.wav",
	"zombie_escape/knife_menu/combat_slash.wav",
	"zombie_escape/knife_menu/combat_slash.wav",
	"zombie_escape/knife_menu/combat_stab.wav"
}

new const strong_sounds[][] =
{
	"zombie_escape/knife_menu/strong_deploy.wav",
	"zombie_escape/knife_menu/strong_hit.wav",
	"zombie_escape/knife_menu/strong_hit.wav",
	"zombie_escape/knife_menu/strong_hit.wav",
	"zombie_escape/knife_menu/strong_hit.wav",
	"zombie_escape/knife_menu/strong_hitwall.wav",
	"zombie_escape/knife_menu/strong_slash.wav",
	"zombie_escape/knife_menu/strong_slash.wav",
	"zombie_escape/knife_menu/strong_stab.wav"
}

new const katana_sounds[][] =
{
	"zombie_escape/knife_menu/katana_deploy.wav",
	"zombie_escape/knife_menu/katana_hit.wav",
	"zombie_escape/knife_menu/katana_hit.wav",
	"zombie_escape/knife_menu/katana_hit.wav",
	"zombie_escape/knife_menu/katana_hit.wav",
	"zombie_escape/knife_menu/katana_hitwall.wav",
	"zombie_escape/knife_menu/katana_slash.wav",
	"zombie_escape/knife_menu/katana_slash.wav",
	"zombie_escape/knife_menu/katana_stab.wav"
}

new const hammer_sounds[][] =
{
	"zombie_escape/knife_menu/hammer_deploy.wav",
	"zombie_escape/knife_menu/hammer_hit.wav",
	"zombie_escape/knife_menu/hammer_hit.wav",
	"zombie_escape/knife_menu/hammer_hit.wav",
	"zombie_escape/knife_menu/hammer_hit.wav",
	"zombie_escape/knife_menu/hammer_hitwall.wav",
	"zombie_escape/knife_menu/hammer_slash.wav",
	"zombie_escape/knife_menu/hammer_slash.wav",
	"zombie_escape/knife_menu/hammer_stab.wav"
}

new const oldknife_sounds[][] =
{
	"weapons/knife_deploy1.wav",
	"weapons/knife_hit1.wav",
	"weapons/knife_hit2.wav",
	"weapons/knife_hit3.wav",
	"weapons/knife_hit4.wav",
	"weapons/knife_hitwall1.wav",
	"weapons/knife_slash1.wav",
	"weapons/knife_slash2.wav",
	"weapons/knife_stab.wav"
}
 
new bool:g_bCompat[33], bool:g_bStrong[33], bool:g_bKatana[33], bool:g_bHammer[33],
g_iUsedTimes[33], cvar_use_times

public plugin_precache()
{
    new i
	
    for(i = 0; i < sizeof(Hammer_Models); i++)
        precache_model(Hammer_Models[i])
	
    for(i = 0; i < sizeof(Katana_Models); i++)
        precache_model(Katana_Models[i])
	
    for(i = 0; i < sizeof(Compat_Models); i++)
        precache_model(Compat_Models[i])
	
    for(i = 0; i < sizeof(Strong_Models); i++)
        precache_model(Strong_Models[i])
       
    precache_sound(g_sound_knife)
 
    for(i = 0; i < sizeof(combat_sounds); i++)
        precache_sound(combat_sounds[i])
 
    for(i = 0; i < sizeof(strong_sounds); i++)
        precache_sound(strong_sounds[i])
 
    for(i = 0; i < sizeof(katana_sounds); i++)
        precache_sound(katana_sounds[i])
 
    for(i = 0; i < sizeof(hammer_sounds); i++)
        precache_sound(hammer_sounds[i])
}
 
public plugin_natives()
{
    register_native("ze_open_knife_menu", "native_ze_open_knife_menu", 1)
}
 
public plugin_init()
{
    register_plugin("[ZE] Addon: Knife Menu", "1.1", "Jack GamePlay")
	
	// Forwards
    register_forward(FM_EmitSound, "fw_EmitSound")
	
	// Events
    register_event("CurWeapon", "CurrentWeapon", "be", "1=1")

    // Cvars
    cvar_use_times = register_cvar("ze_knife_menu_use_times", "1")
	
	// Messages
    register_message(get_user_msgid("DeathMsg"), "DeathMsg")
}
 
public ze_user_humanized(id)
{
	g_iUsedTimes[id] = 0
}

public client_connect(id)
{
    g_bCompat[id] = false
    g_bStrong[id] = false
    g_bKatana[id] = false
    g_bHammer[id] = false
    g_iUsedTimes[id] = 0
}
 
public Show_Knife_Menu(id)
{
    new menu = menu_create("\rChoose Your Knife\w:", "Knife_Menu_Functions")
    menu_additem(menu, "\yCombat", "", 0)
    menu_additem(menu, "\yGolden", "", 0)
    menu_additem(menu, "\yKatana", "", 0)
    menu_additem(menu, "\yHammer", "", 0)
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
	
    if((g_iUsedTimes[id] < get_pcvar_num(cvar_use_times)) && !ze_is_user_zombie(id) && is_user_valid(id) && ze_get_vip_flags(id) & VIP_A)
    {
        menu_display(id, menu, 0)
    }
    else if(ze_is_user_zombie(id))
    {
        ze_colored_print(id, "!tYou can't open knife menu due to being zombie!y.")
        return PLUGIN_HANDLED
    }
    else if(g_iUsedTimes[id] >= get_pcvar_num(cvar_use_times))
    {
        ze_colored_print(id, "!tYou've used !gKnife menu!y, !twait for the next round!y!", get_pcvar_num(cvar_use_times))
        return PLUGIN_HANDLED
    }
    return PLUGIN_CONTINUE
}
 
public Knife_Menu_Functions(id, menu, key)
{
    if(!is_user_valid(id) || ze_is_user_zombie(id))
        return
       
    switch(key)
    {
        case 0: // Compat
        {
            g_bCompat[id] = true
            g_bStrong[id] = false
            g_bKatana[id] = false
            g_bHammer[id] = false
            g_iUsedTimes[id]++
            rg_remove_item(id, "weapon_knife")
            rg_give_item(id, "weapon_knife", GT_APPEND)
            engclient_cmd(id, "weapon_knife")
            emit_sound(id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
        }
        case 1: // Strong
        {
            g_bCompat[id] = false
            g_bStrong[id] = true
            g_bKatana[id] = false
            g_bHammer[id] = false
            g_iUsedTimes[id]++
            rg_remove_item(id, "weapon_knife")
            rg_give_item(id, "weapon_knife", GT_APPEND)
            engclient_cmd(id, "weapon_knife")
            emit_sound(id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
        }
        case 2: // Katana
        {
            g_bCompat[id] = false
            g_bStrong[id] = false
            g_bKatana[id] = true
            g_bHammer[id] = false
            g_iUsedTimes[id]++
            rg_remove_item(id, "weapon_knife")
            rg_give_item(id, "weapon_knife", GT_APPEND)
            engclient_cmd(id, "weapon_knife")
            emit_sound(id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
        }
        case 3: // Hammer
        {
            g_bCompat[id] = false
            g_bStrong[id] = false
            g_bKatana[id] = false
            g_bHammer[id] = true
            g_iUsedTimes[id]++
            rg_remove_item(id, "weapon_knife")
            rg_give_item(id, "weapon_knife", GT_APPEND)
            engclient_cmd(id, "weapon_knife")
            emit_sound(id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
        }
    }
    menu_destroy(menu)
}
 
public fw_EmitSound(id, channel, const sound[])
{
    if(!is_user_valid(id) || ze_is_user_zombie(id))
        return FMRES_IGNORED
       
    new i
    for(i = 0; i < sizeof(combat_sounds); i++)
    for(i = 0; i < sizeof(strong_sounds); i++)
    for(i = 0; i < sizeof(katana_sounds); i++)
    for(i = 0; i < sizeof(hammer_sounds); i++)
    {
        if(equal(sound, oldknife_sounds[i]))
        {
            if (g_bCompat[id])
            {
                emit_sound(id, channel, combat_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
                return FMRES_SUPERCEDE
            }
            else if (g_bStrong[id])
            {
                emit_sound(id, channel, strong_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
                return FMRES_SUPERCEDE
            }
            else if (g_bKatana[id])
            {
                emit_sound(id, channel, katana_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
                return FMRES_SUPERCEDE
            }
            else if (g_bHammer[id])
            {
                emit_sound(id, channel, hammer_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
                return FMRES_SUPERCEDE
            }
            else if (!g_bCompat[id] || !g_bStrong[id] || !g_bKatana[id] || !g_bHammer[id])
            {
                emit_sound(id, channel, oldknife_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
                return FMRES_SUPERCEDE
            }
        }
    }
    return FMRES_IGNORED
}

public CurrentWeapon(id)
{
    if(!is_user_valid(id) || ze_is_user_zombie(id))
        return
       
    if(get_user_weapon(id) & CSW_KNIFE)
    {
        if(g_bCompat[id])
        {
            cs_set_player_view_model(id, CSW_KNIFE, Compat_Models[0])
            cs_set_player_weap_model(id, CSW_KNIFE, Compat_Models[1])
        }
        else if(g_bStrong[id])
        {
            cs_set_player_view_model(id, CSW_KNIFE, Strong_Models[0])
            cs_set_player_weap_model(id, CSW_KNIFE, Strong_Models[1])
        }
        else if(g_bKatana[id])
        {
            cs_set_player_view_model(id, CSW_KNIFE, Katana_Models[0])
            cs_set_player_weap_model(id, CSW_KNIFE, Katana_Models[1])
        }
        else if(g_bHammer[id])
        {
            cs_set_player_view_model(id, CSW_KNIFE, Hammer_Models[0])
            cs_set_player_weap_model(id, CSW_KNIFE, Hammer_Models[1])
        }
		else
		{
			cs_reset_player_view_model(id, CSW_KNIFE)
			cs_reset_player_weap_model(id, CSW_KNIFE)
		}
    }
}

public DeathMsg(msg_id, msg_dest, id)
{
    static szTruncatedWeapon[33], iAttacker
    get_msg_arg_string(4, szTruncatedWeapon, charsmax(szTruncatedWeapon))
    iAttacker = get_msg_arg_int(1)
   
    if(!is_user_valid(iAttacker) || iAttacker == get_msg_arg_int(2) || !is_user_valid(get_msg_arg_int(2))) // get_msg_arg_int(2) = iVictim
        return
   
    if(equal(szTruncatedWeapon, "knife") && get_user_weapon(iAttacker) & CSW_KNIFE)
    {
        if(g_bCompat[id])
        {
            set_msg_arg_string(4, "Combat knife")
        }
        else if(g_bStrong[id])
        {
            set_msg_arg_string(4, "Strong knife")
        }
        else if(g_bKatana[id])
        {
            set_msg_arg_string(4, "Katana knife")
        }
        else if(g_bHammer[id])
        {
            set_msg_arg_string(4, "Ice knife")
        }
    }
}

public native_ze_open_knife_menu(id)
{
	Show_Knife_Menu(id)
}
I trynna make money, not friends.

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 2016
Joined: 3 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 117 times
Age: 22
Contact:

#4

Post by Raheem » 3 Years Ago

There is important things should be done first of these things. When i finish i'll solve all these topics don't worry : )
Loading Raheem's signature, Please wait...
Image

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 640
Joined: 3 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#5

Post by Spir0x » 3 Years Ago

Okey Thnaks bro !
I trynna make money, not friends.

User avatar
Mohamed Alaa
Mod Developer
Mod Developer
Egypt
Posts: 664
Joined: 3 Years Ago
Location: Egypt
Has thanked: 37 times
Been thanked: 52 times
Age: 20
Contact:

#6

Post by Mohamed Alaa » 3 Years Ago

Keep copying. :D :D
These users thanked the author Mohamed Alaa for the post (total 2):
johnnysins2000 (3 Years Ago) • Raheem (3 Years Ago)
Want your own mod edition? PM me.
Accepting web projects.
CS 1.6 hosting: powergamingtech.com

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 2016
Joined: 3 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 117 times
Age: 22
Contact:

#7

Post by Raheem » 3 Years Ago

Right jack everytime he see new things in any server he ask for it :lol:
Loading Raheem's signature, Please wait...
Image

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 640
Joined: 3 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#8

Post by Spir0x » 3 Years Ago

Jack you said that becuz you are pro scripter.. but dont be like this i dont know why people won't help newbies.
I trynna make money, not friends.

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 2016
Joined: 3 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 117 times
Age: 22
Contact:

#9

Post by Raheem » 3 Years Ago

Ok for main menu, Learn how to edit it here: viewtopic.php?f=7&p=3825#p3825
Second you can use this plugin: https://forums.alliedmods.net/showthread.php?p=798319

Also you can change READY_TO_RUN = !tAre you Ready to Run!y? !gGood Luck !y:) in zombie_escape.txt and make it whatever you need.

Solved.
Spir0x wrote:
3 Years Ago
Jack you said that becuz you are pro scripter.. but dont be like this i dont know why people won't help newbies.
We already help newbies that's why we open this website.
Loading Raheem's signature, Please wait...
Image

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 640
Joined: 3 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#10

Post by Spir0x » 3 Years Ago

Yes i see you help so much but Jack some times wont give some things.
i already used round message but this plugin shows only 1 message.
I trynna make money, not friends.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests