Raised This Month: $ Target: $400
 0% 

Hide Weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Newplayer12
Junior Member
Join Date: Dec 2022
Old 12-30-2022 , 13:48   Re: Hide Weapons
Reply With Quote #1

Hey Thanks but it's not working
Here's the code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new his_weapons[33]

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

register_clcmd( "say /menu", "menuInvisDisplay" );
register_clcmd("say_team /menu", "menuInvisDisplay");

register_menucmd( register_menuid( "" ), ( 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<9 ) , "MenuInvis" );

// Add your code here...
}

public menuInvisDisplay(id ){

static menu[ 512 ];

new len = 0;

//**MENU TITLE**
len += format (menu[len], sizeof menu - len, "\rHide Weapon^n^n")

len += format( menu[len], sizeof menu - len, "\y1. \wWeapons: %s^n", his_weapons[id] ? "\yON" : "\rOFF");

len += format( menu[len], sizeof menu - len, "\y0. \wExit" );

show_menu( id, ( 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<9 ), menu, -1 );

return PLUGIN_HANDLED;
}
public MenuInvis( key, id )
{
switch( key )
{
case 0:
{
hide_weapon(id)
menuInvisDisplay( id );
}
default:
{
show_menu( id, 0, "" );
}
}
}

public hide_weapon(id)
{
switch(his_weapons[id])
{
case 0:
{
his_weapons[id] = 1
set_pev(id, pev_viewmodel, 0);
set_pev(id, pev_weaponmodel, 0);
}
case 1:
{
his_weapons[id] = 0
set_pev(id, pev_viewmodel, 1);
set_pev(id, pev_weaponmodel, 1);
}
}
}
Newplayer12 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode