Raised This Month: $51 Target: $400
 12% 

Need Help In Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Abdulrazzaq
Member
Join Date: Oct 2019
Location: NZ
Old 10-23-2019 , 06:44   Need Help In Plugin
Reply With Quote #1

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:idHamError:errreason[])
{
    new 
func get_func_id("HamFilter", -1);
    new 
bool:fail 1;
    new 
var1;
    if (
func != -&& 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(redgreenblueFloat:xFloat:yeffectsFloat:fxtimeFloat:holdtimeFloat:fadeintimeFloat:fadeouttimebool:reliable)
{
    
__dhud_color clamp(red"HamFilter"255) << 16 clamp(green"HamFilter"255) << 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(indexmessage[])
{
    new 
buffer[128];
    new 
numArguments numargs();
    if (
numArguments == 2)
    {
        
send_dhudMessage(indexmessage);
    }
    else
    {
        new 
var1;
        if (
index || numArguments == 3)
        {
            
vformat(buffer127message"");
            
send_dhudMessage(indexbuffer);
        }
        new 
playersList[32];
        new 
numPlayers;
        
get_players(playersListnumPlayers"ch"88);
        if (!
numPlayers)
        {
            return 
0;
        }
        new Array:
handleArrayML ArrayCreate(132);
        new 
2;
        new 
j;
        while (
numArguments)
        {
            if (
getarg(i"HamFilter") == -1)
            {
                do {
                    
j++;
                } while ((
buffer[j] = getarg(1j)));
                
0;
                if (
GetLangTransKey(buffer) != -1)
                {
                    
i++;
                    
ArrayPushCell(handleArrayMLi);
                }
            }
            
i++;
        }
        new 
size ArraySize(handleArrayML);
        if (!
size)
        {
            
vformat(buffer127message"");
            
send_dhudMessage(indexbuffer);
        }
        else
        {
            new 
i;
            new 
j;
            while (
numPlayers)
            {
                
index playersList[i];
                
0;
                while (
size)
                {
                    
setarg(ArrayGetCell(handleArrayMLj), "HamFilter"index);
                    
j++;
                }
                
vformat(buffer127message"");
                
send_dhudMessage(indexbuffer);
                
i++;
            }
        }
        
ArrayDestroy(handleArrayML);
    }
    return 
1;
}

send_dhudMessage(indexmessage[])
{
    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(var25192index);
    
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", -1352, -1);
    
register_clcmd("shield""BlockCmds", -1352, -1);
    
register_clcmd("cl_rebuy""BlockCmds", -1352, -1);
    
register_clcmd("drop""BlockCmds", -1352, -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"832836);
        }
        if (
grenade_round)
        {
            
give_item(id"weapon_hegrenade");
            
cs_set_user_bpammo(id4999);
            
engclient_cmd(id"weapon_hegrenade"832836);
        }
        if (
deagle_round)
        {
            
give_item(id"weapon_deagle");
            
cs_set_user_bpammo(id26999);
            
engclient_cmd(id"weapon_deagle"832836);
        }
        if (
AWP_round)
        {
            
give_item(id"weapon_awp");
            
cs_set_user_bpammo(id18999);
            
engclient_cmd(id"weapon_awp"832836);
        }
        if (
ak47_round)
        {
            
give_item(id"weapon_ak47");
            
cs_set_user_bpammo(id28999);
            
engclient_cmd(id"weapon_ak47"832836);
        }
        if (
m4a1_round)
        {
            
give_item(id"weapon_m4a1");
            
cs_set_user_bpammo(id22999);
            
engclient_cmd(id"weapon_m4a1"832836);
        }
        if (
machine_round)
        {
            
give_item(id"weapon_m249");
            
cs_set_user_bpammo(id20999);
            
engclient_cmd(id"weapon_m249"832836);
        }
        if (
shotgun_round)
        {
            
give_item(id"weapon_xm1014");
            
cs_set_user_bpammo(id5999);
            
engclient_cmd(id"weapon_xm1014"832836);
        }
        if (
GoldAK_round)
        {
            
give_item(id"weapon_ak47");
            
cs_set_user_bpammo(id28999);
            
engclient_cmd(id"weapon_ak47"832836);
        }
        if (
scout_round)
        {
            
give_item(id"weapon_scout");
            
cs_set_user_bpammo(id""999);
            
engclient_cmd(id"weapon_scout"832836);
        }
    }
    return 
0;
}

public 
RoundStart()
{
    
g_bRound true;
    new 
players[32];
    new 
num;
    
get_players(playersnum177688);
    new 
i;
    while (
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(playersnum177688);
    new 
i;
    while (
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(Menu4"Normal Round");
    
menu_setprop(Menu61);
    
menu_display(idMenu"HamFilter");
    return 
1;
}

public 
rounds_options(idMenuitem)
{
    if (
item == -3)
    {
        return 
0;
    }
    new 
iData[6];
    new 
iAccess;
    new 
iCallback;
    new 
iName[64];
    
menu_item_getinfo(MenuitemiAccessiData5iName63iCallback);
    
set_dhudmessage(0255255, -1.0, -1.006.012.00.10.2false);
    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;


Last edited by Abdulrazzaq; 10-23-2019 at 08:36.
Abdulrazzaq is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 10-23-2019 , 07:35   Re: Need Help In Plugin
Reply With Quote #2

Put the code in proper [code] tags if you want people to even bother reading the thread.
This is not the request section - here you do things by yourself.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Abdulrazzaq
Member
Join Date: Oct 2019
Location: NZ
Old 10-23-2019 , 08:19   Re: Need Help In Plugin
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
Put the code in proper [code] tags if you want people to even bother reading the thread.
This is not the request section - here you do things by yourself.
Oh Very Sorry Sir I am new in Forum so i don't know i ll post this thread in request section Apologize to you
and i fixed it to CODE too ....btw if you didn't understand check my post in request section too

Last edited by Abdulrazzaq; 10-23-2019 at 08:37.
Abdulrazzaq is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 10-23-2019 , 08:42   Re: Need Help In Plugin
Reply With Quote #4

Now that I can see things more clearly - that is not a .sma file. It's a decompiled .amxx file that won't even compile.
Either give us the real .sma file (since clearly your FRIEND wrote it) or forget about fixing the plugin.
__________________

Last edited by OciXCrom; 10-23-2019 at 08:43.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Abdulrazzaq
Member
Join Date: Oct 2019
Location: NZ
Old 10-23-2019 , 08:59   Re: Need Help In Plugin
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
Now that I can see things more clearly - that is not a .sma file. It's a decompiled .amxx file that won't even compile.
Either give us the real .sma file (since clearly your FRIEND wrote it) or forget about fixing the plugin.
i have no longer contact with my friend that's why i came here .i have only thing was amxx to not for edit just to take some idea and hope someone make similar plugin for me without bugs ...
Abdulrazzaq is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 10-24-2019 , 01:17   Re: Need Help In Plugin
Reply With Quote #6

Quote:
Originally Posted by Abdulrazzaq View Post
i have no longer contact with my friend that's why i came here .i have only thing was amxx to not for edit just to take some idea and hope someone make similar plugin for me without bugs ...
This is scripting help section, if you request for creating a whole new plugin with just and idea, it will get ignored here, i have a similar ( modified ) plugin on my site with base plugin as WEAPONS WAR by zmd, you can check it out if it suits ur purpose : Here
instinctpt1 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode