Witam otóż wszystko mi działa poza otrzymaniem granatów, wydaje mi się że jakoś codmod je blokuje gdyż granaty w grze są aczkolwiek nie mogę ich wybrać
Poniżej SMA
#include <amxmodx> #include <codmod> #include <cstrike> #include <csx> #include <fun> #include <hamsandwich> new CsArmorType:armortype, bool:g_Vip[33], maxPlayers; public plugin_init(){ register_plugin("VIP Ultimate", "12.3.0.2", "benio101 & speedkill"); RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1); register_event("DeathMsg", "DeathMsg", "a"); register_message(get_user_msgid("ScoreAttrib"), "VipStatus"); register_clcmd("say /vipsilver", "ShowMotd"); register_logevent("RoundEnd", 2, "1=Round_End"); } public client_authorized(id){ if(get_user_flags(id) & 33570818 == 33570818){ client_authorized_vip(id); } } public client_authorized_vip(id){ g_Vip[id]=true; } public client_disconnect(id){ if(g_Vip[id]){ client_disconnect_vip(id); } } public client_disconnect_vip(id){ g_Vip[id]=false; } public SpawnedEventPre(id){ if(g_Vip[id]){ if(is_user_alive(id)){ SpawnedEventPreVip(id); } } } public SpawnedEventPreVip(id){ set_user_health(id, get_user_health(id)+10); cs_set_user_armor(id, min(cs_get_user_armor(id,armortype)+50, 200), armortype); new henum=(user_has_weapon(id,CSW_HEGRENADE)?cs_get_user_bpammo(id,CSW_HEGRENADE):0); give_item(id, "weapon_hegrenade"); ++henum; new fbnum=(user_has_weapon(id,CSW_FLASHBANG)?cs_get_user_bpammo(id,CSW_FLASHBANG):0); give_item(id, "weapon_flashbang"); ++fbnum; cs_set_user_bpammo(id, CSW_FLASHBANG, 2); new sgnum=(user_has_weapon(id,CSW_SMOKEGRENADE)?cs_get_user_bpammo(id,CSW_SMOKEGRENADE):0); give_item(id, "weapon_smokegrenade"); ++sgnum; if(get_user_team(id)==2){ give_item(id, "item_thighpack"); } } public DeathMsg(){ new killer=read_data(1); new victim=read_data(2); if(is_user_alive(killer) && g_Vip[killer] && get_user_team(killer) != get_user_team(victim)){ DeathMsgVip(killer,victim,read_data(3)); } } public DeathMsgVip(kid,vid,hs){ set_user_health(kid, min(get_user_health(kid)+(hs?10:5),1000)); cs_set_user_money(kid, cs_get_user_money(kid)+(hs?300:150)); cod_set_user_xp(kid, cod_get_user_xp(kid)+(hs?10:5)); } public VipStatus(){ new id=get_msg_arg_int(1); if(is_user_alive(id) && g_Vip[id]){ set_msg_arg_int(2, ARG_BYTE, get_msg_arg_int(2)|4); } } public ShowMotd(id){ show_motd(id, "vip.txt", "Informacje o vipie"); } public bomb_planted(id){ if(is_user_alive(id) && g_Vip[id]){ cs_set_user_money(id,cs_get_user_money(id) + 150); } } public bomb_defused(id){ if(is_user_alive(id) && g_Vip[id]){ cs_set_user_money(id,cs_get_user_money(id) + 150); } } public plugin_cfg(){ maxPlayers=get_maxplayers(); } public RoundEnd(){ for(new i = 1; i <= maxPlayers; i++){ if(is_user_alive(i) && g_Vip[i]){ cs_set_user_money(i,cs_get_user_money(i) + 250); } } }
tutaj drugie
#include <amxmodx> #include <codmod> #include <cstrike> #include <csx> #include <fun> #include <hamsandwich> new CsArmorType:armortype, bool:g_Vip[33], maxPlayers; public plugin_init(){ register_plugin("VIP Ultimate", "12.3.0.2", "benio101 & speedkill"); RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1); register_event("DeathMsg", "DeathMsg", "a"); register_message(get_user_msgid("ScoreAttrib"), "VipStatus"); register_clcmd("say /vip", "ShowMotd"); register_message(get_user_msgid("SayText"),"handleSayText"); register_logevent("RoundEnd", 2, "1=Round_End"); } public client_authorized(id){ if(get_user_flags(id) & 131072){ client_authorized_vip(id); } } public client_authorized_vip(id){ g_Vip[id]=true; } public client_disconnect(id){ if(g_Vip[id]){ client_disconnect_vip(id); } } public client_disconnect_vip(id){ g_Vip[id]=false; } public SpawnedEventPre(id){ if(g_Vip[id]){ if(is_user_alive(id)){ SpawnedEventPreVip(id); } } } public SpawnedEventPreVip(id){ set_user_health(id, get_user_health(id)+20); cs_set_user_armor(id, cs_get_user_armor(id,armortype)+100, armortype); new henum=(user_has_weapon(id,CSW_HEGRENADE)?cs_get_user_bpammo(id,CSW_HEGRENADE):0); give_item(id, "weapon_hegrenade"); ++henum; new fbnum=(user_has_weapon(id,CSW_FLASHBANG)?cs_get_user_bpammo(id,CSW_FLASHBANG):0); give_item(id, "weapon_flashbang"); ++fbnum; cs_set_user_bpammo(id, CSW_FLASHBANG, 2); new sgnum=(user_has_weapon(id,CSW_SMOKEGRENADE)?cs_get_user_bpammo(id,CSW_SMOKEGRENADE):0); give_item(id, "weapon_smokegrenade"); ++sgnum; } public DeathMsg(){ new killer=read_data(1); new victim=read_data(2); if(is_user_alive(killer) && g_Vip[killer] && get_user_team(killer) != get_user_team(victim)){ DeathMsgVip(killer,victim,read_data(3)); } } public DeathMsgVip(kid,vid,hs){ set_user_health(kid, min(get_user_health(kid)+(hs?15:10),130)); cs_set_user_money(kid, cs_get_user_money(kid)+(hs?450:300)); cod_set_user_xp(kid, cod_get_user_xp(kid)+(hs?15:10)); } public VipStatus(){ new id=get_msg_arg_int(1); if(is_user_alive(id) && g_Vip[id]){ set_msg_arg_int(2, ARG_BYTE, get_msg_arg_int(2)|4); } } public ShowMotd(id){ show_motd(id, "vip.txt", "Informacje o vipie"); } public handleSayText(msgId,msgDest,msgEnt){ new id = get_msg_arg_int(1); if(is_user_connected(id) && g_Vip[id]){ new szTmp[256],szTmp2[256]; get_msg_arg_string(2,szTmp, charsmax(szTmp)) new szPrefix[64] = "^x04[VIP GOLD]"; if(!equal(szTmp,"#Cstrike_Chat_All")){ add(szTmp2,charsmax(szTmp2),szPrefix); add(szTmp2,charsmax(szTmp2)," "); add(szTmp2,charsmax(szTmp2),szTmp); } else{ add(szTmp2,charsmax(szTmp2),szPrefix); add(szTmp2,charsmax(szTmp2),"^x03 %s1^x01 : %s2"); } set_msg_arg_string(2,szTmp2); } return PLUGIN_CONTINUE; } public bomb_planted(id){ if(is_user_alive(id) && g_Vip[id]){ cs_set_user_money(id,cs_get_user_money(id) + 300); } } public bomb_defused(id){ if(is_user_alive(id) && g_Vip[id]){ cs_set_user_money(id,cs_get_user_money(id) + 300); } } public plugin_cfg(){ maxPlayers=get_maxplayers(); } public RoundEnd(){ for(new i = 1; i <= maxPlayers; i++){ if(is_user_alive(i) && g_Vip[i]){ cs_set_user_money(i,cs_get_user_money(i) + 500); } } }