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

[Requset] plugin special round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 01-17-2015 , 08:57   [Requset] plugin special round
Reply With Quote #1

hu guys, i want plugin for special round
ex:
i want round just awp and map is night and music

thx
arvEL. is offline
Send a message via Skype™ to arvEL.
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-17-2015 , 09:00   Re: [Requset] plugin special round
Reply With Quote #2

When this round should happen ? You will trigger it by a command ?
__________________
HamletEagle is offline
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 01-17-2015 , 09:14   Re: [Requset] plugin special round
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
When this round should happen ? You will trigger it by a command ?
yes bro i want this round run by command
ex:
in console
amx_round_awp
arvEL. is offline
Send a message via Skype™ to arvEL.
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 01-18-2015 , 08:17   Re: [Requset] plugin special round
Reply With Quote #4

can you help me guys
arvEL. is offline
Send a message via Skype™ to arvEL.
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 01-18-2015 , 10:58   Re: [Requset] plugin special round
Reply With Quote #5

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

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

#define PLUGIN "AWP Round"
#define VERSION "1.0"
#define AUTHOR "S.M"

#define LIGHTS "e"

new g_cvar
new g_nextround_awp false
new g_awpround false

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("HLTV""Event_NewRound""a""1=0""2=0")
    
register_clcmd("amx_round_awp""round_trigger"ADMIN_KICK)
    
g_cvar register_cvar("amx_round_awp_next""1""0 = AWP round start immidiately, 1 = next round")
    
register_logevent("logevent_round_end"2"1=Round_End")
    
