RSSy MYGO.pl Opublikowano Październik 8, 2022 o 01:25 RSSy Udostępnij Opublikowano Październik 8, 2022 o 01:25 hello guys , i have this plugin of guns menu when i compile it it give me done with no errors but when i did install it on the server it give me bad load on amx_plugins ! so how i can fix that ?! HTML Code: /* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <cstrike> #include <fakemeta> #include <hamsandwich> #include <fun> new const PLUGIN[] = "Public Guns Menu"; new const VERSION[] = "1.0"; new const AUTHOR[] = "NaDa"; #pragma semicolon 1 #define VIP_FLAG ADMIN_LEVEL_H new const Arma1Model[66] = "models/Royal_HN_Weapons/v_m4a1.mdl"; new const Arma2Model[66] = "models/Royal_HN_Weapons/v_ak47.mdl"; new const Arma3Model[66] = "models/Royal_HN_Weapons/v_mp5.mdl"; new const Arma4Model[66] = "models/Royal_HN_Weapons/v_xm1014.mdl"; new const Arma5Model[66] = "models/Royal_HN_Weapons/v_m3.mdl"; new const ArmaVip1Modelt[66] = "models/Royal_HN_Weapons/v_viptm4a1.mdl"; new const ArmaVip2Modelt[66] = "models/Royal_HN_Weapons/v_viptak47.mdl"; new const ArmaVip3Modelt[66] = "models/Royal_HN_Weapons/v_viptmp5.mdl"; new const ArmaVip4Modelt[66] = "models/Royal_HN_Weapons/v_viptxm1014.mdl"; new const ArmaVip5Modelt[66] = "models/Royal_HN_Weapons/v_viptm3.mdl"; new const ArmaVip1Modelct[66] = "models/Royal_HN_Weapons/v_vipctm4a1.mdl"; new const ArmaVip2Modelct[66] = "models/Royal_HN_Weapons/v_vipctak47.mdl"; new const ArmaVip3Modelct[66] = "models/Royal_HN_Weapons/v_vipctmp5.mdl"; new const ArmaVip4Modelct[66] = "models/Royal_HN_Weapons/v_vipctxm1014.mdl"; new const ArmaVip5Modelct[66] = "models/Royal_HN_Weapons/v_vipctm3.mdl"; new bool: Arma1[33]; new bool: Arma2[33]; new bool: Arma3[33]; new bool: Arma4[33]; new bool: Arma5[33]; new bool: ArmaVip1[33]; new bool: ArmaVip2[33]; new bool: ArmaVip3[33]; new bool: ArmaVip4[33]; new bool: ArmaVip5[33]; new bool: ArmaChoosen[33]; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); register_clcmd("say /weapons","SayArme"); register_clcmd("say /guns","SayArme"); register_clcmd("say /gun","SayArme"); register_event("CurWeapon", "CurentWeapon", "be", "1=1"); RegisterHam(Ham_Spawn, "player", "Spawn", 1); } public Spawn(id) { if(is_user_alive(id)) { ArmaChoosen[id] = false; Arma1[id] = false; Arma2[id] = false; Arma3[id] = false; Arma4[id] = false; Arma5[id] = false; ArmaVip1[id] = false; ArmaVip2[id] = false; ArmaVip3[id] = false; ArmaVip4[id] = false; ArmaVip5[id] = false; if(cs_get_user_team(id) == CS_TEAM_CT || cs_get_user_team(id) == CS_TEAM_T) { MenuArme(id); } } } public plugin_precache() { precache_model(Arma1Model); precache_model(Arma2Model); precache_model(Arma3Model); precache_model(Arma4Model); precache_model(Arma5Model); precache_model(ArmaVip1Modelt); precache_model(ArmaVip2Modelt); precache_model(ArmaVip3Modelt); precache_model(ArmaVip4Modelt); precache_model(ArmaVip5Modelt); precache_model(ArmaVip1Modelct); precache_model(ArmaVip2Modelct); precache_model(ArmaVip3Modelct); precache_model(ArmaVip4Modelct); precache_model(ArmaVip5Modelct); } public client_putinserver(id) { Arma1[id] = false; Arma2[id] = false; Arma3[id] = false; Arma4[id] = false; Arma5[id] = false; ArmaVip1[id] = false; ArmaVip2[id] = false; ArmaVip3[id] = false; ArmaVip4[id] = false; ArmaVip5[id] = false; } public client_disconnect(id) { Arma1[id] = false; Arma2[id] = false; Arma3[id] = false; Arma4[id] = false; Arma5[id] = false; ArmaVip1[id] = false; ArmaVip2[id] = false; ArmaVip3[id] = false; ArmaVip4[id] = false; ArmaVip5[id] = false; } public MenuArme(id) { new menu = menu_create ("\y|| \yRoyal HN \y|| \wGuns Menu", "CaseMenu"); menu_additem(menu, "\y[ \yRoyal HN \y] \wPlayer Guns Menu", "1"); menu_additem(menu, "\y[ \yRoyal HN \y] \rVIP \wGuns Menu", "2"); menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); menu_display(id, menu, 0 ); return 1; } public CaseMenu(id, menu, item) { if(item == MENU_EXIT) { return 1; } new data [6], 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: { { MenuPlayeri(id); } } case 2: { if( get_user_flags( id ) & VIP_FLAG ) { MenuVIP(id); } else { ChatColor(id, "!g[Royal HN Weapons]!nThese weapons can only be taken by !gVIP !nmembers "); MenuArme(id); } } } menu_destroy (menu); return 1; } public MenuPlayeri(id) { new menu = menu_create ("\rFurien Player \yWeapons Menu", "CaseArmePlayeri"); menu_additem(menu, "\yM4A1", "1"); menu_additem(menu, "\yAk47", "2"); menu_additem(menu, "\yMP5", "3"); menu_additem(menu, "\yXM1014", "4"); menu_additem(menu, "\yM3", "5"); menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); menu_display(id, menu, 0 ); return 1; } public CaseArmePlayeri(id, menu, item) { if(item == MENU_EXIT) { return 1; } new data [6], 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: { if(!is_user_alive(id)) { ChatColor(id, "!g[Royal HN Weapons] !nYou can't choose your weapon when you're dead"); return 1; } else { ArmaChoosen[id] = true; Arma1[id] = true; set_task(0.2, "GiveWeapon", id); CurentWeapon(id); ChatColor(id, "!g[Royal HN Weapons] !nYou have choosed !gM4A1"); } } case 2: { if(!is_user_alive(id)) { ChatColor(id, "!g[Royal HN Weapons] !nYou can't choose your weapon when you're dead"); return 1; } else { ArmaChoosen[id] = true; Arma2[id] = true; set_task(0.2, "GiveWeapon", id); CurentWeapon(id); ChatColor(id, "!g[Royal HN Weapons] !nYou have choosed !gAk47"); } } case 3: { if(!is_user_alive(id)) { ChatColor(id, "!g[Royal HN Weapons] !nYou can't choose your weapon when you're dead"); return 1; } else { ArmaChoosen[id] = true; Arma3[id] = true; set_task(0.2, "GiveWeapon", id); CurentWeapon(id); ChatColor(id, "!g[Royal HN Weapons] !nYou have choosed !gMP5"); } } case 4: { if(!is_user_alive(id)) { ChatColor(id, "!g[Royal HN Weapons] !nYou can't choose your weapon when you're dead"); return 1; } else { ArmaChoosen[id] = true; Arma4[id] = true; set_task(0.2, "GiveWeapon", id); CurentWeapon(id); ChatColor(id, "!g[Royal HN Weapons] !nYou have choosed !gXM1014"); } } case 5: { if(!is_user_alive(id)) { ChatColor(id, "!g[Royal HN Weapons] !nYou can't choose your weapon when you're dead"); return 1; } else { ArmaChoosen[id] = true; Arma5[id] = true; set_task(0.2, "GiveWeapon", id); CurentWeapon(id); ChatColor(id, "!g[Royal HN Weapons] !nYou have choosed !gM3"); } } } menu_destroy (menu); return 1; } public MenuVIP(id) { new menu = menu_create ("\rFurien VIP \yWeapons Menu", "CaseArmeVIP"); menu_additem(menu, "\yVIP \rM4A1", "1"); menu_additem(menu, "\yVIP \rAk47", "2"); menu_additem(menu, "\yVIP \rMP5", "3"); menu_additem(menu, "\yVIP \rXM1014", "4"); menu_additem(menu, "\yVIP \rM3", "5"); menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); menu_display(id, menu, 0 ); return 1; } public CaseArmeVIP(id, menu, item) { if(item == MENU_EXIT) { return 1; } new data [6], 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: { if(!is_user_alive(id)) { ChatColor(id, "!g[Royal HN Weapons] !nYou can't choose your weapon when you're dead"); return 1; } else { ArmaChoosen[id] = true; ArmaVip1[id] = true; set_task(0.2, "GiveWeapon", id); CurentWeapon(id); ChatColor(id, "!g[Royal HN Weapons] !nYou have choosed VIP's !gM4A1"); } } case 2: { if(!is_user_alive(id)) { ChatColor(id, "!g[Royal HN Weapons] !nYou can't choose your weapon when you're dead"); return 1; } else { ArmaChoosen[id] = true; ArmaVip2[id] = true; set_task(0.2, "GiveWeapon", id); CurentWeapon(id); ChatColor(id, "!g[Royal HN Weapons] !nYou have choosed VIP's !gAk47"); } } case 3: { if(!is_user_alive(id)) { ChatColor(id, "!g[Royal HN Weapons] !nYou can't choose your weapon when you're dead"); return 1; } else { ArmaChoosen[id] = true; ArmaVip3[id] = true; set_task(0.2, "GiveWeapon", id); CurentWeapon(id); ChatColor(id, "!g[Royal HN Weapons] !nYou have choosed VIP's !gMP5"); } } case 4: { if(!is_user_alive(id)) { ChatColor(id, "!g[Royal HN Weapons] !nYou can't choose your weapon when you're dead"); return 1; } else { ArmaChoosen[id] = true; ArmaVip4[id] = true; set_task(0.2, "GiveWeapon", id); CurentWeapon(id); ChatColor(id, "!g[Royal HN Weapons] !nYou have choosed VIP's !gXM1014"); } } case 5: { if(!is_user_alive(id)) { ChatColor(id, "!g[Royal HN Weapons] !nYou can't choose your weapon when you're dead"); return 1; } else { ArmaChoosen[id] = true; ArmaVip5[id] = true; set_task(0.2, "GiveWeapon", id); CurentWeapon(id); ChatColor(id, "!g[Royal HN Weapons] !nYou have choosed VIP's !gM34"); } } } menu_destroy (menu); return 1; } public GiveWeapon(id) { if(Arma1[id]) { give_item(id, "weapon_m4a1"); cs_set_user_bpammo(id, CSW_M4A1, 250); } if(Arma2[id]) { give_item(id, "weapon_ak47"); cs_set_user_bpammo(id, CSW_AK47, 250); } if(Arma3[id]) { give_item(id, "weapon_mp5navy"); cs_set_user_bpammo(id, CSW_MP5NAVY, 250); } if(Arma4[id]) { give_item(id, "weapon_xm1014"); cs_set_user_bpammo(id, CSW_XM1014, 250); } if(Arma5[id]) { give_item(id, "weapon_m3"); cs_set_user_bpammo(id, CSW_M3, 250); } if(ArmaVip1[id]) { give_item(id, "weapon_m4a1"); cs_set_user_bpammo(id, CSW_M4A1, 250); } if(ArmaVip2[id]) { give_item(id, "weapon_ak47"); cs_set_user_bpammo(id, CSW_AK47, 250); } if(ArmaVip3[id]) { give_item(id, "weapon_mp5navy"); cs_set_user_bpammo(id, CSW_MP5NAVY, 250); } if(ArmaVip4[id]) { give_item(id, "weapon_xm1014"); cs_set_user_bpammo(id, CSW_XM1014, 250); } if(ArmaVip5[id]) { give_item(id, "weapon_m3"); cs_set_user_bpammo(id, CSW_M3, 250); } } public CurentWeapon(id) { new CsTeams:userTeam = cs_get_user_team(id); if(Arma1[id] && get_user_weapon(id) == CSW_M4A1 ) set_pev(id, pev_viewmodel2, Arma1Model); if(Arma2[id] && get_user_weapon(id) == CSW_AK47 ) set_pev(id, pev_viewmodel2, Arma2Model); if(Arma3[id] && get_user_weapon(id) == CSW_MP5NAVY ) set_pev(id, pev_viewmodel2, Arma3Model); if(Arma4[id] && get_user_weapon(id) == CSW_XM1014 ) set_pev(id, pev_viewmodel2, Arma4Model); if(Arma5[id] && get_user_weapon(id) == CSW_M3 ) set_pev(id, pev_viewmodel2, Arma5Model); if(ArmaVip1[id] && get_user_weapon(id) == CSW_M4A1 ) { if(userTeam == CS_TEAM_T) { set_pev(id, pev_viewmodel2, ArmaVip1Modelt); } else if(userTeam == CS_TEAM_CT) { set_pev(id, pev_viewmodel2, ArmaVip1Modelct); } } if(ArmaVip2[id] && get_user_weapon(id) == CSW_AK47 ) { if(userTeam == CS_TEAM_T) { set_pev(id, pev_viewmodel2, ArmaVip2Modelt); } else if(userTeam == CS_TEAM_CT) { set_pev(id, pev_viewmodel2, ArmaVip2Modelct); } } if(ArmaVip3[id] && get_user_weapon(id) == CSW_MP5NAVY ) { if(userTeam == CS_TEAM_T) { set_pev(id, pev_viewmodel2, ArmaVip3Modelt); } else if(userTeam == CS_TEAM_CT) { set_pev(id, pev_viewmodel2, ArmaVip3Modelct); } } if(ArmaVip4[id] && get_user_weapon(id) == CSW_XM1014 ) { if(userTeam == CS_TEAM_T) { set_pev(id, pev_viewmodel2, ArmaVip4Modelt); } else if(userTeam == CS_TEAM_CT) { set_pev(id, pev_viewmodel2, ArmaVip4Modelct); } } if(ArmaVip5[id] && get_user_weapon(id) == CSW_M3 ) { if(userTeam == CS_TEAM_T) { set_pev(id, pev_viewmodel2, ArmaVip5Modelt); } else if(userTeam == CS_TEAM_CT) { set_pev(id, pev_viewmodel2, ArmaVip5Modelct); } } } public SayArme(id) { if(ArmaChoosen[id]) { ChatColor(id, "!g[Royal HN Weapons] !nYou have already chosen a weapon this round"); return; } if(cs_get_user_team(id) == CS_TEAM_CT || cs_get_user_team(id) == CS_TEAM_T) { MenuArme(id); } } stock ChatColor(const id, const input[], any:...) { new count = 1, players[32]; static msg[191]; vformat(msg, 190, input, 3); replace_all(msg, 190, "!g", "^4"); // Verde replace_all(msg, 190, "!n", "^1"); // Galben replace_all(msg, 190, "!t", "^3"); // CT-Albastru ; T-Rosu replace_all(msg, 190, "!t2", "^0"); // CT-Albastru2 ; T-Rosu2 if (id) players[0] = id; else get_players(players, count, "ch"); { for (new i = 0; i < count; i++) { if (is_user_connected(players[i])) { message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]); write_byte(players[i]); write_string(msg); message_end(); } } } } Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi