Cerere knife menu plugin

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
User avatar
EleCtr0zZz
Membru, skill +1
Membru, skill +1
Posts: 399
Joined: 25 May 2015, 06:27
Detinator Steam: Da
SteamID: =
Fond eXtream: 0
Has thanked: 4 times
Contact:

26 Mar 2020, 14:41

iNdio wrote:
26 Mar 2020, 14:22
In /cstrike/models trebuie sa ai un folder numit "Knife", il schimbi tu dupa bunul plac (modelele la fel):
{
"models/v_knife.mdl",
"models/Knife/Karambit/Karambit.mdl",
"models/Knife/Bayonet/Bayonet.mdl"
};
Download
Merge foarte bine , dar poti adauga inca 2 knife-uri? + la toate sa fie modelul care il tii in mana ( adica si playerii sa vada ce knife tii in mana ) nu stiu daca e w sau p
multumesc !!
eXtreamSHOP
User avatar
iNdio
Membru, skill +4
Membru, skill +4
Posts: 1614
Joined: 28 Jan 2015, 17:42
Detinator Steam: Da
SteamID: iNdioPGL
Reputatie: Fost Membru Club eXtreamCS (6 luni)
Castigator Membru Club eXtream @ Ganduri de sub dus (25 OCT - 25 FEB)
Fond eXtream: 0

26 Mar 2020, 15:03

Is pe tel, in addon gasesti pluginul, Knife_iNdio cred...

addon-uri/topic-t348033.html
Where Cs had no value, amxx, sometimes, had its price...
User avatar
EleCtr0zZz
Membru, skill +1
Membru, skill +1
Posts: 399
Joined: 25 May 2015, 06:27
Detinator Steam: Da
SteamID: =
Fond eXtream: 0
Has thanked: 4 times
Contact:

26 Mar 2020, 15:29

iNdio wrote:
26 Mar 2020, 15:03
Is pe tel, in addon gasesti pluginul, Knife_iNdio cred...

addon-uri/topic-t348033.html
Mai bine te astept sa intrii pe pc , imi place cum e plugin-ul care mi l-ai dat :)
Cand o sa poti si daca vrei sa faci modificarile alea , multumesc
User avatar
EleCtr0zZz
Membru, skill +1
Membru, skill +1
Posts: 399
Joined: 25 May 2015, 06:27
Detinator Steam: Da
SteamID: =
Fond eXtream: 0
Has thanked: 4 times
Contact:

26 Mar 2020, 18:00

+ ai uitat sa pui acces doar la vip , toti playerii au acces
zLowCS
Membru, skill 0
Membru, skill 0
Posts: 26
Joined: 28 Jan 2017, 12:20
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 1 time
Contact:

26 Mar 2020, 18:19

| Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < colorchat >
#include < fakemeta >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "Meniu Knife"
#define VERSION "1.0"
#define AUTHOR "zLow"

new Knife1_V[] = "models/knife/Knife1.mdl"
new Knife2_V[] = "models/knife/Knife2.mdl"
new Knife3_V[] = "models/knife/Knife3.mdl"

new bool: Knife1[33]
new bool: Knife2[33]
new bool: Knife3[33]

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd ( "say /knife", "cmdKnife" );
	register_clcmd ( "say_team /knife", "cmdKnife" );
	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );

}
public plugin_precache() {
    precache_model(Knife1_V)
    precache_model(Knife2_V)
	precache_model(Knife3_V)
}

public cmdKnife ( id ) 
{

	if ( !( get_user_flags( id ) & ADMIN_LEVEL_H ) )
	{
		client_cmd( id, "echo NU ai acces la aceasta comanda!" );
		return PLUGIN_HANDLED;
	}

	if ( is_user_alive(id) )
	{
		new menu = menu_create ( "Knife Menu:", "KnifeMenu" );
		menu_additem ( menu, "\yModel \r1", "1", 0 );
		menu_additem ( menu, "\yModel \r2", "2", 0 );
		menu_additem ( menu, "\yDefault", "3", 0 );
    
		menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
		menu_display ( id, menu, 0 );
	
		return 1;
	}

	return 1;
}

public KnifeMenu ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
				client_print(id, print_chat, "Ti-ai ales Modelul 1.")
                Knife1[id] = true;
				menu_destroy ( menu );
				return 1;

		}
		case 2:
		{
				client_print(id, print_chat, "Ti-ai ales Modelul 2.")
                Knife2[id] = true;
				menu_destroy ( menu );
				return 1;
		}
		case 3:
		{
				client_print(id, print_chat, "Ti-ai ales modelul default.")
                Knife3[id] = true;
				menu_destroy ( menu );
				return 1;
		}
	}

	return PLUGIN_HANDLED;
}


public EVENT_CurWeapon(id) {
    if(is_user_connected(id)) {
        if(get_user_weapon(id) == CSW_KNIFE) {
            if(Knife1[id])
                set_pev(id, pev_viewmodel2, Knife1_V)
        }
		if(get_user_weapon(id) == CSW_KNIFE) {
		    if(Knife2[id])
                set_pev(id, pev_viewmodel2, Knife2_V)
		}
	    if(get_user_weapon(id) == CSW_KNIFE) {
		    if(Knife3[id])
                set_pev(id, pev_viewmodel2, Knife3_V)
		}
    }
 
}
Daca ar putea un scripter sa rezolve loose identitation , ca eu nu ma pricep sa le aranjez :))
User avatar
EleCtr0zZz
Membru, skill +1
Membru, skill +1
Posts: 399
Joined: 25 May 2015, 06:27
Detinator Steam: Da
SteamID: =
Fond eXtream: 0
Has thanked: 4 times
Contact:

26 Mar 2020, 18:35

zLowCS wrote:
26 Mar 2020, 18:19
| Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < colorchat >
#include < fakemeta >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "Meniu Knife"
#define VERSION "1.0"
#define AUTHOR "zLow"

new Knife1_V[] = "models/knife/Knife1.mdl"
new Knife2_V[] = "models/knife/Knife2.mdl"
new Knife3_V[] = "models/knife/Knife3.mdl"

new bool: Knife1[33]
new bool: Knife2[33]
new bool: Knife3[33]

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd ( "say /knife", "cmdKnife" );
	register_clcmd ( "say_team /knife", "cmdKnife" );
	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );

}
public plugin_precache() {
    precache_model(Knife1_V)
    precache_model(Knife2_V)
	precache_model(Knife3_V)
}

public cmdKnife ( id ) 
{

	if ( !( get_user_flags( id ) & ADMIN_LEVEL_H ) )
	{
		client_cmd( id, "echo NU ai acces la aceasta comanda!" );
		return PLUGIN_HANDLED;
	}

	if ( is_user_alive(id) )
	{
		new menu = menu_create ( "Knife Menu:", "KnifeMenu" );
		menu_additem ( menu, "\yModel \r1", "1", 0 );
		menu_additem ( menu, "\yModel \r2", "2", 0 );
		menu_additem ( menu, "\yDefault", "3", 0 );
    
		menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
		menu_display ( id, menu, 0 );
	
		return 1;
	}

	return 1;
}

public KnifeMenu ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
				client_print(id, print_chat, "Ti-ai ales Modelul 1.")
                Knife1[id] = true;
				menu_destroy ( menu );
				return 1;

		}
		case 2:
		{
				client_print(id, print_chat, "Ti-ai ales Modelul 2.")
                Knife2[id] = true;
				menu_destroy ( menu );
				return 1;
		}
		case 3:
		{
				client_print(id, print_chat, "Ti-ai ales modelul default.")
                Knife3[id] = true;
				menu_destroy ( menu );
				return 1;
		}
	}

	return PLUGIN_HANDLED;
}


public EVENT_CurWeapon(id) {
    if(is_user_connected(id)) {
        if(get_user_weapon(id) == CSW_KNIFE) {
            if(Knife1[id])
                set_pev(id, pev_viewmodel2, Knife1_V)
        }
		if(get_user_weapon(id) == CSW_KNIFE) {
		    if(Knife2[id])
                set_pev(id, pev_viewmodel2, Knife2_V)
		}
	    if(get_user_weapon(id) == CSW_KNIFE) {
		    if(Knife3[id])
                set_pev(id, pev_viewmodel2, Knife3_V)
		}
    }
 
}
Daca ar putea un scripter sa rezolve loose identitation , ca eu nu ma pricep sa le aranjez :))
Multumesc :) astept si rezolvarea la chestia cu lose
zLowCS
Membru, skill 0
Membru, skill 0
Posts: 26
Joined: 28 Jan 2017, 12:20
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 1 time
Contact:

