#include #include #include #include #include #define PLUGIN "Wybor skinow" #define VERSION "1.0.0" #define AUTHOR "K@MILOVVSKY" new model_noza[33] new model_m4[33] new model_ak[33] new model_deagle[33] public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("CurWeapon","CurWeapon","be","1=1") register_clcmd("say /skiny", "menuWyboru") register_clcmd("say /skin", "menuWyboru") register_clcmd("say /skins", "menuWyboru") register_clcmd("say /modele", "menuWyboru") register_clcmd("say /model", "menuWyboru") register_clcmd("say /models", "menuWyboru") } public plugin_precache() { precache_model("models/skiny/noz/v_knife.mdl") // zwykly precache_model("models/skiny/noz/v_knifemysthbloomkunai.mdl") precache_model("models/skiny/noz/v_knifefrozen") precache_model("models/skiny/m4a1/v_m4a1.mdl") // zwykla precache_model("models/skiny/m4a1/v_m4a1frozen.mdl") precache_model("models/skiny/ak/v_ak47.mdl") // zwykly precache_model("models/skiny/ak/v_ak47frozen.mdl") precache_model("models/skiny/deagle/v_deagle.mdl") // zwykla precache_model("models/skiny/deagle/v_deaglefrozen.mdl") } public menuWyboru(id) { new menuBody[512] formatex(menuBody, charsmax(menuBody), "\d[\r*\yfr0zen test\r*\d]^n\wMenu Skinow:\y") new menu = menu_create(menuBody, "skinsmenu") menu_additem(menu, "\wNoz") menu_additem(menu, "\wM4A1") menu_additem(menu, "\wAK47") menu_additem(menu, "\wDeagle") menu_setprop(menu, MPROP_BACKNAME, "Wroc"); menu_setprop(menu, MPROP_NEXTNAME, "Dalej"); menu_setprop(menu, MPROP_EXITNAME, "Wyjscie"); menu_display(id, menu); } public skinsmenu(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu); return PLUGIN_HANDLED; } switch(item) { case 0: menu_noze(id) case 1: menu_m4(id) case 2: menu_ak(id) case 3: menu_deagle(id) default: return PLUGIN_HANDLED } return PLUGIN_HANDLED } public menu_noze(id) { new menuBody[512] formatex(menuBody, charsmax(menuBody), "\ySkiny do \rNoza:") new menu = menu_create(menuBody, "knifemenu") menu_additem(menu, "\wZwykly Noz | Klasyczny") menu_additem(menu, "\wMysth Bloom Kunai | 1") menu_additem(menu, "\wFrozen | 2") menu_setprop(menu, MPROP_BACKNAME, "Wroc"); menu_setprop(menu, MPROP_NEXTNAME, "Dalej"); menu_setprop(menu, MPROP_EXITNAME, "Wyjscie"); menu_display(id, menu); } public knifemenu(id, menu, item) { switch(item) { case 0: SetKnife(id , 0) case 1: SetKnife(id , 1) case 2: SetKnife(id , 2) default: return PLUGIN_HANDLED } ZapiszNoz(id) return PLUGIN_HANDLED } public SetKnife(id , Knife) { model_noza[id] = Knife new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo) if ( Weapon != CSW_KNIFE ) return PLUGIN_HANDLED new vModel[56] switch(Knife) { case 0: { format(vModel,55,"models/skiny/noz/v_knife.mdl") } case 1: { format(vModel,55,"models/skiny/noz/v_knifemysthbloomkunai.mdl") } case 2: { format(vModel,55,"models/skiny/noz/v_knifefrozen.mdl") } case 3: { } entity_set_string(id, EV_SZ_viewmodel, vModel) return PLUGIN_HANDLED; } public menu_m4(id) { new menuBody[512] formatex(menuBody, charsmax(menuBody), "\ySkiny do \rM4A1:") new menu = menu_create(menuBody, "m4menu") menu_additem(menu, "\wZwykla M4A1") menu_additem(menu, "\wFrozen M4A1 | 1") menu_setprop(menu, MPROP_BACKNAME, "Wroc"); menu_setprop(menu, MPROP_NEXTNAME, "Dalej"); menu_setprop(menu, MPROP_EXITNAME, "Wyjscie"); menu_display(id, menu); } public m4menu(id, menu, item) { switch(item) { case 0: SetM4A1(id , 0) case 1: SetM4A1(id , 1) default: return PLUGIN_HANDLED } ZapiszM4(id) return PLUGIN_HANDLED } public SetM4A1(id , M4A1) { model_m4[id] = M4A1 new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo) if ( Weapon != CSW_M4A1 ) return PLUGIN_HANDLED new vModel[56] switch(M4A1) { case 0: { format(vModel,55,"models/skiny/m4a1/v_m4a1.mdl") } case 1: { format(vModel,55,"models/skiny/m4a1/v_m4a1frozen.mdl") } } entity_set_string(id, EV_SZ_viewmodel, vModel) return PLUGIN_HANDLED; } public menu_ak(id) { new menuBody[512] formatex(menuBody, charsmax(menuBody), "\ySkiny do \rAK47:") new menu = menu_create(menuBody, "akmenu") menu_additem(menu, "\wZwykly AK47") menu_additem(menu, "\wFrozen AK | 1") menu_setprop(menu, MPROP_BACKNAME, "Wroc"); menu_setprop(menu, MPROP_NEXTNAME, "Dalej"); menu_setprop(menu, MPROP_EXITNAME, "Wyjscie"); menu_display(id, menu); } public akmenu(id, menu, item) { switch(item) { case 0: SetAK47(id , 0) case 1: SetAK47(id , 1) default: return PLUGIN_HANDLED } ZapiszAK(id) return PLUGIN_HANDLED } public SetAK47(id , AK47) { model_ak[id] = AK47 new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo) if ( Weapon != CSW_AK47 ) return PLUGIN_HANDLED new vModel[56] switch(AK47) { case 0: { format(vModel,55,"models/skiny/ak/v_ak47.mdl") } case 1: { format(vModel,55,"models/skiny/ak/v_ak47frozen.mdl") } } entity_set_string(id, EV_SZ_viewmodel, vModel) return PLUGIN_HANDLED; } public menu_deagle(id) { new menuBody[512] formatex(menuBody, charsmax(menuBody), "\ySkiny do \rDeagle:") new menu = menu_create(menuBody, "deaglemenumenu") menu_additem(menu, "\wZwykly Deagle") menu_additem(menu, "\wFrozen Deagle | 1") menu_setprop(menu, MPROP_BACKNAME, "Wroc"); menu_setprop(menu, MPROP_NEXTNAME, "Dalej"); menu_setprop(menu, MPROP_EXITNAME, "Wyjscie"); menu_display(id, menu); } public deaglemenu(id, menu, item) { switch(item) { case 0: SetDEAGLE(id , 0) case 1: SetDEAGLE(id , 1) default: return PLUGIN_HANDLED } ZapiszDEAGLE(id) return PLUGIN_HANDLED } public SetDEAGLE(id , DEAGLE) { model_deagle[id] = DEAGLE new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo) if ( Weapon != CSW_DEAGLE ) return PLUGIN_HANDLED new vModel[56] switch(DEAGLE) { case 0: { format(vModel,55,"models/skiny/deagle/v_deagle.mdl") } case 1: { format(vModel,55,"models/skiny/deagle/v_deaglefrozen.mdl") } } entity_set_string(id, EV_SZ_viewmodel, vModel) return PLUGIN_HANDLED; } public CurWeapon(id) { if(!is_user_alive(id)) return PLUGIN_HANDLED; SetKnife(id, model_noza[id]) SetM4A1(id, model_m4[id]) SetAK47(id, model_ak[id]) SetDEAGLE(id, model_deagle[id]) return PLUGIN_HANDLED } public client_authorized(id) { ZaladujNoze(id) ZaladujM4(id) ZaladujAK(id) ZaladujDEAGLE(id) } ZapiszNoz(id) { new authid[32] get_user_authid(id, authid, 31) new vaultkey[64] new vaultdata[64] format(vaultkey, 63, "Knife_%s", authid) format(vaultdata, 63, "%d", model_noza[id]) set_vaultdata(vaultkey, vaultdata) } ZaladujNoze(id) { new authid[32] get_user_authid(id,authid,31) new vaultkey[64], vaultdata[64] format(vaultkey, 63, "Knife_%s", authid) get_vaultdata(vaultkey, vaultdata, 63) model_noza[id] = str_to_num(vaultdata) } ZapiszM4(id) { new authid[32] get_user_authid(id, authid, 31) new vaultkey[64] new vaultdata[64] format(vaultkey, 63, "M4A1_%s", authid) format(vaultdata, 63, "%d", model_m4[id]) set_vaultdata(vaultkey, vaultdata) } ZaladujM4(id) { new authid[32] get_user_authid(id,authid,31) new vaultkey[64], vaultdata[64] format(vaultkey, 63, "M4A1_%s", authid) get_vaultdata(vaultkey, vaultdata, 63) model_m4[id] = str_to_num(vaultdata) } ZapiszAK(id) { new authid[32] get_user_authid(id, authid, 31) new vaultkey[64] new vaultdata[64] format(vaultkey, 63, "AK47_%s", authid) format(vaultdata, 63, "%d", model_ak[id]) set_vaultdata(vaultkey, vaultdata) } ZaladujAK(id) { new authid[32] get_user_authid(id,authid,31) new vaultkey[64], vaultdata[64] format(vaultkey, 63, "AK47_%s", authid) get_vaultdata(vaultkey, vaultdata, 63) model_ak[id] = str_to_num(vaultdata) } ZapiszDEAGLE(id) { new authid[32] get_user_authid(id, authid, 31) new vaultkey[64] new vaultdata[64] format(vaultkey, 63, "DEAGLE_%s", authid) format(vaultdata, 63, "%d", model_deagle[id]) set_vaultdata(vaultkey, vaultdata) } ZaladujDEAGLE(id) { new authid[32] get_user_authid(id,authid,31) new vaultkey[64], vaultdata[64] format(vaultkey, 63, "DEAGLE_%s", authid) get_vaultdata(vaultkey, vaultdata, 63) model_deagle[id] = str_to_num(vaultdata) } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par } */