Wybierz zestaw:
* M4 + Deagle + Granaty /1
* AK + Deagle + Granaty /2
* AWP + Deagle + Granaty /3
* Auto-ShotGun + Granaty /4
Ale mam 2 problemy:
Po 1: Auto-ShotGun nie działa. tzn: AWP jest pod 4 a nie pod 3. Po wciśnięciu 3 nic się nie działo.
Po 2: Ustawiłem: if(round > 3) Showrod(player) ale menu jest dostępne od razu.
Spoiler
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Wojtek"
#define Klawisze (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9) // Keys: 1234567890
new round = 1
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_menucmd(register_menuid("Menuid"), Klawisze, "PokazMenu")
register_logevent("logevent_Round_Start", 2, "1=Round_Start")
}
public logevent_Round_Start() {
round++;
new players[32], player, pnum;
get_players(players, pnum, "a");
for(new i = 0; i < pnum; i++)
{
player = players[i];
if(get_user_flags(player) & ADMIN_LEVEL_H)
{
if(round > 3) Showrod(player)
}
}
}
public Showrod(id) {
show_menu(id, Klawisze, "\d[\rProsze wybrac Zestaw\d]^n^n\d1. \yWez M4A1 + Deagle + Granaty ^n\d2. \yWez AK47 + Deagle + Granaty^n\d3. \yWez AWP + Deagle + Granaty^n\d4. \yWez Auto-ShotGuna + Granaty^n^n\d0. \rWyjscie^n", -1, "Menuid");
return PLUGIN_CONTINUE;
}
public PokazMenu(id, key) {
client_cmd(id, "spk misc/vip/klick.wav");
switch (key) {
case 0: {
give_item(id,"weapon_m4a1");
cs_set_user_bpammo(id, CSW_M4A1, 90);
give_item(id,"weapon_deagle");
cs_set_user_bpammo(id, CSW_DEAGLE, 35);
give_item(id,"weapon_knife")
give_item(id,"weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")
client_print(id, print_center, "Wzioles M4, Deagla i Granaty")
}
case 1: {
give_item(id,"weapon_ak47");
cs_set_user_bpammo(id, CSW_AK47, 90);
give_item(id,"weapon_deagle");
cs_set_user_bpammo(id, CSW_DEAGLE, 35);
give_item(id,"weapon_knife")
give_item(id,"weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")
client_print(id, print_center, "Wzioles AK, Deagla i Granaty")
}
case 3: {
give_item(id,"weapon_awp");
cs_set_user_bpammo(id, CSW_AWP, 30);
give_item(id,"weapon_deagle");
cs_set_user_bpammo(id, CSW_DEAGLE, 35);
give_item(id,"weapon_knife")
give_item(id,"weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")
client_print(id, print_center, "Wzioles AWP, deagla i Granaty")
}
case 4: {
give_item(id,"weapon_xm1014");
cs_set_user_bpammo(id, CSW_XM1014, 32);
give_item(id,"weapon_elite");
cs_set_user_bpammo(id, CSW_ELITE, 35);
give_item(id,"weapon_knife")
give_item(id,"weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")
client_print(id, print_center, "Wzioles Auto-ShotGuna i Granaty")
}
}
return PLUGIN_CONTINUE
}
public plugin_precache()
{
precache_sound("misc/vip/klick.wav");
}