#include <amxmodx>
#include <amxmisc>
#include <colorchat>
#include <cstrike>
#include <engine>
#include <fun>
#include <fakemeta>
#include <hamsandwich>
#include <fakemeta_util>
#include <csx>
#pragma tabsize 0
new const PLUGIN[] = "Global Unison"
new const VERSION[] = "2.0"
new const AUTHOR[] = "GudDevil"
new const PREFIX[] = "[Global Unison]"
new const M4a1skin[11][] =
{
{"Terepmintás M4A1 \w| \r+5A +5I +5E"},
{"Sivatagi M4A1 \w| \r+10A +10I +10E"},
{"Tűz M4A1 \w| \r+15A +15I +15E"},
{"Modern M4A1 \w| \r+30A +30I +30E"},
{"Nuclear M4A1 \w| \r+45A +45I +25E"},
{"Howl M4A1 \w| \r+20A +12I +35E"},
{"Asiimov M4A1 \w| \r+35A +5I +55E"},
{"DragonKing M4A1 \w| \r+20A +20I +40E"},
{"TöltényZápor M4A1 \w| \r+20A +12I +35E"},
{"Magma M4A1 \w| \r+5A +5I +50E"},
{"Sugárveszély M4A1 \w| \r+45A +5I +45E"}
}
new const ak47skinek[1][] =
{
{"Terepmintas | Ak47"}
}
//Skinek
new OsszesSkin[12][33], m4skin[33], akskin[33];
public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR);
register_impulse(201, "Fomenu")
register_clcmd("say /add", "Addolas");
register_event("CurWeapon", "FegyverCsere", "be", "1=1");
}
public Addolas(id)
{
for(new i;i < 12; i++)
OsszesSkin[i][id]++;
}
new const M4A1_Modelek[][] =
{
"models/globalunisonmode/terepm4.mdl",
"models/globalunisonmode/sivatagim4.mdl",
"models/globalunisonmode/tuzm4.mdl",
"models/globalunisonmode/modernm4.mdl",
"models/globalunisonmode/nucim4.mdl",
"models/globalunisonmode/howlm4.mdl",
"models/globalunisonmode/asiim4.mdl",
"models/globalunisonmode/dragonkingm4.mdl",
"models/globalunisonmode/toltenyzm4.mdl",
"models/globalunisonmode/magmam4.mdl",
"models/globalunisonmode/sugarm4.mdl"
}
new const AK47_Modelek[][] =
{
"models/globalunisonmode/terepak.mdl"
}
public plugin_precache()
{
for(new i;i < sizeof(M4A1_Modelek); i++)
{
precache_model(M4A1_Modelek[i]);
}
for(new i;i < sizeof(AK47_Modelek); i++)
{
precache_model(AK47_Modelek[i]);
}
}
public FegyverCsere(id)
{
new fegyo = get_user_weapon(id);
if(fegyo == CSW_M4A1)
{
for(new i;i < sizeof(M4A1_Modelek); i++)
if(m4skin[id] == i)
set_pev(id, pev_viewmodel2, M4A1_Modelek[i]);
}
else if(fegyo == CSW_AK47)
{
for(new i;i < sizeof(AK47_Modelek); i++)
if(akskin[id] == i)
set_pev(id, pev_viewmodel2, AK47_Modelek[i]);
}
}
public Fomenu(id)
{
new String[121]
formatex(String, charsmax(String), "K.m.G - \rGlobal Unison Mode - \yFőmenü")
new menu = menu_create(String, "Fomenu_h")
menu_additem(menu, "\wRaktár", "1", 0)
menu_additem(menu, "\wFegyvermenu", "2", 0)
menu_display(id, menu, 0)
return PLUGIN_HANDLED
}
public Fomenu_h(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return;
}
new data[9], szName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
new key = str_to_num(data);
switch(key)
{
case 1: Raktar(id);
case 2: Fegyomenu(id)
}
}
public Fegyomenu(id)
{
if(is_user_alive(id) || is_user_connected(id)) {
strip_user_weapons(id)
give_item(id, "weapon_knife")
new menu = menu_create("\rGlobal Unison Mode \w- \dFegyverMenü","fegyver_h")
menu_additem(menu,"M4A1","1",0)
menu_additem(menu,"AK47","2",0)
menu_additem(menu,"AWP","3",0)
menu_additem(menu,"FAMAS","4",0)
menu_additem(menu,"MP5","5",0)
menu_additem(menu,"M3","6",0)
menu_setprop(menu, MPROP_BACKNAME, "Vissza")
menu_setprop(menu, MPROP_NEXTNAME, "Tovább")
menu_setprop(menu, MPROP_EXITNAME, "Kilépés")
menu_display(id, menu, 0)
}
}
public fegyver_h(id,menu,item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
}
new data[9],szName[64];
new access,callback;
menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
pisztoly(id)
give_item(id, "weapon_m4a1")
cs_set_user_bpammo(id,CSW_M4A1,120)
}
case 2:
{
pisztoly(id)
give_item(id, "weapon_ak47")
cs_set_user_bpammo(id,CSW_AK47,120)
}
case 3:
{
pisztoly(id)
give_item(id, "weapon_awp")
cs_set_user_bpammo(id,CSW_AWP,50)
}
case 4:
{
pisztoly(id)
give_item(id, "weapon_famas")
cs_set_user_bpammo(id,CSW_FAMAS,120)
}
case 5:
{
pisztoly(id)
give_item(id, "weapon_mp5navy")
cs_set_user_bpammo(id,CSW_MP5NAVY,150)
}
case 6:
{
pisztoly(id)
give_item(id, "weapon_m3")
cs_set_user_bpammo(id,CSW_M3,30)
}
}
}
public pisztoly(id)
{
new menu = menu_create("\rGlobal Unison Mode \w- \dPisztolyMenü","pisztoly_h")
menu_additem(menu,"Deagle","1",0)
menu_additem(menu,"USP","2",0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_setprop(menu, MPROP_EXITNAME, "Kilépés");
menu_display(id,menu,0)
}
public pisztoly_h(id,menu,item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
}
new data[9],szName[64];
new access,callback;
menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
give_item(id, "weapon_knife")
give_item(id, "weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,200)
}
case 2:
{
give_item(id, "weapon_knife")
give_item(id, "weapon_usp")
cs_set_user_bpammo(id,CSW_USP,200)
}
}
}
public Raktar(id)
{
new String[121];
formatex(String, charsmax(String), "%s \r- \dRaktár",PREFIX);
new menu = menu_create(String, "Raktar_h");
for(new i;i < sizeof(M4a1skin); i++)
{
if(OsszesSkin[i][id] > 0)
{
new Sor[6]; num_to_str(i, Sor, 5);
formatex(String, charsmax(String), "\w%s \w[\y%d \rDB\w]", M4a1skin[i][0], OsszesSkin[i][id]);
menu_additem(menu, String, Sor);
}
}
for(new i;i < sizeof(ak47skinek); i++)
{
if(OsszesSkin[i][id] > 0)
{
new Sor[6]; num_to_str(i, Sor, 5);
formatex(String, charsmax(String), "\w%s \w[\y%d \rDB\w]", ak47skinek[i][0], OsszesSkin[i][id]);
menu_additem(menu, String, Sor);
}
}
menu_display(id, menu, 0);
}
public Raktar_h(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return;
}
new data[9], szName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
new key = str_to_num(data);
switch(key)
{
case 0:
{
m4skin[id] = 0
akskin[id] = 0
}
case 1:
{
m4skin[id] = 1
}
case 2:
{
m4skin[id] = 2
}
case 3:
{
m4skin[id] = 3
}
case 4:
{
m4skin[id] = 4
}
case 5:
{
m4skin[id] = 5
}
case 6:
{
m4skin[id] = 6
}
case 7:
{
m4skin[id] = 7
}
case 8:
{
m4skin[id] = 8
}
case 9:
{
m4skin[id] = 9
}
case 10:
{
m4skin[id] = 10
}
case 11:
{
m4skin[id] = 11
}
}
switch(key)
{
case 0: akskin[id] = 0
}
}
public client_putinserver(id)
{
m4skin[id] = -1
akskin[id] = -1
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
*/