Round Special Problem

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Потребителски аватар

LayerFort DJBosma
Потребител
Потребител
Мнения: 85
Регистриран: 25 дек 2018, 04:14
Местоположение: Alkmaar
Се отблагодари: 2 пъти
Получена благодарност: 2 пъти
Години: 24
Контакти:

Round Special Problem

Мнение от LayerFort DJBosma » 08 мар 2019, 09:23

*Removed ColorChat
*Added

Код: Избери всички

public SprMenuHandler(id, client, menu, item) 
{ 
if (!is_user_connected(id))
return PLUGIN_HANDLED;
if (item == MENU_EXIT)
instead of

Код: Избери всички

public SprMenuHandler(id, client, menu, item) 
{ 
if( item == MENU_EXIT ) 
Includes dhud if AMXX version is under 183

Код: Избери всички

#include <amxmodx> 
#include <engine>  
#include <fun> 
#include <cstrike> 
#include <hamsandwich> 
#if AMXX_VERSION_NUM < 183
    #include <dhudmessage>
#endif
enum _:g_eWeaponData 
{ 
_NameForChat[32], 
_WeaponName[32], 
_Ammo, 
_CSW 
} 

enum _:g_eWeaponTypes 
{ 
S 
} 

new const g_szSecondary[][g_eWeaponData]= 
{ 
{"Glock18",     "weapon_glock18",     240,     CSW_GLOCK18}, 
{"Usp",     "weapon_usp",        240,     CSW_USP}, 
{"P228",     "weapon_p228",        240,     CSW_P228}, 
{"Dual Elites", "weapon_elite",     240,     CSW_ELITE}, 
{"Fiveseven",     "weapon_fiveseven",    240,     CSW_FIVESEVEN}, 
{"Deagle",     "weapon_deagle",     240,     CSW_DEAGLE} 
} 

new g_WpnID[g_eWeaponTypes] 
new EnabledCvar 

public plugin_init() { 
register_plugin("Special Round", "Version", "Eimador") 
register_clcmd("amx_rdsmenu", "RdsMenuShow") 
register_clcmd("say /rds", "SprMenuShow") 

EnabledCvar = register_cvar("amx_enable", "1")
} 

public RdsMenuShow(id) 
{ 
if(get_pcvar_num( EnabledCvar ) && get_user_flags(id) & ADMIN_ALL) 
{ 
new menu = menu_create("Rundi Special", "SprMenuHandler")  
menu_additem(menu, "Thika Rund", "1", 0)  
menu_additem(menu, "Granata+Thika Rund", "2", 0)  
menu_additem(menu, "Shotgun Rund", "3", 0)  
menu_additem(menu, "Deagle Rund", "4", 0)  
menu_additem(menu, "AWP Rund", "5", 0)  
menu_additem(menu, "Pistoleta Rastesishme Rund", "6", 0)  
menu_additem(menu, "M4A1 Rund", "7", 0)  
menu_additem(menu, "AK-47 Rund", "8", 0)  
menu_additem(menu, "TMP Rund", "9", 0)  
menu_additem(menu, "Granata Palimit Rund", "10", 0)  
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)  

menu_display(id, menu, 0)  
} 
} 

public SprMenuHandler(id, client, menu, item) 
{ 
if (!is_user_connected(id))
return PLUGIN_HANDLED;
if (item == MENU_EXIT) 
{ 
menu_destroy(menu); 
return PLUGIN_HANDLED; 
} 
new data[6], szName[33];  
new acces, callback; 
menu_item_getinfo(menu, item, acces, data,charsmax(data), szName,charsmax(szName), callback)  
new key = str_to_num(data);  
switch(key)  
{ 
case 1: {  
hideBuyIcon() 
strip_user_weapons(client)  
give_item(client, "weapon_knife") 
client_print(0, print_chat, "^1[^4Rund Special^1] ^3Admini zgjedhi rundin me ^4Thika ^1!") 
} 
case 2: { 
hideBuyIcon 
strip_user_weapons(client)  
give_item(client, "weapon_knife") 
give_item(client, "weapon_hegrenade") 
give_item(client, "weapon_flashbang") 
give_item(client, "weapon_flashbang")   
client_print(0, print_chat, "^1[^4Rund Special^1] ^3Admini zgjedhi rundin me ^4Granada ^1dhe ^4Thika ^1!") 
} 
case 3: { 
hideBuyIcon 
strip_user_weapons(client)  
give_item(client, "weapon_m3") 
give_item(client, "weapon_xm1014") 
cs_set_user_bpammo(client,CSW_M3,240)   
cs_set_user_bpammo(client,CSW_XM1014,240)  
client_print(0, print_chat, "^1[^4Rund Special^1] ^3Admini zgjedhi rundin me ^4ShotGun ^1!")  
} 
case 4: { 
hideBuyIcon 
strip_user_weapons(client)  
give_item(client, "weapon_deagle") 
cs_set_user_bpammo(client,CSW_DEAGLE,240)   
client_print(0, print_chat, "^1[^4Rund Special^1] ^3Admini zgjedhi rundin me ^4Deagle ^1!") 
} 
case 5: { 
hideBuyIcon 
strip_user_weapons(client)  
give_item(client, "weapon_awp") 
cs_set_user_bpammo(client,CSW_AWP,240)   
client_print(0, print_chat, "^1[^4Rund Special^1] ^3Admini zgjedhi rundin me ^4AWP ^1!") 
} 
case 6: { 
hideBuyIcon 
strip_user_weapons(client)  
g_WpnID[S] = random_num(1, charsmax(g_szSecondary)) 
give_item(client, g_szSecondary[g_WpnID[S]][_WeaponName]) 
cs_set_user_bpammo(client, g_szSecondary[g_WpnID[S]][_CSW], g_szSecondary[g_WpnID[S]][_Ammo]) 
client_print(0, print_chat, "^1[^4Rund Special^1] ^3Admini zgjedhi rundin me ^4Pistoleta Rastesishme ^1!") 
} 
case 7: { 
hideBuyIcon 
strip_user_weapons(client)  
give_item(client, "weapon_m4a1") 
cs_set_user_bpammo(client,CSW_M4A1,240) 
client_print(0, print_chat, "^1[^4Rund Special^1] ^3Admini zgjedhi rundin me ^4M4A1 ^1!")  
} 
case 8: { 
hideBuyIcon 
strip_user_weapons(client)  
give_item(client, "weapon_ak47") 
cs_set_user_bpammo(client,CSW_AK47,240)  
client_print(0, print_chat, "^1[^4Rund Special^1] ^3Admini zgjedhi rundin me ^4AK-47 ^1!") 
} 
case 9: { 
hideBuyIcon 
strip_user_weapons(client)  
give_item(client, "weapon_tmp") 
cs_set_user_bpammo(client,CSW_TMP,240)  
client_print(0, print_chat, "^1[^4Rund Special^1] ^3Admini zgjedhi rundin me ^4TMP ^1!") 
} 
case 10: { 
hideBuyIcon 
strip_user_weapons(client)  
give_item(client, "weapon_hegrenade") 
give_item(client, "weapon_flashbang") 
give_item(client, "weapon_flashbang") 
give_item(client, "weapon_smokegrenade") 
cs_set_user_bpammo(client,CSW_HEGRENADE,240)   
cs_set_user_bpammo(client,CSW_FLASHBANG,240)   
cs_set_user_bpammo(client,CSW_SMOKEGRENADE,240)   
client_print(0, print_chat, "^1[^4Rund Special^1] ^3Admini zgjedhi rundin me ^4Granata Palimit ^1!") 
} 
}  
set_dhudmessage(random(256), random(256), random(256)) 
show_dhudmessage(client, "*LIVE ^nSUKSESE, PAQI FAT") 
menu_destroy(menu); 
return PLUGIN_HANDLED; 
}  

hideBuyIcon() 
{ 
new const szClassnameBuy[] = "func_buyzone" 
remove_entity_name(szClassnameBuy) 
new ent = create_entity(szClassnameBuy) 
entity_set_origin(ent, Float:{8192.0, 8192.0, 8192.0}) 
entity_set_int(ent, EV_INT_solid, SOLID_NOT) 
}
P.S: You might want to give in all cases give_item(client, "weapon_knife") because of api/fun/strip_user_weapons "including their knife."
Пиша от избата, защото горе имаме течове..

Отговори

Върни се в “Заявки за плъгини”

Кой е на линия

Потребители, разглеждащи този форум: Няма регистрирани потребители и 1 гост