Raised This Month: $ Target: $400
 0% 

Amxx studio error!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
extream87
Senior Member
Join Date: Aug 2011
Old 03-26-2014 , 09:27   Re: Amxx studio error!
Reply With Quote #7

Done.
Attention you are not using pun_list and you cant register pcvar you need to regist cvar and use get_pcvar_num or something.
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> #define PLUGIN "Headshot Double Frag" #define VERSION "1.0" #define AUTHOR "Phantom~" new toggle,getmoney,sounds,frags; new pun_list[][] = { "%s has turned %s head into a red jello!!", "%s gave %s a glimpse of his cold blooded murder !!!!" };//pun_list is never used public plugin_precache() { precache_sound("sound/headshot.wav"); } public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("deathmsg", "hook_death" ,"a"); toggle = register_cvar("hsdf_enabled" ,"1"); sounds = register_cvar("kdf_sounds","1"); //you need to use get_pcvar_num frags = register_cvar("hsdf_frags" ,"1"); //you need to use get_pcvar_num } public hook_death() { if(get_pcvar_num(toggle) != 1) return PLUGIN_HANDLED; new amount = 0; new killer = read_data(1); new victim = read_data(2); new kname[32]; get_user_name(killer,kname,31); new vname[32]; get_user_name(victim,vname,31); new weapon[24]; new namount[32]; read_data(4,weapon,23); if(weapon[0] == 'k' && get_user_team(killer) != get_user_team(victim)) { inc_frag(killer); if(get_pcvar_num(getmoney) == 1) { amount = get_user_frags(victim)*random(5)/4; } num_to_str(amount, namount, 32); if(bsounds(sounds)) client_cmd(0,"spk misc/headshot.wav"); } return PLUGIN_HANDLED; } inc_frag(index) { if(!is_user_connected(index)) return; set_user_frags(index,get_user_frags(index)+get_pcvar_num(frags)); } bool: bsounds(pcvar) { if(get_pcvar_num(pcvar) == 1) return true; return false; }

Last edited by extream87; 03-26-2014 at 09:43.
extream87 is offline
 



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 06:04.


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