PHP- Kodu:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "JDM"
new BoxT[] = "models/v_boxt.mdl";
new BoxCT[] = "models/v_boxct.mdl";
new Wolf[] = "models/Wolverine.mdl";
new Kurek[] = "models/kurek.mdl";
new Samuray[] = "models/v_samuray2.mdl";
new g_box[33], g_wolf[33], g_kurek[33], g_samuray[33]
public plugin_precache() {
precache_model(BoxT);
precache_model(BoxCT);
precache_model(Wolf);
precache_model(Kurek);
precache_model(Samuray);
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /box","cmd_Box")
register_clcmd("say /wolf", "cmd_Kurt")
register_clcmd("say /kurek", "cmd_Kurek")
register_clcmd("say /samuray", "cmd_Samuray")
register_event("DeathMsg", "eDeath", "a");
register_event("CurWeapon", "eCurWeapon", "be", "1=1")
}
public cmd_Box(id) {
if(!is_user_alive(id))
return;
g_box[id] = 1
g_wolf[id] = 0
g_kurek[id] = 0
g_samuray[id] = 0
}
public cmd_Kurt(id) {
if(!is_user_alive(id))
return;
g_box[id] = 0
g_wolf[id] = 1
g_kurek[id] = 0
g_samuray[id] = 0
}
public cmd_Kurek(id) {
if(!is_user_alive(id))
return;
g_box[id] = 0
g_wolf[id] = 0
g_kurek[id] = 1
g_samuray[id] = 0
}
public cmd_Samuray(id) {
if(!is_user_alive(id))
return;
g_box[id] = 0
g_wolf[id] = 0
g_kurek[id] = 0
g_samuray[id] = 1
}
public eDeath() {
new victim = read_data(2)
g_box[victim] = 0
g_wolf[victim] = 0
g_kurek[victim] = 0
g_samuray[victim] = 0
}
public eCurWeapon(id) {
new weaponID = read_data(2)
switch(get_user_team(id)) {
case 1:{
if(weaponID == CSW_KNIFE) {
if(g_box[id]) {
set_pev(id, pev_viewmodel2, BoxT);
set_pev(id, pev_weaponmodel2, "");
}
if(g_wolf[id]) {
set_pev(id, pev_viewmodel2, Wolf)
set_pev(id, pev_weaponmodel2, "");
}
if(g_kurek[id]) {
set_pev(id, pev_viewmodel2, Kurek)
set_pev(id, pev_weaponmodel2, "");
}
if(g_samuray[id]) {
set_pev(id, pev_viewmodel2, Samuray)
set_pev(id, pev_weaponmodel2, "");
}
}
}
case 2:{
if(weaponID == CSW_KNIFE) {
if(g_box[id]) {
set_pev(id, pev_viewmodel2, BoxCT);
set_pev(id, pev_weaponmodel2, "");
}
if(g_wolf[id]) {
set_pev(id, pev_viewmodel2, Wolf)
set_pev(id, pev_weaponmodel2, "");
}
if(g_kurek[id]) {
set_pev(id, pev_viewmodel2, Kurek)
set_pev(id, pev_weaponmodel2, "");
}
if(g_samuray[id]) {
set_pev(id, pev_viewmodel2, Samuray)
set_pev(id, pev_weaponmodel2, "");
}
}
}
}
return PLUGIN_CONTINUE
}