need your help please :D
Hy everyone, I made this script to remove every weapon and add a knife when ever I use amx_knife 1 , then I wanted to do the same when a user picks up a weapon but for some reason it just won't work
#include <amxmod> #include <amxmisc> //This contains some useful functions #include <fun> //This contains the function to change health new PLUGIN[]="Knife Round" new AUTHOR[]="Kristof" new VERSION[]="1.00" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_concmd("amx_Knife", "cmd_kniferound", ADMIN_SLAY, "1 or 0 ") register_event("WeapPickup","check_wapen","b" ,"1!6") register_cvar("sv_noweapons","0") } public check_wapen() { if (get_cvar_num("sv_noweapons") != 1) return PLUGIN_CONTINUE new id = read_data(0) new name[18] get_user_name ( id, name, 17 ) new player = find_player(name) client_print(id, print_center, "Wapens zijn niet toegelaten.Enkel Knife!") client_print(id, print_center,"%s",name) strip_user_weapons (player+1) return PLUGIN_CONTINUE } public cmd_kniferound(id, level, cid) { if (!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED new a[2]//0 op einde vn string read_argv(1,a,1)//id,output,lengte new invoer = str_to_num(a) if (invoer==1)//als dan alleen mes { new players[32],num get_players(players, num) new i for(i=0;i<num;i++){ strip_user_weapons (players[i]) give_item(i+1, "weapon_knife") } console_print(id, "Knife round enabled" ) set_cvar_num("sv_noweapons",1) }else{ console_print(id, "Knife round disabled" ) set_cvar_num("sv_noweapons",0) } return PLUGIN_CONTINUE } |
Re: need your help please :D
This should be enough :
PHP Code:
|
| All times are GMT -4. The time now is 01:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.