Sory for my bad english.
I have made a plugin but it dont works It copile fine but not work.
So i think that anyone can help me
I want to write a plugin who will restrickt to pick up weapons what is on the ground only ADMINS can pick UP the weapons who are on the ground but other players cant pick up the AWP fromthe ground .
There is the code. Maybe the code is bad i dont know becouse I am a starting modder
If anyone can help me please help.
Thanks ..
There is the CODE.
Quote:
////////////////////////////////////////
// //
// AWP restriction plugin //
// //
// By Andriusxxx //
////////////////////////////////////////
#define CSW_P228 1
#define CSW_SCOUT 3
#define CSW_HEGRENADE 4
#define CSW_XM1014 5
#define CSW_C4 6
#define CSW_MAC10 7
#define CSW_AUG 8
#define CSW_SMOKEGRENADE 9
#define CSW_ELITE 10
#define CSW_FIVESEVEN 11
#define CSW_UMP45 12
#define CSW_SG550 13
#define CSW_GALI 14
#define CSW_GALIL 14
#define CSW_FAMAS 15
#define CSW_USP 16
#define CSW_GLOCK18 17
#define CSW_AWP 18
#define CSW_MP5NAVY 19
#define CSW_M249 20
#define CSW_M3 21
#define CSW_M4A1 22
#define CSW_TMP 23
#define CSW_G3SG1 24
#define CSW_FLASHBANG 25
#define CSW_DEAGLE 26
#define CSW_SG552 27
#define CSW_AK47 28
#define CSW_KNIFE 29
#define CSW_P90 30
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#define ADMIN_LEVEL ADMIN_LEVEL_H
public plugin_modules()
{
require_module("fun")
require_module("cstrike")
}
public plugin_init(){
register_plugin("AWP tik V.I.P","1.0","Andriusxxx csZone.LT")
register_event("pasimti_ginkla","awp_tikrint" ,"b","1=18")
register_cvar("awp_only_for_admins", "1")
register_cvar("n_awp","1")
return PLUGIN_CONTINUE
}
public awp_tikrint()
{
if (!get_cvar_num("n_awp")) return PLUGIN_HANDLED
new id = read_data(0)
if(get_cvar_num("awp_only_for_admins") == 1 && access(id, ADMIN_LEVEL))
{
return PLUGIN_CONTINUE
}
client_cmd(id, "drop","weapon_awp")
client_print(id, print_center, "AWP is only for admins! Pick up another gun!")
return PLUGIN_CONTINUE
}
|