Пользователь
- Сообщения
- 43
- Реакции
- 0
Hello im using one plugin for skins but when i write and i change AK47 skin. The skin not show directly but i need to go in knife or in grenade and to back again in weapons to see new skin witch i choose. Do you know anybody how can i fixed when i choose new skin ak47 to show directly?
Код:
#include <amxmodx>
#include <cstrike>
#include <cromchat>
new const PLUGIN[] = "Ak47 Menu";
new const VERSION[] = "1.2.1";
new const AUTHOR[] = "RevCrew";
new const AKModels[][] =
{
"models/v_ak47.mdl",
"models/mpgskins/mpg-ak47/version1/v_ak47.mdl",
"models/mpgskins/mpg-ak47/version2/v_ak47.mdl",
"models/mpgskins/mpg-ak47/version3/v_ak47.mdl",
"models/mpgskins/mpg-ak47/version4/v_ak47.mdl"
};
new const AKMenuNames[][] =
{
"Ak47 [DEFAUT]",
"Ak47 Rat Rod",
"Ak47 Fade",
"Ak47 Fuel Injector",
"Ak47 Ice Coaled"
};
new AK[33];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /ak","AkMenu");
register_event("CurWeapon", "CurentWeapon", "be", "1=1");
}
public plugin_precache()
{
for(new i; i < sizeof AKModels; i++)
{
precache_model(AKModels[i]);
}
}
public MenuAk(id)
{
new menu = menu_create("\yMPG Skin \rAk47 Menu", "AkCase")
menu_additem(menu, "Ak47 \r[DEFAUT]^n", "1", 0)
menu_additem(menu, "\wAk47 \yRat Rod", "2", 0)
menu_additem(menu, "\wAk47 \yFade", "3", 0)
menu_additem(menu, "\wAk47 \yFuel Injector", "4", 0)
menu_additem(menu, "\wAk47 \yIce Coaled", "5", 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0 );
return 1;
}
public AkCase(id, menu, item)
{
if(item == MENU_EXIT)
{
return 1;
}
new nick[33]; get_user_name(id, nick, 32);
AK[id] = item;
CC_SendMessage(id, "&x04%s &x01Ju zgjodhet &x04%s &x01si AK47 tuaj!", nick, AKMenuNames[item]);
menu_destroy (menu);
return 1;
}
public CurentWeapon(id)
{
if(get_user_weapon(id) == CSW_AK47)
{
set_pev(id, pev_viewmodel2, AKModels[AK[id]]);
}
}
public AkMenu(id)
{
if(is_user_alive(id))
{
MenuAk(id);
}else{
MenuAk(id);
}
}