26 Mar 2020, 18:41

EleCtr0zZz wrote:
26 Mar 2020, 18:35
zLowCS wrote:
26 Mar 2020, 18:19
| Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < colorchat >
#include < fakemeta >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "Meniu Knife"
#define VERSION "1.0"
#define AUTHOR "zLow"

new Knife1_V[] = "models/knife/Knife1.mdl"
new Knife2_V[] = "models/knife/Knife2.mdl"
new Knife3_V[] = "models/knife/Knife3.mdl"

new bool: Knife1[33]
new bool: Knife2[33]
new bool: Knife3[33]

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd ( "say /knife", "cmdKnife" );
	register_clcmd ( "say_team /knife", "cmdKnife" );
	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );

}
public plugin_precache() {
    precache_model(Knife1_V)
    precache_model(Knife2_V)
	precache_model(Knife3_V)
}

public cmdKnife ( id ) 
{

	if ( !( get_user_flags( id ) & ADMIN_LEVEL_H ) )
	{
		client_cmd( id, "echo NU ai acces la aceasta comanda!" );
		return PLUGIN_HANDLED;
	}

	if ( is_user_alive(id) )
	{
		new menu = menu_create ( "Knife Menu:", "KnifeMenu" );
		menu_additem ( menu, "\yModel \r1", "1", 0 );
		menu_additem ( menu, "\yModel \r2", "2", 0 );
		menu_additem ( menu, "\yDefault", "3", 0 );
    
		menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
		menu_display ( id, menu, 0 );
	
		return 1;
	}

	return 1;
}

public KnifeMenu ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
				client_print(id, print_chat, "Ti-ai ales Modelul 1.")
                Knife1[id] = true;
				menu_destroy ( menu );
				return 1;

		}
		case 2:
		{
				client_print(id, print_chat, "Ti-ai ales Modelul 2.")
                Knife2[id] = true;
				menu_destroy ( menu );
				return 1;
		}
		case 3:
		{
				client_print(id, print_chat, "Ti-ai ales modelul default.")
                Knife3[id] = true;
				menu_destroy ( menu );
				return 1;
		}
	}

	return PLUGIN_HANDLED;
}


public EVENT_CurWeapon(id) {
    if(is_user_connected(id)) {
        if(get_user_weapon(id) == CSW_KNIFE) {
            if(Knife1[id])
                set_pev(id, pev_viewmodel2, Knife1_V)
        }
		if(get_user_weapon(id) == CSW_KNIFE) {
		    if(Knife2[id])
                set_pev(id, pev_viewmodel2, Knife2_V)
		}
	    if(get_user_weapon(id) == CSW_KNIFE) {
		    if(Knife3[id])
                set_pev(id, pev_viewmodel2, Knife3_V)
		}
    }
 
}
Daca ar putea un scripter sa rezolve loose identitation , ca eu nu ma pricep sa le aranjez :))
Multumesc :) astept si rezolvarea la chestia cu lose
N-ai pentru ce frate , dar nici eu nu ma pricep sa rezolv chestiile legate de loose identitation , sper sa faca un scripter un tutorial :))
User avatar
EnTeR_
Membru, skill +1
Membru, skill +1
Posts: 457
Joined: 13 Sep 2014, 15:36
Detinator Steam: Da
Fond eXtream: 0
Been thanked: 5 times

26 Mar 2020, 19:16

loose identitation nu afecteaza cu nimic, apare doar atunci cand nu este aranjat codul cum trebuie. Foloseste "#pragma tabsize 0" pentru a le elimina.
Discord: EyeKon#3230
zLowCS
Membru, skill 0
Membru, skill 0
Posts: 26
Joined: 28 Jan 2017, 12:20
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 1 time
Contact:

26 Mar 2020, 19:42

EnTeR_ wrote:
26 Mar 2020, 19:16
loose identitation nu afecteaza cu nimic, apare doar atunci cand nu este aranjat codul cum trebuie. Foloseste "#pragma tabsize 0" pentru a le elimina.
Si #pragma tabsize 0 , nu afecteaza cu nimic , nu?
| Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < colorchat >
#include < fakemeta >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "Meniu Knife"
#define VERSION "1.0"
#define AUTHOR "zLow"
#pragma tabsize 0
new Knife1_V[] = "models/knife/Knife1.mdl"
new Knife2_V[] = "models/knife/Knife2.mdl"
new Knife3_V[] = "models/knife/Knife3.mdl"

