Raised This Month: $32 Target: $400
 8% 

I have problem on VIP Knife Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ognjen7
Junior Member
Join Date: Nov 2015
Old 02-09-2016 , 18:57   I have problem on VIP Knife Menu
Reply With Quote #1

Hi guys, i wanted to make VIP Knife Menu for my Knife server , but it doesn't works...

I have problem that i didn't have any errors, and i launched cs 1.6 i put the plugin in plugins , models in models folder ...

And when i restarted the server, models was uploading and i waited ...

But when i enter to the server i wrote: /nozevi (Nozevi is knife on English) and the menu didn't worked ...

Here is the code .. Please helppp!!!

Code:
#include <amxmodx>
#include <amxmisc>
#include <engine> 
#include <vault>
#include <fun>
#include <cstrike>

#define PLUGIN "SA Knife VIP"
#define VERSION "1.0" 
#define AUTHOR "PiToN"

#define ACCESS ADMIN_LEVEL_H Flag

#define TASK_INTERVAL 4.0  

new knife_model[33] 
new g_Menu

public plugin_init() { 
	
	register_plugin(PLUGIN, VERSION, AUTHOR) 
	
	register_event( "Damage", "event_damage", "be" )
	register_event("CurWeapon","CurWeapon","be","1=1") 
	
	g_Menu = register_menuid("Knife Menu")
	register_menucmd(g_Menu, 1023, "knifemenu")
	
	register_clcmd("say /nozevi", "vip_noz")
	
	set_task(480.0, "kmodmsg", 0, _, _, "b")
}

public plugin_precache() { 
	precache_model("models/Nozevi/v_knife_1.mdl") 
	precache_model("models/Nozevi/v_knife_2.mdl")
	precache_model("models/Nozevi/v_knife_3.mdl")
	precache_model("models/Nozevi/v_knife_4.mdl")
	precache_model("models/Nozevi/v_knife_5.mdl")
	precache_model("models/Nozevi/v_knife_6.mdl")
	precache_model("models/v_knife.mdl") 
} 

public vip_noz(id) {
	new menuBody[512]
	add(menuBody, 511, "\w[\yUnReal\w] \rVIP \w| \yKnife Menu\r^n^n")
	add(menuBody, 511, "\y1. \rVIP FarCry Knife\r^n")
	add(menuBody, 511, "\y2. \rVIP Prickly Knife\r^n")
	add(menuBody, 511, "\y3. \rVIP Dragon Slayer Knife\r^n")
	add(menuBody, 511, "\y4. \rVIP Gut Knife\r^n")
	add(menuBody, 511, "\y5. \rVIP Skull Axe\r^n")
	add(menuBody, 511, "\y6. \rVIP Light Hammer\r^n")
	add(menuBody, 511, "\y7. \rDefault Knife\r^n^n")
	add(menuBody, 511, "\y0. \rIzadji iz VIP Knife Menu-a!^n")
	
	new keys = ( 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<9 )
	show_menu(id, keys, menuBody, -1, "Knife Menu")
}

public knifemenu(id, key) {
	switch(key) 
	{
		case 0: SetKnife(id , 6)
		case 1: SetKnife(id , 5)
		case 2: SetKnife(id , 4)
		case 3: SetKnife(id , 2)
		case 4: SetKnife(id , 3)
		case 5: SetKnife(id , 1)
		case 6: SetKnife(id , 0)
		default: return PLUGIN_HANDLED
	}
	return PLUGIN_HANDLED;
} 

public SetKnife(id , Knife) {
	knife_model[id] = Knife
	
	new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo) 
	if ( Weapon != CSW_KNIFE )
		return PLUGIN_HANDLED
	
	new vModel[56]
	
	switch(Knife)
	{
		case 0: {
			format(vModel,55,"models/v_knife.mdl")
		}
		case 1: {
			format(vModel,55,"models/Nozevi/v_knife_6.mdl")
		}
		case 2: {
			format(vModel,55,"models/Nozevi/v_knife_5.mdl")
		}
		case 3: {
			format(vModel,55,"models/Nozevi/v_knife_4.mdl")
		}
		case 4: {
			format(vModel,55,"models/Nozevi/v_knife_3.mdl")
		}
		case 5: {
			format(vModel,55,"models/Nozevi/v_knife_2.mdl")
		}
		case 6: {
			format(vModel,55,"models/Nozevi/v_knife_1.mdl")
		}
	} 
	
	entity_set_string(id, EV_SZ_viewmodel, vModel)
	
	return PLUGIN_HANDLED;
}

stock log_kill(killer, victim, weapon[],headshot) {
	user_silentkill( victim );
	
	message_begin( MSG_ALL, get_user_msgid( "DeathMsg" ), {0,0,0}, 0 );
	write_byte( killer );
	write_byte( victim );
	write_byte( headshot );
	write_string( weapon );
	message_end();
	
	new kfrags = get_user_frags( killer );
	set_user_frags( killer, kfrags++ );
	new vfrags = get_user_frags( victim );
	set_user_frags( victim, vfrags++ );
	
	return  PLUGIN_CONTINUE
} 

public client_disconnect(id) {  
	if(task_exists(id)) remove_task(id)  
}  


public kmodmsg() { 

	client_print(0,print_chat,"[Unreal # Explosion VIP Knife] Napisi /nozevi da uzmes VIP Noz!")
}  

public client_authorized(id)
	{
	LoadData(id)
}

LoadData(id) 
{ 
	new authid[32] 
	get_user_authid(id,authid,31)
	
	new vaultkey[64], vaultdata[64]
	
	format(vaultkey, 63, "KMOD_%s", authid)
	get_vaultdata(vaultkey, vaultdata, 63)
	knife_model[id] = str_to_num(vaultdata)
	
}
Ognjen7 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-09-2016 , 19:13   Re: I have problem on VIP Knife Menu
Reply With Quote #2

You didn't check your logs. Your plugin is throwing an error once it loads because you are registering forwards without the appropriate callback function. Any time your plugin does not respond to commands at all, always check your logs. When an error is thrown, it will not work, even if the error is unrelated to the command you are testing.

PHP Code:
register_event"Damage""event_damage""be" )
register_event("CurWeapon","CurWeapon","be","1=1"
Code:
L 02/09/2016 - 19:32:32: Function "event_damage" was not found
L 02/09/2016 - 19:32:32: [AMXX] Displaying debug trace (plugin "untitled.amxx", version "1.0")
L 02/09/2016 - 19:32:32: [AMXX] Run time error 19: function not found 
L 02/09/2016 - 19:32:32: [AMXX]    [0] Untitled.sma::plugin_init (line 23)
It is not showing the error for CurWeapon missing because the code stops once it fails to find the event_damage function. If you add event_damage and run the plugin again, it will then give the same error, except for CurWeapon.

I also recommend using the new menu system
__________________

Last edited by Bugsy; 02-09-2016 at 19:34.
Bugsy is offline
Ognjen7
Junior Member
Join Date: Nov 2015
Old 04-11-2016 , 16:12   Re: I have problem on VIP Knife Menu
Reply With Quote #3

i dont know to fix this can you please make .sma and link me in comment or in pm ? please
Ognjen7 is offline
Alahmoh
Member
Join Date: Jun 2018
Old 06-23-2018 , 05:00   Re: I have problem on VIP Knife Menu
Reply With Quote #4

hey bro the problim because you spammin in pawn you made a faction only for put models on knife try this
Attached Files
File Type: sma Get Plugin or Get Source (vip_knives.sma - 1388 views - 2.1 KB)
Alahmoh is offline
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 06-23-2018 , 05:07   Re: I have problem on VIP Knife Menu
Reply With Quote #5

Quote:
Originally Posted by Alahmoh View Post
hey bro the problim because you spammin in pawn you made a faction only for put models on knife try this
This was 2 years ago.
__________________
stuff
maqi is offline
Alahmoh
Member
Join Date: Jun 2018
Old 06-23-2018 , 05:20   Re: I have problem on VIP Knife Menu
Reply With Quote #6

and what problem with you maqi
Alahmoh is offline
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 06-23-2018 , 06:02   Re: I have problem on VIP Knife Menu
Reply With Quote #7

My problem is that there is no point in trying to help someone who asked for it 2 years ago.
__________________
stuff
maqi is offline
Old 05-25-2021, 11:52
ALonsoVIP4141
This message has been deleted by ALonsoVIP4141.
Reply


Thread Tools
Display Modes

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 02:56.


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