register_event("CurWeapon""CurWeapon""be""1=1")
}
public 
Event_NewRound()
{
    if(
g_nextround_awp)
    {
        
g_nextround_awp false
        do_awpround
    
}
}
public 
round_trigger(id)
{
    if(
get_pcvar_num(g_cvar) == 1)
    {
        
g_nextround_awp true
        client_print
(0print_chat"ADMIN: %s started AWP Round on next round!"get_user_name(id))
    }
    if(
get_pcvar_num(g_cvar) == 0)
    {
        
client_print(0print_chat"ADMIN: %s started AWP Round!"get_user_name(id))
        
do_awpround
    
}
}
public 
do_awpround()
{
    
g_awpround true
    set_lights
(LIGHTS)
    new 
players[33], num
    get_players
(playersnum"c")
    for(new 
1<= numi++)
    {
        
strip_user_weapons(players[i])
        
give_item(players[i], "weapon_knife")
        
give_item(players[i], "weapon_awp")
    }
}
public 
CurWeapon(id)
{
    if(
g_awpround)
    {
        new 
weapon read_data(2)
        if(
weapon != CSW_AWP && weapon != CSW_KNIFE)
        {
            
strip_user_weapons(id)
            
give_item(id"weapon_knife")
            
give_item(id"weapon_awp")
        }
    }
}
public 
logevent_round_end()
{
    if(
g_awpround)
    {
        
g_awpround false
        set_lights
("#OFF")
    }

__________________

Last edited by Shiina.Mashiro; 01-18-2015 at 11:06. Reason: edit code
Shiina.Mashiro is offline
Eviatar Mor
Senior Member
Join Date: Jun 2014
Location: israel
Old 01-18-2015 , 11:26   Re: [Requset] plugin special round
Reply With Quote #6

just use this:
https://forums.alliedmods.net/showpo...2&postcount=24
Eviatar Mor is offline
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 01-18-2015 , 11:39   Re: [Requset] plugin special round
Reply With Quote #7

Quote:
Originally Posted by Shiina.Mashiro View Post
Not tested:
PHP Code:
/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "AWP Round"
#define VERSION "1.0"
#define AUTHOR "S.M"

#define LIGHTS "e"

new g_cvar
new g_nextround_awp false
new g_awpround false

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("HLTV""Event_NewRound""a""1=0""2=0")
    
register_clcmd("amx_round_awp""round_trigger"ADMIN_KICK)
    
g_cvar register_cvar("amx_round_awp_next""1""0 = AWP round start immidiately, 1 = next round")
    
register_logevent("logevent_round_end"2"1=Round_End")
    
register_event("CurWeapon""CurWeapon""be""1=1")
}
public 
Event_NewRound()
{
    if(
g_nextround_awp)
    {
        
g_nextround_awp false
        do_awpround
    
}
}
public 
round_trigger(id)
{
    if(
get_pcvar_num(g_cvar) == 1)
    {
        
g_nextround_awp true
        client_print
(0print_chat"ADMIN: %s started AWP Round on next round!"get_user_name(id))
    }
    if(
get_pcvar_num(g_cvar) == 0)
    {
        
client_print(0print_chat"ADMIN: %s started AWP Round!"get_user_name(id))
        
do_awpround
    
}
}
public 
do_awpround()
{
    
g_awpround true
    set_lights
(LIGHTS)
    new 
players[33], num
    get_players
(playersnum"c")
    for(new 
1<= numi++)
    {
        
strip_user_weapons(players[i])
        
give_item(players[i], "weapon_knife")
        
give_item(players[i], "weapon_awp")
    }
}
public 
CurWeapon(id)
{
    if(
g_awpround)
    {
        new 
weapon read_data(2)
        if(
weapon != CSW_AWP && weapon != CSW_KNIFE)
        {
            
strip_user_weapons(id)
            
give_item(id"weapon_knife")
            
give_item(id"weapon_awp")
        }
    }
}
public 
logevent_round_end()
{
    if(
g_awpround)
    {
        
g_awpround false
        set_lights
("#OFF")
    }

thx man but he have error in compile



can you help me
arvEL. is offline
Send a message via Skype™ to arvEL.
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 01-18-2015 , 11:40   Re: [Requset] plugin special round
Reply With Quote #8

Quote:
Originally Posted by Eviatar Mor View Post
not working bro
arvEL. is offline
Send a message via Skype™ to arvEL.
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 01-18-2015 , 12:02   Re: [Requset] plugin special round
Reply With Quote #9

Quote:
Originally Posted by arvEL. View Post
thx man but he have error in compile



can you help me

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

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

#define PLUGIN "AWP Round"
#define VERSION "1.0"
#define AUTHOR "S.M"

#define LIGHTS "e"

new g_cvar
new g_nextround_awp false
new g_awpround false

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("HLTV""Event_NewRound""a""1=0""2=0")
    
register_clcmd("amx_round_awp""round_trigger"ADMIN_KICK)
    
g_cvar register_cvar("amx_round_awp_next""1")// 0 = AWP round start immidiately, 1 = next round
    
register_logevent("logevent_round_end"2"1=Round_End")
    
register_event("CurWeapon""CurWeapon""be""1=1")
}
public 
Event_NewRound()
{
    if(
g_nextround_awp)
    {
        
g_nextround_awp false
        do_awpround
    
}
}
public 
round_trigger(id)
{
    new 
szname[32]
    
get_user_name(idsznamecharsmax(szname))
    if(
get_pcvar_num(g_cvar) == 1)
    {
        
g_nextround_awp true
        client_print
(0print_chat"ADMIN: %s started AWP Round on next round!"szname)
    }
    if(
get_pcvar_num(g_cvar) == 0)
    {
        
client_print(0print_chat"ADMIN: %s started AWP Round!"szname)
        
do_awpround
    
}
}
public 
do_awpround()
{
    
g_awpround true
    set_lights
(LIGHTS)
    new 
players[32], num
    get_players
(playersnum"c")
    for(new 
1<= numi++)
    {
        
strip_user_weapons(players[i])
        
give_item(players[i], "weapon_knife")
        
give_item(players[i], "weapon_awp")
    }
}
public 
CurWeapon(id)
{
    if(
g_awpround)
    {
        new 
weapon read_data(2)
        if(
weapon != CSW_AWP && weapon != CSW_KNIFE)
        {
            
strip_user_weapons(id)
            
give_item(id"weapon_knife")
            
give_item(id"weapon_awp")
        }
    }
}
public 
logevent_round_end()
{
    if(
g_awpround)
    {
        
g_awpround false
        set_lights
("#OFF")
    }

RateX is offline
Eviatar Mor
Senior Member
Join Date: Jun 2014
Location: israel
Old 01-18-2015 , 12:36   Re: [Requset] plugin special round
Reply With Quote #10

Quote:
Originally Posted by arvEL. View Post
not working bro
did u try do in chat /spr ? or amx_sprmenu in console?

Last edited by Eviatar Mor; 01-18-2015 at 12:36.
Eviatar Mor 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 15:43.


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