#include <amxmodx>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <engine>
#include <ColorChat>
#define MAX_PLAYERS 32
#define MAX_INDEX MAX_PLAYERS+1
#define COOLDOWN 30.0
#define HLDTIME 5.0
#define HUD_RED 0
#define HUD_GREEN 255
#define HUD_BLUE 0
public plugin_init()
{
register_clcmd("say /bronie", "menu_broni");
register_clcmd("say /bron", "menu_broni");
register_event("CurWeapon","CurWeapon","be", "1=1");
}
public plugin_precache()
{
precache_sound("models/ghostmod/v_ak472.mdl");
}
public menu_broni(id)
{
if (get_user_team (id) == 2)
{
new menu = menu_create("\wSklep Broni", "Menu_Handle");
menu_additem(menu, "\wM4A1[\rUlepsozne M4A1\w] Koszt: \y11000$");
menu_additem(menu, "\wAK47 [\rUlepszone AK47\w] Koszt: \y4500$");
menu_additem(menu, "\wAWP [\rUlepszone AWP\w] Koszt: \y16000$");
menu_display(id, menu);
}
}
public Menu_Handle (id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_CONTINUE;
}
menu_display(id, menu);
new weapon = read_data(2);
new kasa_gracza = cs_get_user_money(id);
new info = CS_TEAM_CT;
switch(item)
{
case 0:
{
new koszt = 11000;
if (kasa_gracza<koszt)
{
ColorChat(id,GREEN,"^x01[^x04 Ghost Mod^x01 |^x04 Shop^x01] Czlowieku, Potrzebujesz^x03 11000$");
return PLUGIN_CONTINUE;
}
else
{
cs_set_user_money(id, kasa_gracza-koszt);
(give_item(id, "weapon_m4a1"));
(give_item(id,"ammo_556nato"));
(give_item(id,"ammo_556nato"));
(give_item(id,"ammo_556nato"));
ColorChat(id,GREEN,"^x01[^x04 Ghost Mod^x01 |^x04 Shop^x01] Zakupiles M4A1");
return PLUGIN_CONTINUE;
}
}
case 1:
{
new koszt = 4500;
if (kasa_gracza<koszt)
{
ColorChat(id,GREEN,"^x01[^x04 Ghost Mod^x01 |^x04 Shop^x01] Czlowieku, Potrzebujesz^x03 4500$");
return PLUGIN_CONTINUE;
}
else
{
cs_set_user_money(id, kasa_gracza-koszt);
(give_item(id, "weapon_ak47"));
(give_item(id,"ammo_762nato"));
(give_item(id,"ammo_762nato"));
(give_item(id,"ammo_762nato"));
ColorChat(id,GREEN,"^x01[^x04 Ghost Mod^x01 |^x04 Shop^x01] Zakupiles:^x03 AK47");
}
if(info == 52 && weapon == CSW_AK47)
{
entity_set_string(id, EV_SZ_viewmodel, "models/gunxpmod/v_ak472.mdl")
}
}
case 2:
{
new koszt = 16000;
if (kasa_gracza<koszt)
{
ColorChat(id,GREEN,"^x01[^x04 Ghost Mod^x01 |^x04 Shop^x01] Czlowieku, Potrzebujesz^x03 16000$");
return PLUGIN_CONTINUE;
}
else
{
cs_set_user_money(id, kasa_gracza-koszt);
(give_item(id, "weapon_awp"));
(give_item(id,"ammo_338magnum"));
(give_item(id,"ammo_338magnum"));
(give_item(id,"ammo_338magnum"));
ColorChat(id,GREEN,"^x01[^x04 Ghost Mod^x01 |^x04 Shop^x01] Zakupiles:^x03 AWP");
}
}
}
return PLUGIN_CONTINUE;
}
Użytkownik pfk92 edytował ten post 03.03.2012 14:48