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 , 08:23   Need Help In Plugin
Reply With Quote #1

Guyz i have plugin Name Special Rounds
But it was created by my friend but
i have no longer in contact with him

So i have only amxx file ... i want the same plugin without
bugs .. like alot of bugs coming from this plugin ..2 c4s and weapons drop everyround ...

The File is attached
i am glad and very thankful to you ...
Attached Files
File Type: amxx SpecialRounds.amxx (10.9 KB, 34 views)
Abdulrazzaq is offline
Abdulrazzaq
Member
Join Date: Oct 2019
Location: NZ
Old 10-23-2019 , 08:31   Re: Need Help In Plugin
Reply With Quote #2

OR
YOU GUYZ CAN FIX
THIS ONE ..IT Working good but its not blocking the buy menu ...


PHP Code:
//* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <engine> 
#include <fun>
#include <cstrike>
#include <hamsandwich>

/* credits:
Flicker For Random Pistols
v3x For amxx menu generator
Arkshine For disable buy
zmd94 For Give me The Code by Arkshine
*/

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""Constentine")
register_clcmd("amx_sprmenu""SprMenuShow")
register_clcmd("say /spr""SprMenuShow")

EnabledCvar register_cvar("amx_enable""1")// Enable/Disable Plugin
}

public 
SprMenuShow(id)
{
if(
get_pcvar_numEnabledCvar ) && get_user_flags(id) & ADMIN_ALL)
{
new 
menu menu_create("Special Round""SprMenuHandler"
menu_additem(menu"Knife round""1"0
menu_additem(menu"grenade+knife round""2"0
menu_additem(menu"shotgun round""3"0
menu_additem(menu"deagle round""4"0
menu_additem(menu"awp round""5"0
menu_additem(menu"random pistul round""6"0
menu_additem(menu"m4a1 round""7"0
menu_additem(menu"ak-47 round""8"0
menu_additem(menu"tmp round""9"0
menu_additem(menu"Unlimated Grenades round""10"0
menu_setprop(menuMPROP_EXITMEXIT_ALL

menu_display(idmenu0
}
}

public 
SprMenuHandler(idmenuitem)
{
if( 
item == MENU_EXIT )
{
menu_destroy(menu);
return 
PLUGIN_HANDLED;
}
new 
data[6], szName[33]; 
new 
accescallback;
menu_item_getinfo(menuitemaccesdata,charsmax(data), szName,charsmax(szName), callback
new 
key str_to_num(data); 
switch(
key
{
case 
1: { 
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_knife")
client_print(0print_chat"Admin Choose Knife Round!")
}
case 
2: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_knife")
give_item(id"weapon_hegrenade")
give_item(id"weapon_flashbang")
give_item(id"weapon_flashbang")
give_item(id"weapon_smokegrenade")  
client_print(0print_chat"Admin Choose Grenades And Knife Round!")
}
case 
3: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_m3")
give_item(id"weapon_xm1014")
cs_set_user_bpammo(id,CSW_M3,240)  
cs_set_user_bpammo(id,CSW_XM1014,240
client_print(0print_chat"Admin Choose Shotgun Round!"
}
case 
4: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,240)  
client_print(0print_chat"Admin Choose Deagle Round!")
}
case 
5: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_awp")
cs_set_user_bpammo(id,CSW_AWP,240)  
client_print(0print_chat"Admin Choose Awp Round!")
}
case 
6: {
hideBuyIcon
strip_user_weapons
(id
g_WpnID[S] = random_num(1charsmax(g_szSecondary))
give_item(idg_szSecondary[g_WpnID[S]][_WeaponName])
cs_set_user_bpammo(idg_szSecondary[g_WpnID[S]][_CSW], g_szSecondary[g_WpnID[S]][_Ammo])
client_print(0print_chat"Admin Choose Random Pistols Round!")
}
case 
7: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_m4a1")
cs_set_user_bpammo(id,CSW_M4A1,240)
client_print(0print_chat"Admin Choose M4A1 Round!"
}
case 
8: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_ak47")
cs_set_user_bpammo(id,CSW_AK47,240
client_print(0print_chat"Admin Choose AK47 Round!")
}
case 
9: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_tmp")
cs_set_user_bpammo(id,CSW_TMP,240
client_print(0print_chat"Admin Choose Tmp Round!")
}
case 
10: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_hegrenade")
give_item(id"weapon_flashbang")
give_item(id"weapon_flashbang")
give_item(id"weapon_smokegrenade")
cs_set_user_bpammo(id,CSW_HEGRENADE,240)  
cs_set_user_bpammo(id,CSW_FLASHBANG,240)  
cs_set_user_bpammo(id,CSW_SMOKEGRENADE,240)  
client_print(idprint_chat"Admin Choose Unlimated Grenades Round!")
}
}
menu_destroy(menu);
return 
PLUGIN_HANDLED;


hideBuyIcon()
{
new const 
szClassnameBuy[] = "func_buyzone"
remove_entity_name(szClassnameBuy)
new 
ent create_entity(szClassnameBuy)
entity_set_origin(entFloat:{8192.08192.08192.0})
entity_set_int(entEV_INT_solidSOLID_NOT)

Abdulrazzaq is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 10-23-2019 , 08:41   Re: Need Help In Plugin
Reply With Quote #3

How is anyone supposed to edit an .amxx file?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Abdulrazzaq
Member
Join Date: Oct 2019
Location: NZ
Old 10-23-2019 , 08:54   Re: Need Help In Plugin
Reply With Quote #4

Quote:
Originally Posted by OciXCrom View Post
How is anyone supposed to edit an .amxx file?
i didn't said to edit i just want the similar if anyone can make ..it i saw the Weapons War v7.5 too here but its very complicated ...i want the simple plugin as the amxx has but bug free ..thats what i am asking for sir <3 Hope someone make
and i also used your plugin chat manager and that was really awesome Sir <3

Last edited by Abdulrazzaq; 10-23-2019 at 08:55.
Abdulrazzaq is offline
Abdulrazzaq
Member
Join Date: Oct 2019
Location: NZ
Old 10-23-2019 , 12:58   Re: Need Help In Plugin
Reply With Quote #5

Quote:
Originally Posted by Abdulrazzaq View Post
OR
YOU GUYZ CAN FIX
THIS ONE ..IT Working good but its not blocking the buy menu ...


PHP Code:
//* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <engine> 
#include <fun>
#include <cstrike>
#include <hamsandwich>

/* credits:
Flicker For Random Pistols
v3x For amxx menu generator
Arkshine For disable buy
zmd94 For Give me The Code by Arkshine
*/

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""Constentine")
register_clcmd("amx_sprmenu""SprMenuShow")
register_clcmd("say /spr""SprMenuShow")

EnabledCvar register_cvar("amx_enable""1")// Enable/Disable Plugin
}

public 
SprMenuShow(id)
{
if(
get_pcvar_numEnabledCvar ) && get_user_flags(id) & ADMIN_ALL)
{
new 
menu menu_create("Special Round""SprMenuHandler"
menu_additem(menu"Knife round""1"0
menu_additem(menu"grenade+knife round""2"0
menu_additem(menu"shotgun round""3"0
menu_additem(menu"deagle round""4"0
menu_additem(menu"awp round""5"0
menu_additem(menu"random pistul round""6"0
menu_additem(menu"m4a1 round""7"0
menu_additem(menu"ak-47 round""8"0
menu_additem(menu"tmp round""9"0
menu_additem(menu"Unlimated Grenades round""10"0
menu_setprop(menuMPROP_EXITMEXIT_ALL

menu_display(idmenu0
}
}

public 
SprMenuHandler(idmenuitem)
{
if( 
item == MENU_EXIT )
{
menu_destroy(menu);
return 
PLUGIN_HANDLED;
}
new 
data[6], szName[33]; 
new 
accescallback;
menu_item_getinfo(menuitemaccesdata,charsmax(data), szName,charsmax(szName), callback
new 
key str_to_num(data); 
switch(
key
{
case 
1: { 
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_knife")
client_print(0print_chat"Admin Choose Knife Round!")
}
case 
2: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_knife")
give_item(id"weapon_hegrenade")
give_item(id"weapon_flashbang")
give_item(id"weapon_flashbang")
give_item(id"weapon_smokegrenade")  
client_print(0print_chat"Admin Choose Grenades And Knife Round!")
}
case 
3: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_m3")
give_item(id"weapon_xm1014")
cs_set_user_bpammo(id,CSW_M3,240)  
cs_set_user_bpammo(id,CSW_XM1014,240
client_print(0print_chat"Admin Choose Shotgun Round!"
}
case 
4: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,240)  
client_print(0print_chat"Admin Choose Deagle Round!")
}
case 
5: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_awp")
cs_set_user_bpammo(id,CSW_AWP,240)  
client_print(0print_chat"Admin Choose Awp Round!")
}
case 
6: {
hideBuyIcon
strip_user_weapons
(id
g_WpnID[S] = random_num(1charsmax(g_szSecondary))
give_item(idg_szSecondary[g_WpnID[S]][_WeaponName])
cs_set_user_bpammo(idg_szSecondary[g_WpnID[S]][_CSW], g_szSecondary[g_WpnID[S]][_Ammo])
client_print(0print_chat"Admin Choose Random Pistols Round!")
}
case 
7: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_m4a1")
cs_set_user_bpammo(id,CSW_M4A1,240)
client_print(0print_chat"Admin Choose M4A1 Round!"
}
case 
8: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_ak47")
cs_set_user_bpammo(id,CSW_AK47,240
client_print(0print_chat"Admin Choose AK47 Round!")
}
case 
9: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_tmp")
cs_set_user_bpammo(id,CSW_TMP,240
client_print(0print_chat"Admin Choose Tmp Round!")
}
case 
10: {
hideBuyIcon
strip_user_weapons
(id
give_item(id"weapon_hegrenade")
give_item(id"weapon_flashbang")
give_item(id"weapon_flashbang")
give_item(id"weapon_smokegrenade")
cs_set_user_bpammo(id,CSW_HEGRENADE,240)  
cs_set_user_bpammo(id,CSW_FLASHBANG,240)  
cs_set_user_bpammo(id,CSW_SMOKEGRENADE,240)  
client_print(idprint_chat"Admin Choose Unlimated Grenades Round!")
}
}
menu_destroy(menu);
return 
PLUGIN_HANDLED;


hideBuyIcon()
{
new const 
szClassnameBuy[] = "func_buyzone"
remove_entity_name(szClassnameBuy)
new 
ent create_entity(szClassnameBuy)
entity_set_origin(entFloat:{8192.08192.08192.0})
entity_set_int(entEV_INT_solidSOLID_NOT)

OK Sir you won't make the plugin for me then atleast fix this one buy issue
ppl still buy weapons ...when special rounds start so can you restrict the
menu in this one ?

atleast Answer me Yes or No please ..... i am running a gamming community alot
of ppl asking me
Abdulrazzaq is offline
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 10-23-2019 , 14:08   Re: Need Help In Plugin
Reply With Quote #6

1 - read the rules
2 - have patience, it's not allowed to bump your thread as you feel like it, people will help when they have time
3 - it's not allowed to post .amxx files
4 - don't open 2 threads for the same thing

Last edited by tarsisd2; 10-23-2019 at 14:09.
tarsisd2 is offline
Abdulrazzaq
Member
Join Date: Oct 2019
Location: NZ
Old 10-23-2019 , 23:12   Re: Need Help In Plugin
Reply With Quote #7

Quote:
Originally Posted by tarsisd2 View Post
1 - read the rules
2 - have patience, it's not allowed to bump your thread as you feel like it, people will help when they have time
3 - it's not allowed to post .amxx files
4 - don't open 2 threads for the same thing
Sorry sir i am new don't know the rules i ll take care next time
Abdulrazzaq is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 10-24-2019 , 01:23   Re: Need Help In Plugin
Reply With Quote #8

You can try this

Or this :
PHP Code:
#include <amxmodx> 
#include <amxmisc>
#include <engine>  
#include <fun> 
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <fakemeta_util>
#if AMXX_VERSION_NUM < 183
    #include <chatcolor>
    #include <dhudmessage>
#endif
new VERSION[] = "4.0"

new gMsgStatusIconChoose;
new 
bool:gBlockBuyZone;
new 
bool:g_bSpr false
new const g_weapons[][] =
{
    
"Knife""Shotgun""Deagle""AWP""M4A1""AK-47""TMP""Unlimited Nades""GayGun""Scout" 
}
public 
plugin_init() 

    
register_plugin("Special Round"VERSION"Abhishek")  /* Idea By : Constantine | Credits to : Exolent, Abhishek */
    
register_clcmd("say /spr""StartSpr"ADMIN_BAN);
    
register_clcmd("drop""DropBlock");
    
register_cvar("SpecialRound"VERSIONFCVAR_SERVER|FCVAR_SPONLY)
    
register_logevent("endSPR",2,"1=Round_End")
    
register_touch("weaponbox""player""WeaponTouch");
    
RegisterHam(Ham_Spawn"player""PlayerSpawn"1)
    
gMsgStatusIcon get_user_msgid("StatusIcon");
    
register_message(gMsgStatusIcon"MessageStatusIcon");
}

public 
PlayerSpawn(id){
    if(
g_bSprSendItems(id)
}

public 
StartSpr(idlvlcid

    if(!
cmd_access(idlvlcid0))
        return 
PLUGIN_HANDLED;
    if(
g_bSpr == false)
    {
        new 
SprMenu menu_create("Special Round Selector""HandleSpr")
        new 
szWeapons[64]
        
menu_setprop(SprMenuMPROP_NUMBER_COLOR"\w" );
        for(new 
isizeof(g_weapons); i++){
            
formatex(szWeaponscharsmax(szWeapons), "\y%s \rRound"g_weapons[i])  
            
menu_additem(SprMenuszWeapons)
        }
        
menu_displayidSprMenu );
        return 
SprMenu;
    }
    else{
        
client_print_color(00"^4[SPR] ^3SPR is Already ^4Running!");
        return 
PLUGIN_HANDLED;
    }


public 
client_putinserver(id)
{
    if(
g_bSpr
    {
        
client_print_color(id0,"^3[SPR] ^4Special Round is going on.")
    }
}

public 
HandleSpr(idSprMenuitem

    if( 
item == MENU_EXIT 
    { 
        
menu_destroy(SprMenu); 
        return 
PLUGIN_HANDLED
    }
    new 
players[32], numberPlayer
    get_players
(playersnumber,"a")
    switch(
item)  
    { 
        case 
0
        {  
            
g_bSpr true
            Choose 
0
            BlockBuy
()
            
give_item(Player"weapon_knife")
            
client_print_color(00"^3[SPR] ^4Admin Choose ^3Knife ^4Round!")    
        } 
        case 
1equipWeapon(1"weapon_xm1014"CSW_XM1014240"ShotGun"
        case 
2equipWeapon(2"weapon_deagle"CSW_DEAGLE240,"Deagle"
        case 
3equipWeapon(3"weapon_awp"CSW_AWP240"Awp")  
        case 
4equipWeapon(4"weapon_m4a1"CSW_M4A1240,"M4A1")  
        case 
5equipWeapon(5"weapon_ak47"CSW_AK47240,"AK47")
        case 
6equipWeapon(6"weapon_tmp"CSW_TMP240,"Tmp"
        case 
7equipWeapon(7"weapon_hegrenade"CSW_HEGRENADE240,"Unlimated Grenades")
        case 
8equipWeapon(8"weapon_g3sg1"CSW_G3SG1240,"Gay Gun")
        case 
9equipWeapon(9"weapon_scout"CSW_SCOUT240,"Scout")
    } 
    
client_print_color(id0,"** ^3[SPR] ^4You cannot pickup a Weapon during Special Round!"); 
    
menu_destroy(SprMenu); 
    return 
PLUGIN_HANDLED
}

public 
SendItems(id)
{
    switch(
Choose){
        case 
0: {             
            
fm_strip_user_weapons(id)  
            
give_item(id"weapon_knife")                   
        }  
        case 
1GiveWeapon(id"weapon_xm1014"CSW_XM1014240
        case 
2GiveWeapon(id"weapon_deagle"CSW_DEAGLE240
        case 
3GiveWeapon(id"weapon_awp"CSW_AWP240
        case 
4GiveWeapon(id"weapon_m4a1"CSW_M4A1240)  
        case 
5GiveWeapon(id"weapon_ak47"CSW_AK47240
        case 
6GiveWeapon(id"weapon_tmp"CSW_TMP240
        case 
7GiveWeapon(id"weapon_hegrenade"CSW_HEGRENADE240
        case 
8GiveWeapon(id"weapon_g3sg1"CSW_G3SG1240)
        case 
9GiveWeapon(id"weapon_scout"CSW_SCOUT240)
    }  
}

public 
endSPR()
{
    if(
g_bSpr)
    {
        new 
players[32], numberPlayer
        get_players
(playersnumber,"a")
    
        for(new 
i=0numberi++)
        {   
            
Player players[i]
            if(
Choose == 8)
                
cs_set_user_bpammo(PlayerCSW_HEGRENADE1)
            if(
is_user_alive(Player))
            {
                if(
get_user_team(Player) == 1)
                    
GiveWeapon(Player"weapon_glock18"CSW_GLOCK18120)
                else if(
get_user_team(Player) == 2)
                    
GiveWeapon(Player"weapon_usp"CSW_USP120)    
            }
        }
        
g_bSpr false
        
gBlockBuyZone false;
        
client_print_color(00,"^3[SPR] ^4Special Round is over now!"); 
    }
}

public 
DropBlock(id)
{
    if(
g_bSpr)
    {
        
client_print_color(id0"^3[SPR] ^4You cannot drop a weapon during Special Round!");
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE;
}

public 
WeaponTouch(entid
{  
    if(
g_bSpr)
        return 
PLUGIN_HANDLED;
    return 
PLUGIN_CONTINUE;
}

public 
MessageStatusIcon(msgIDdestreceiver) {
    
    if(
gBlockBuyZone && get_msg_arg_int(1)) {        
        new const 
buyzone[] = "buyzone";
        new 
icon[sizeof(buyzone) + 1];
        
get_msg_arg_string(2iconcharsmax(icon));
        if(
equal(iconbuyzone)) {
            
RemoveFromBuyzone(receiver);
            
set_msg_arg_int(1ARG_BYTE0);            
        }        
    }    
    return 
PLUGIN_CONTINUE;   
}

BlockBuy() {
    
message_begin(MSG_BROADCASTgMsgStatusIcon);
    
write_byte(0);
    
write_string("buyzone");
    
message_end();
    new 
players[32], pnum;
    
get_players(playerspnum"a");

    while(
pnum-- > 0) {
        
RemoveFromBuyzone(players[pnum]);
    }
    
gBlockBuyZone true;   
}
RemoveFromBuyzone(idset_pdata_int(id235get_pdata_int(id23555) & -255)

stock equipWeapon(const choiceweapon[], ammoamt, print[])
{
    
Choose choice
    g_bSpr 
true;
    
BlockBuy()
    new 
players[32], numberPlayer
    get_players
(playersnumber,"a")
    for(new 
i=0numberi++)
    {    
        
Player players[i]
        
fm_strip_user_weapons(Player)  
        
give_item(Playerweapon)
        
give_item(Player"weapon_knife")
        
cs_set_user_bpammo(Playerammoamt)    
    }
    
set_dhudmessage(255255255, -1.0, -0.6525.03.5)
    
show_dhudmessage(0"Admin has Started^n-= [ %s Round ]=-^n Lets have Fun!!", print)
    
client_print_color(00"^3[SPR] ^4Admin Choose ^3%s ^4Round!", print)
}

stock GiveWeapon(id, const weapon[], ammoamt)
{    
    
fm_strip_user_weapons(id)  
    
give_item(idweapon)
    
give_item(id"weapon_knife")
    
cs_set_user_bpammo(idammoamt)    

Also dont create threads in different sections

Last edited by instinctpt1; 10-24-2019 at 01:28.
instinctpt1 is offline
Abdulrazzaq
Member
Join Date: Oct 2019
Location: NZ
Old 10-30-2019 , 07:07   Re: Need Help In Plugin
Reply With Quote #9

Quote:
Originally Posted by instinctpt1 View Post
You can try this

Or this :
PHP Code:
#include <amxmodx> 
#include <amxmisc>
#include <engine>  
#include <fun> 
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <fakemeta_util>
#if AMXX_VERSION_NUM < 183
    #include <chatcolor>
    #include <dhudmessage>
#endif
new VERSION[] = "4.0"

new gMsgStatusIconChoose;
new 
bool:gBlockBuyZone;
new 
bool:g_bSpr false
new const g_weapons[][] =
{
    
"Knife""Shotgun""Deagle""AWP""M4A1""AK-47""TMP""Unlimited Nades""GayGun""Scout" 
}
public 
plugin_init() 

    
register_plugin("Special Round"VERSION"Abhishek")  /* Idea By : Constantine | Credits to : Exolent, Abhishek */
    
register_clcmd("say /spr""StartSpr"ADMIN_BAN);
    
register_clcmd("drop""DropBlock");
    
register_cvar("SpecialRound"VERSIONFCVAR_SERVER|FCVAR_SPONLY)
    
register_logevent("endSPR",2,"1=Round_End")
    
register_touch("weaponbox""player""WeaponTouch");
    
RegisterHam(Ham_Spawn"player""PlayerSpawn"1)
    
gMsgStatusIcon get_user_msgid("StatusIcon");
    
register_message(gMsgStatusIcon"MessageStatusIcon");
}

public 
PlayerSpawn(id){
    if(
g_bSprSendItems(id)
}

public 
StartSpr(idlvlcid

    if(!
cmd_access(idlvlcid0))
        return 
PLUGIN_HANDLED;
    if(
g_bSpr == false)
    {
        new 
SprMenu menu_create("Special Round Selector""HandleSpr")
        new 
szWeapons[64]
        
menu_setprop(SprMenuMPROP_NUMBER_COLOR"\w" );
        for(new 
isizeof(g_weapons); i++){
            
formatex(szWeaponscharsmax(szWeapons), "\y%s \rRound"g_weapons[i])  
            
menu_additem(SprMenuszWeapons)
        }
        
menu_displayidSprMenu );
        return 
SprMenu;
    }
    else{
        
client_print_color(00"^4[SPR] ^3SPR is Already ^4Running!");
        return 
PLUGIN_HANDLED;
    }


public 
client_putinserver(id)
{
    if(
g_bSpr
    {
        
client_print_color(id0,"^3[SPR] ^4Special Round is going on.")
    }
}

public 
HandleSpr(idSprMenuitem

    if( 
item == MENU_EXIT 
    { 
        
menu_destroy(SprMenu); 
        return 
PLUGIN_HANDLED
    }
    new 
players[32], numberPlayer
    get_players
(playersnumber,"a")
    switch(
item)  
    { 
        case 
0
        {  
            
g_bSpr true
            Choose 
0
            BlockBuy
()
            
give_item(Player"weapon_knife")
            
client_print_color(00"^3[SPR] ^4Admin Choose ^3Knife ^4Round!")    
        } 
        case 
1equipWeapon(1"weapon_xm1014"CSW_XM1014240"ShotGun"
        case 
2equipWeapon(2"weapon_deagle"CSW_DEAGLE240,"Deagle"
        case 
3equipWeapon(3"weapon_awp"CSW_AWP240"Awp")  
        case 
4equipWeapon(4"weapon_m4a1"CSW_M4A1240,"M4A1")  
        case 
5equipWeapon(5"weapon_ak47"CSW_AK47240,"AK47")
        case 
6equipWeapon(6"weapon_tmp"CSW_TMP240,"Tmp"
        case 
7equipWeapon(7"weapon_hegrenade"CSW_HEGRENADE240,"Unlimated Grenades")
        case 
8equipWeapon(8"weapon_g3sg1"CSW_G3SG1240,"Gay Gun")
        case 
9equipWeapon(9"weapon_scout"CSW_SCOUT240,"Scout")
    } 
    
client_print_color(id0,"** ^3[SPR] ^4You cannot pickup a Weapon during Special Round!"); 
    
menu_destroy(SprMenu); 
    return 
PLUGIN_HANDLED
}

public 
SendItems(id)
{
    switch(
Choose){
        case 
0: {             
            
fm_strip_user_weapons(id)  
            
give_item(id"weapon_knife")                   
        }  
        case 
1GiveWeapon(id"weapon_xm1014"CSW_XM1014240
        case 
2GiveWeapon(id"weapon_deagle"CSW_DEAGLE240
        case 
3GiveWeapon(id"weapon_awp"CSW_AWP240
        case 
4GiveWeapon(id"weapon_m4a1"CSW_M4A1240)  
        case 
5GiveWeapon(id"weapon_ak47"CSW_AK47240
        case 
6GiveWeapon(id"weapon_tmp"CSW_TMP240
        case 
7GiveWeapon(id"weapon_hegrenade"CSW_HEGRENADE240
        case 
8GiveWeapon(id"weapon_g3sg1"CSW_G3SG1240)
        case 
9GiveWeapon(id"weapon_scout"CSW_SCOUT240)
    }  
}

public 
endSPR()
{
    if(
g_bSpr)
    {
        new 
players[32], numberPlayer
        get_players
(playersnumber,"a")
    
        for(new 
i=0numberi++)
        {   
            
Player players[i]
            if(
Choose == 8)
                
cs_set_user_bpammo(PlayerCSW_HEGRENADE1)
            if(
is_user_alive(Player))
            {
                if(
get_user_team(Player) == 1)
                    
GiveWeapon(Player"weapon_glock18"CSW_GLOCK18120)
                else if(
get_user_team(Player) == 2)
                    
GiveWeapon(Player"weapon_usp"CSW_USP120)    
            }
        }
        
g_bSpr false
        
gBlockBuyZone false;
        
client_print_color(00,"^3[SPR] ^4Special Round is over now!"); 
    }
}

public 
DropBlock(id)
{
    if(
g_bSpr)
    {
        
client_print_color(id0"^3[SPR] ^4You cannot drop a weapon during Special Round!");
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE;
}

public 
WeaponTouch(entid
{  
    if(
g_bSpr)
        return 
PLUGIN_HANDLED;
    return 
PLUGIN_CONTINUE;
}

public 
MessageStatusIcon(msgIDdestreceiver) {
    
    if(
gBlockBuyZone && get_msg_arg_int(1)) {        
        new const 
buyzone[] = "buyzone";
        new 
icon[sizeof(buyzone) + 1];
        
get_msg_arg_string(2iconcharsmax(icon));
        if(
equal(iconbuyzone)) {
            
RemoveFromBuyzone(receiver);
            
set_msg_arg_int(1ARG_BYTE0);            
        }        
    }    
    return 
PLUGIN_CONTINUE;   
}

BlockBuy() {
    
message_begin(MSG_BROADCASTgMsgStatusIcon);
    
write_byte(0);
    
write_string("buyzone");
    
message_end();
    new 
players[32], pnum;
    
get_players(playerspnum"a");

    while(
pnum-- > 0) {
        
RemoveFromBuyzone(players[pnum]);
    }
    
gBlockBuyZone true;   
}
RemoveFromBuyzone(idset_pdata_int(id235get_pdata_int(id23555) & -255)

stock equipWeapon(const choiceweapon[], ammoamt, print[])
{
    
Choose choice
    g_bSpr 
true;
    
BlockBuy()
    new 
players[32], numberPlayer
    get_players
(playersnumber,"a")
    for(new 
i=0numberi++)
    {    
        
Player players[i]
        
fm_strip_user_weapons(Player)  
        
give_item(Playerweapon)
        
give_item(Player"weapon_knife")
        
cs_set_user_bpammo(Playerammoamt)    
    }
    
set_dhudmessage(255255255, -1.0, -0.6525.03.5)
    
show_dhudmessage(0"Admin has Started^n-= [ %s Round ]=-^n Lets have Fun!!", print)
    
client_print_color(00"^3[SPR] ^4Admin Choose ^3%s ^4Round!", print)
}

stock GiveWeapon(id, const weapon[], ammoamt)
{    
    
fm_strip_user_weapons(id)  
    
give_item(idweapon)
    
give_item(id"weapon_knife")
    
cs_set_user_bpammo(idammoamt)    

Also dont create threads in different sections
Thanks Alot Sir for your help and i am really sorry about that i break rules i wont do it again ...thanks again for your kind help
and please check my new thread i need help there to if you can sir <3

Last edited by Abdulrazzaq; 10-30-2019 at 08:55.
Abdulrazzaq 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 00:55.


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