new bool: Knife1[33]
new bool: Knife2[33]
new bool: Knife3[33]

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd ( "say /knife", "cmdKnife" );
	register_clcmd ( "say_team /knife", "cmdKnife" );
	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );

}
public plugin_precache() {
    precache_model(Knife1_V)
    precache_model(Knife2_V)
	precache_model(Knife3_V)
}

public cmdKnife ( id ) 
{

	if ( !( get_user_flags( id ) & ADMIN_LEVEL_H ) )
	{
		client_cmd( id, "echo NU ai acces la aceasta comanda!" );
		return PLUGIN_HANDLED;
	}

	if ( is_user_alive(id) )
	{
		new menu = menu_create ( "Knife Menu:", "KnifeMenu" );
		menu_additem ( menu, "\yModel \r1", "1", 0 );
		menu_additem ( menu, "\yModel \r2", "2", 0 );
		menu_additem ( menu, "\yDefault", "3", 0 );
    
		menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
		menu_display ( id, menu, 0 );
	
		return 1;
	}

	return 1;
}

public KnifeMenu ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
				client_print(id, print_chat, "Ti-ai ales Modelul 1.")
                Knife1[id] = true;
				menu_destroy ( menu );
				return 1;

		}
		case 2:
		{
				client_print(id, print_chat, "Ti-ai ales Modelul 2.")
                Knife2[id] = true;
				menu_destroy ( menu );
				return 1;
		}
		case 3:
		{
				client_print(id, print_chat, "Ti-ai ales modelul default.")
                Knife3[id] = true;
				menu_destroy ( menu );
				return 1;
		}
	}

	return PLUGIN_HANDLED;
}


public EVENT_CurWeapon(id) {
    if(is_user_connected(id)) {
        if(get_user_weapon(id) == CSW_KNIFE) {
            if(Knife1[id])
                set_pev(id, pev_viewmodel2, Knife1_V)
        }
		if(get_user_weapon(id) == CSW_KNIFE) {
		    if(Knife2[id])
                set_pev(id, pev_viewmodel2, Knife2_V)
		}
	    if(get_user_weapon(id) == CSW_KNIFE) {
		    if(Knife3[id])
                set_pev(id, pev_viewmodel2, Knife3_V)
		}
    }
 
}
User avatar
EnTeR_
Membru, skill +1
Membru, skill +1
Posts: 457
Joined: 13 Sep 2014, 15:36
Detinator Steam: Da
Fond eXtream: 0
Been thanked: 5 times

26 Mar 2020, 20:30

zLowCS wrote:
26 Mar 2020, 19:42
EnTeR_ wrote:
26 Mar 2020, 19:16
loose identitation nu afecteaza cu nimic, apare doar atunci cand nu este aranjat codul cum trebuie. Foloseste "#pragma tabsize 0" pentru a le elimina.
Si #pragma tabsize 0 , nu afecteaza cu nimic , nu?
| Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < colorchat >
#include < fakemeta >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "Meniu Knife"
#define VERSION "1.0"
#define AUTHOR "zLow"
#pragma tabsize 0
new Knife1_V[] = "models/knife/Knife1.mdl"
new Knife2_V[] = "models/knife/Knife2.mdl"
new Knife3_V[] = "models/knife/Knife3.mdl"

new bool: Knife1[33]
new bool: Knife2[33]
new bool: Knife3[33]

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd ( "say /knife", "cmdKnife" );
	register_clcmd ( "say_team /knife", "cmdKnife" );
	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );

}
public plugin_precache() {
    precache_model(Knife1_V)
    precache_model(Knife2_V)
	precache_model(Knife3_V)
}

public cmdKnife ( id ) 
{

	if ( !( get_user_flags( id ) & ADMIN_LEVEL_H ) )
	{
		client_cmd( id, "echo NU ai acces la aceasta comanda!" );
		return PLUGIN_HANDLED;
	}

	if ( is_user_alive(id) )
	{
		new menu = menu_create ( "Knife Menu:", "KnifeMenu" );
		menu_additem ( menu, "\yModel \r1", "1", 0 );
		menu_additem ( menu, "\yModel \r2", "2", 0 );
		menu_additem ( menu, "\yDefault", "3", 0 );
    
		menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
		menu_display ( id, menu, 0 );
	
		return 1;
	}

	return 1;
}

public KnifeMenu ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
				client_print(id, print_chat, "Ti-ai ales Modelul 1.")
                Knife1[id] = true;
				menu_destroy ( menu );
				return 1;

		}
		case 2:
		{
				client_print(id, print_chat, "Ti-ai ales Modelul 2.")
                Knife2[id] = true;
				menu_destroy ( menu );
				return 1;
		}
		case 3:
		{
				client_print(id, print_chat, "Ti-ai ales modelul default.")
                Knife3[id] = true;
				menu_destroy ( menu );
				return 1;
		}
	}

	return PLUGIN_HANDLED;
}


public EVENT_CurWeapon(id) {
    if(is_user_connected(id)) {
        if(get_user_weapon(id) == CSW_KNIFE) {
            if(Knife1[id])
                set_pev(id, pev_viewmodel2, Knife1_V)
        }
		if(get_user_weapon(id) == CSW_KNIFE) {
		    if(Knife2[id])
                set_pev(id, pev_viewmodel2, Knife2_V)
		}
	    if(get_user_weapon(id) == CSW_KNIFE) {
		    if(Knife3[id])
                set_pev(id, pev_viewmodel2, Knife3_V)
		}
    }
 
}
Nu, nu afecteaza!
Discord: EyeKon#3230
User avatar
EleCtr0zZz
Membru, skill +1
Membru, skill +1
Posts: 399
Joined: 25 May 2015, 06:27
Detinator Steam: Da
SteamID: =
Fond eXtream: 0
Has thanked: 4 times
Contact:

26 Mar 2020, 20:56

zLowCS wrote:
26 Mar 2020, 19:42
EnTeR_ wrote:
26 Mar 2020, 19:16
loose identitation nu afecteaza cu nimic, apare doar atunci cand nu este aranjat codul cum trebuie. Foloseste "#pragma tabsize 0" pentru a le elimina.
Si #pragma tabsize 0 , nu afecteaza cu nimic , nu?
| Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < colorchat >
#include < fakemeta >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "Meniu Knife"
#define VERSION "1.0"
#define AUTHOR "zLow"
#pragma tabsize 0
new Knife1_V[] = "models/knife/Knife1.mdl"
new Knife2_V[] = "models/knife/Knife2.mdl"
new Knife3_V[] = "models/knife/Knife3.mdl"

new bool: Knife1[33]
new bool: Knife2[33]
new bool: Knife3[33]

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd ( "say /knife", "cmdKnife" );
	register_clcmd ( "say_team /knife", "cmdKnife" );
	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );

}
public plugin_precache() {
    precache_model(Knife1_V)
    precache_model(Knife2_V)
	precache_model(Knife3_V)
}

public cmdKnife ( id ) 
{

	if ( !( get_user_flags( id ) & ADMIN_LEVEL_H ) )
	{
		client_cmd( id, "echo NU ai acces la aceasta comanda!" );
		return PLUGIN_HANDLED;
	}

	if ( is_user_alive(id) )
	{
		new menu = menu_create ( "Knife Menu:", "KnifeMenu" );
		menu_additem ( menu, "\yModel \r1", "1", 0 );
		menu_additem ( menu, "\yModel \r2", "2", 0 );
		menu_additem ( menu, "\yDefault", "3", 0 );
    
		menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
		menu_display ( id, menu, 0 );
	
		return 1;
	}

	return 1;
}

public KnifeMenu ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
				client_print(id, print_chat, "Ti-ai ales Modelul 1.")
                Knife1[id] = true;
				menu_destroy ( menu );
				return 1;

		}
		case 2:
		{
				client_print(id, print_chat, "Ti-ai ales Modelul 2.")
                Knife2[id] = true;
				menu_destroy ( menu );
				return 1;
		}
		case 3:
		{
				client_print(id, print_chat, "Ti-ai ales modelul default.")
                Knife3[id] = true;
				menu_destroy ( menu );
				return 1;
		}
	}

	return PLUGIN_HANDLED;
}


public EVENT_CurWeapon(id) {
    if(is_user_connected(id)) {
        if(get_user_weapon(id) == CSW_KNIFE) {
            if(Knife1[id])
                set_pev(id, pev_viewmodel2, Knife1_V)
        }
		if(get_user_weapon(id) == CSW_KNIFE) {
		    if(Knife2[id])
                set_pev(id, pev_viewmodel2, Knife2_V)
		}
	    if(get_user_weapon(id) == CSW_KNIFE) {
		    if(Knife3[id])
                set_pev(id, pev_viewmodel2, Knife3_V)
		}
    }
 
}
Poti adauga si p sau w nu stiu care este exact ca sa vada si ceilalti playeri cutitul in mana altui player?
User avatar
EleCtr0zZz
Membru, skill +1
Membru, skill +1
Posts: 399
Joined: 25 May 2015, 06:27
Detinator Steam: Da
SteamID: =
Fond eXtream: 0
Has thanked: 4 times
Contact:

26 Mar 2020, 21:12

zLowCS wrote:
26 Mar 2020, 19:42
EnTeR_ wrote:
26 Mar 2020, 19:16
loose identitation nu afecteaza cu nimic, apare doar atunci cand nu este aranjat codul cum trebuie. Foloseste "#pragma tabsize 0" pentru a le elimina.
Si #pragma tabsize 0 , nu afecteaza cu nimic , nu?
| Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < colorchat >
#include < fakemeta >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "Meniu Knife"
#define VERSION "1.0"
#define AUTHOR "zLow"
#pragma tabsize 0
new Knife1_V[] = "models/knife/Knife1.mdl"
new Knife2_V[] = "models/knife/Knife2.mdl"
new Knife3_V[] = "models/knife/Knife3.mdl"

new bool: Knife1[33]
new bool: Knife2[33]
new bool: Knife3[33]

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd ( "say /knife", "cmdKnife" );
	register_clcmd ( "say_team /knife", "cmdKnife" );
	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );

}
public plugin_precache() {
    precache_model(Knife1_V)
    precache_model(Knife2_V)
	precache_model(Knife3_V)
}

public cmdKnife ( id ) 
{

	if ( !( get_user_flags( id ) & ADMIN_LEVEL_H ) )
	{
		client_cmd( id, "echo NU ai acces la aceasta comanda!" );
		return PLUGIN_HANDLED;
	}

	if ( is_user_alive(id) )
	{
		new menu = menu_create ( "Knife Menu:", "KnifeMenu" );
		menu_additem ( menu, "\yModel \r1", "1", 0 );
		menu_additem ( menu, "\yModel \r2", "2", 0 );
		menu_additem ( menu, "\yDefault", "3", 0 );
    
		menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
		menu_display ( id, menu, 0 );
	
		return 1;
	}

	return 1;
}

public KnifeMenu ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
				client_print(id, print_chat, "Ti-ai ales Modelul 1.")
                Knife1[id] = true;
				menu_destroy ( menu );
				return 1;

		}
		case 2:
		{
				client_print(id, print_chat, "Ti-ai ales Modelul 2.")
                Knife2[id] = true;
				menu_destroy ( menu );
				return 1;
		}
		case 3:
		{
				client_print(id, print_chat, "Ti-ai ales modelul default.")
                Knife3[id] = true;
				menu_destroy ( menu );
				return 1;
		}
	}

	return PLUGIN_HANDLED;
}


public EVENT_CurWeapon(id) {
    if(is_user_connected(id)) {
        if(get_user_weapon(id) == CSW_KNIFE) {
            if(Knife1[id])
                set_pev(id, pev_viewmodel2, Knife1_V)
        }
		if(get_user_weapon(id) == CSW_KNIFE) {
		    if(Knife2[id])
                set_pev(id, pev_viewmodel2, Knife2_V)
		}
	    if(get_user_weapon(id) == CSW_KNIFE) {
		    if(Knife3[id])
                set_pev(id, pev_viewmodel2, Knife3_V)
		}
    }
 
}
eroare la compilare
| Afiseaza codul
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

knife.sma(0) : error 075: input line too long (after substitutions)
knife.sma(1) : error 038: extra characters on line
knife.sma(1) : error 075: input line too long (after substitutions)
knife.sma(2) : error 021: symbol already defined: "register_clcmd"
knife.sma(3) : error 021: symbol already defined: "menu_additem"
knife.sma(6) : warning 203: symbol is never used: "gister_plugin"
knife.sma(6) : warning 203: symbol is never used: "menu"
knife.sma(6) : error 013: no entry point (no public functions)

6 Errors.
Could not locate output file knife.amx (compile failed).
Post Reply

Return to “Cereri”

  • Information