| Abdulrazzaq |
10-23-2019 06:44 |
Need Help In Plugin
Guyz I Need a Plugin Of Special Rounds Like I Have ....But it has a lot of bugs
can someone Fix It to the perfect one ....i am owner of a gaming community
but don't know the scripting my friend made this but it has bugs
like weapons drop every round 2 c4s and alot of minor things ...
PHP Code:
#include <amxmodx> #include <engine> #include <fun> #include <cstrike> #include <hamsandwich> #include <dhudmessage> new __dhud_color; new g_szTeamName[4][0] = { { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... } }; new __dhud_x; new __dhud_y; new __dhud_effect; new __dhud_fxtime; new __dhud_holdtime; new __dhud_fadeintime; new __dhud_fadeouttime; new __dhud_reliable; new bool:g_bRound; new knife_round; new grenade_round; new deagle_round; new AWP_round; new GoldAK_round; new scout_round; new ak47_round; new m4a1_round; new machine_round; new shotgun_round; public __fatal_ham_error(Ham:id, HamError:err, reason[]) { new func = get_func_id("HamFilter", -1); new bool:fail = 1; new var1; if (func != -1 && callfunc_begin_i(func, -1) == 1) { callfunc_push_int(id); callfunc_push_int(err); callfunc_push_str(reason, "HamFilter"); if (callfunc_end() == 1) { fail = false; } } if (fail) { set_fail_state(reason); } return 0; }
set_dhudmessage(red, green, blue, Float:x, Float:y, effects, Float:fxtime, Float:holdtime, Float:fadeintime, Float:fadeouttime, bool:reliable) { __dhud_color = clamp(red, "HamFilter", 255) << 16 + clamp(green, "HamFilter", 255) << 8 + clamp(blue, "HamFilter", 255); __dhud_x = x; __dhud_y = y; __dhud_effect = effects; __dhud_fxtime = fxtime; __dhud_holdtime = holdtime; __dhud_fadeintime = fadeintime; __dhud_fadeouttime = fadeouttime; __dhud_reliable = reliable; return 1; }
show_dhudmessage(index, message[]) { new buffer[128]; new numArguments = numargs(); if (numArguments == 2) { send_dhudMessage(index, message); } else { new var1; if (index || numArguments == 3) { vformat(buffer, 127, message, ""); send_dhudMessage(index, buffer); } new playersList[32]; new numPlayers; get_players(playersList, numPlayers, "ch", 88); if (!numPlayers) { return 0; } new Array:handleArrayML = ArrayCreate(1, 32); new i = 2; new j; while (i < numArguments) { if (getarg(i, "HamFilter") == -1) { do { j++; } while ((buffer[j] = getarg(i + 1, j))); j = 0; if (GetLangTransKey(buffer) != -1) { i++; ArrayPushCell(handleArrayML, i); } } i++; } new size = ArraySize(handleArrayML); if (!size) { vformat(buffer, 127, message, ""); send_dhudMessage(index, buffer); } else { new i; new j; while (i < numPlayers) { index = playersList[i]; j = 0; while (j < size) { setarg(ArrayGetCell(handleArrayML, j), "HamFilter", index); j++; } vformat(buffer, 127, message, ""); send_dhudMessage(index, buffer); i++; } } ArrayDestroy(handleArrayML); } return 1; }
send_dhudMessage(index, message[]) { new var2; if (__dhud_reliable) { new var1; if (index) { var1 = 1; } else { var1 = 2; } var2 = var1; } else { if (index) { var2 = 8; } var2 = 0; } message_begin(var2, 51, 92, index); write_byte(strlen(message) + 31); write_byte(6); write_byte(__dhud_effect); write_long(__dhud_color); write_long(__dhud_x); write_long(__dhud_y); write_long(__dhud_fadeintime); write_long(__dhud_fadeouttime); write_long(__dhud_holdtime); write_long(__dhud_fxtime); write_string(message); message_end(); return 0; }
public plugin_init() { register_plugin("Round Menu", "1.0", "ROCKY ROCK"); register_clcmd("say_mymyround", "round_menu", -1, 352, -1); register_clcmd("shield", "BlockCmds", -1, 352, -1); register_clcmd("cl_rebuy", "BlockCmds", -1, 352, -1); register_clcmd("drop", "BlockCmds", -1, 352, -1); register_event("CurWeapon", "EventCurWeapon", "be", "2!29"); register_logevent("round_end", 2, "1=Round_End"); return 0; }
public EventCurWeapon(id) { if (g_bRound) { if (knife_round) { engclient_cmd(id, "weapon_knife", 832, 836); } if (grenade_round) { give_item(id, "weapon_hegrenade"); cs_set_user_bpammo(id, 4, 999); engclient_cmd(id, "weapon_hegrenade", 832, 836); } if (deagle_round) { give_item(id, "weapon_deagle"); cs_set_user_bpammo(id, 26, 999); engclient_cmd(id, "weapon_deagle", 832, 836); } if (AWP_round) { give_item(id, "weapon_awp"); cs_set_user_bpammo(id, 18, 999); engclient_cmd(id, "weapon_awp", 832, 836); } if (ak47_round) { give_item(id, "weapon_ak47"); cs_set_user_bpammo(id, 28, 999); engclient_cmd(id, "weapon_ak47", 832, 836); } if (m4a1_round) { give_item(id, "weapon_m4a1"); cs_set_user_bpammo(id, 22, 999); engclient_cmd(id, "weapon_m4a1", 832, 836); } if (machine_round) { give_item(id, "weapon_m249"); cs_set_user_bpammo(id, 20, 999); engclient_cmd(id, "weapon_m249", 832, 836); } if (shotgun_round) { give_item(id, "weapon_xm1014"); cs_set_user_bpammo(id, 5, 999); engclient_cmd(id, "weapon_xm1014", 832, 836); } if (GoldAK_round) { give_item(id, "weapon_ak47"); cs_set_user_bpammo(id, 28, 999); engclient_cmd(id, "weapon_ak47", 832, 836); } if (scout_round) { give_item(id, "weapon_scout"); cs_set_user_bpammo(id, "", 999); engclient_cmd(id, "weapon_scout", 832, 836); } } return 0; }
public RoundStart() { g_bRound = true; new players[32]; new num; get_players(players, num, 1776, 88); new i; while (i < num) { new item = players[i]; EventCurWeapon(item); i++; } return 0; }
public BlockCmds() { if (g_bRound) { return 2; } return 0; }
public round_end() { g_bRound = false; new players[32]; new num; get_players(players, num, 1776, 88); new i; while (i < num) { new item = players[i]; strip_user_weapons(item); give_item(item, "weapon_knife"); i++; } return 0; }
public round_menu(id) { new Menu = menu_create("\w[\rXGC\w][\rRound Menu\w] ", "rounds_options", "HamFilter"); menu_additem(Menu, "\wKnife Round", 2064, "HamFilter", -1); menu_additem(Menu, "\wGrenade Round", 2136, "HamFilter", -1); menu_additem(Menu, "\wDeagle Round", 2204, "HamFilter", -1); menu_additem(Menu, "\wAWP Round", 2260, "HamFilter", -1); menu_additem(Menu, "\wGold Ak47 Round", 2340, "HamFilter", -1); menu_additem(Menu, "\wMachine Gun Round", 2428, "HamFilter", -1); menu_additem(Menu, "\wShotGun Round", 2500, "HamFilter", -1); menu_additem(Menu, "\wScout Round", 2564, "HamFilter", -1); menu_additem(Menu, "\wM4A1 Round", 2624, "HamFilter", -1); menu_additem(Menu, "\wAK47 Round", "10", "HamFilter", -1); menu_setprop(Menu, 4, "Normal Round"); menu_setprop(Menu, 6, 1); menu_display(id, Menu, "HamFilter"); return 1; }
public rounds_options(id, Menu, item) { if (item == -3) { return 0; } new iData[6]; new iAccess; new iCallback; new iName[64]; menu_item_getinfo(Menu, item, iAccess, iData, 5, iName, 63, iCallback); set_dhudmessage(0, 255, 255, -1.0, -1.0, 0, 6.0, 12.0, 0.1, 0.2, false); switch (str_to_num(iData)) { case 1: { knife_round = 1; grenade_round = 0; AWP_round = 0; scout_round = 0; GoldAK_round = 0; deagle_round = 0; ak47_round = 0; m4a1_round = 0; machine_round = 0; shotgun_round = 0; RoundStart(); show_dhudmessage(0, "Knife Round Has Begun"); } case 2: { knife_round = 0; grenade_round = 1; AWP_round = 0; scout_round = 0; GoldAK_round = 0; deagle_round = 0; ak47_round = 0; m4a1_round = 0; machine_round = 0; shotgun_round = 0; RoundStart(); show_dhudmessage(0, "Grenade Round Has Begun"); } case 3: { knife_round = 0; grenade_round = 0; AWP_round = 0; scout_round = 0; GoldAK_round = 0; deagle_round = 1; ak47_round = 0; m4a1_round = 0; machine_round = 0; shotgun_round = 0; RoundStart(); show_dhudmessage(0, "Deagle Round Has Begun"); } case 4: { knife_round = 0; grenade_round = 0; AWP_round = 1; scout_round = 0; GoldAK_round = 0; deagle_round = 0; ak47_round = 0; m4a1_round = 0; machine_round = 0; shotgun_round = 0; RoundStart(); show_dhudmessage(0, "AWP Round Has Begun"); } case 5: { knife_round = 0; grenade_round = 0; AWP_round = 0; scout_round = 0; GoldAK_round = 1; deagle_round = 0; ak47_round = 0; m4a1_round = 0; machine_round = 0; shotgun_round = 0; RoundStart(); show_dhudmessage(0, "Gold AK Round Has Begun"); server_cmd("my_ak47 @all"); } case 6: { knife_round = 0; grenade_round = 0; AWP_round = 0; scout_round = 0; GoldAK_round = 0; deagle_round = 0; ak47_round = 0; m4a1_round = 0; machine_round = 1; shotgun_round = 0; RoundStart(); show_dhudmessage(0, "Machine Gun Round Has Begun"); } case 7: { knife_round = 0; grenade_round = 0; AWP_round = 0; scout_round = 0; GoldAK_round = 0; deagle_round = 0; ak47_round = 0; m4a1_round = 0; machine_round = 0; shotgun_round = 1; RoundStart(); show_dhudmessage(0, "ShotGun Round Has Begun"); } case 8: { knife_round = 0; grenade_round = 0; AWP_round = 0; scout_round = 1; GoldAK_round = 0; deagle_round = 0; ak47_round = 0; m4a1_round = 0; machine_round = 0; shotgun_round = 0; RoundStart(); show_dhudmessage(0, "Scout Round Has Begun"); } case 9: { knife_round = 0; grenade_round = 0; AWP_round = 0; scout_round = 0; GoldAK_round = 0; deagle_round = 0; ak47_round = 0; m4a1_round = 1; machine_round = 0; shotgun_round = 0; RoundStart(); show_dhudmessage(0, "M4A1 Round Has Begun"); } case 10: { knife_round = 0; grenade_round = 0; AWP_round = 0; scout_round = 0; GoldAK_round = 0; deagle_round = 0; ak47_round = 1; m4a1_round = 0; machine_round = 0; shotgun_round = 0; RoundStart(); show_dhudmessage(0, "AK47 Round Has Begun"); } default: { } } return 0; }
|