Raised This Month: $99 Target: $400
 24% 

Plugin team score for capture the flag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jievylook
Senior Member
Join Date: Sep 2018
Old 05-15-2019 , 20:14   Plugin team score for capture the flag
Reply With Quote #1

Hi all,
Someone knows of a plugin that indicates the score of the teams, it is for a server of captures the flag.

Example:

Blue Team 01 - Red Team 03

I also need a plugin that shows the accumulated adrenaline in the screm

Thank you.
jievylook is offline
RojedaFeik
Junior Member
Join Date: Sep 2018
Location: Venezuela
Old 05-16-2019 , 13:53   Re: Plugin team score for capture the flag
Reply With Quote #2

Quote:
Originally Posted by jievylook View Post
Hi all,
Someone knows of a plugin that indicates the score of the teams, it is for a server of captures the flag.

Example:

Blue Team 01 - Red Team 03

I also need a plugin that shows the accumulated adrenaline in the screm

Thank you.
PHP Code:
#include <amxmodx>
#include <jctf>
#include <cstrike>
#include <dhudmessage>

#define PLUGIN "Team Score (JCTF)"
#define VERSION "1.46"
#define AUTHOR "Sugisaki"

new scorett
new scorect

new Conteo
new Tonteo

new SND_BLUE_WIN[] = "ctf/blue_wins.wav"
new SND_RED_WIN[] = "ctf/red_wins.wav"
new SND_TEAMS_TIED[] = "ctf/teams_tied.wav"

enum
{
    
TEAM_NONE 0,
    
TEAM_RED,
    
TEAM_BLUE,
    
TEAM_SPEC
}

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("TextMsg","game_c","a","2&#Game_C")
    
set_task(0.7,"score_round",_,_,_,"b")
    
set_task(0.1"check"___"b")
    
set_task(0.1,"conteo_team",19708,_,_,"b")
    
scorett 0
    scorect 
0
}
public 
PlaySound(sound[])
{
    
client_cmd(0"spk ^"%s^""sound)
}
public 
plugin_precache()
{
    
precache_sound(SND_BLUE_WIN)
    
precache_sound(SND_RED_WIN)
    
precache_sound(SND_TEAMS_TIED)
}
public 
game_c()
{
    
set_task(3.0"reset_score")
}
public 
reset_score()
{
    
scorett 0
    scorect 
0
}
public 
jctf_flag(evidtm)
{
    if(
ev == FLAG_CAPTURED)
    {
        switch(
tm)
        {
            case 
TEAM_REDscorect++
            case 
TEAM_BLUEscorett++
        }
    }
    return
}
public 
score_round()
{
    
set_dhudmessage(2552552550.340.0306.012.0)
    
show_dhudmessage(0"[%d] Blue Team || Red Team [%d]^n        %i                      %i"ConteoTonteoscorectscorett)
}
public 
check()
{
    new 
string[10]
    
get_cvar_string("amx_timeleft"string10)
    
    if(
equal(string"00:00"))
    {
        
remove_task(_)
        if(
scorect == scorett)
            
PlaySound(SND_TEAMS_TIED)
        else if(
scorect>scorett)
            
PlaySound(SND_BLUE_WIN)
        else if(
scorect<scorett)
            
PlaySound(SND_RED_WIN)
    }
}

public 
conteo_team() {
    new 
iCTconteo                                                                                            
        
for(new 0<= get_maxplayers(); i++) {                                                    
        if(
is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT)
        {
            
iCTconteo++
        }
    }    
    new 
iTRconteo
        
for(new 0<= get_maxplayers(); i++) 
    {                                                        
        if(
is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T)
        {
            
iTRconteo++
        }
    }
    
Conteo iCTconteo
    Tonteo 
iTRconteo

Attached Files
File Type: zip sounds.zip (71.7 KB, 5 views)
__________________
RojedaFeik is offline
jievylook
Senior Member
Join Date: Sep 2018
Old 05-16-2019 , 23:28   Re: Plugin team score for capture the flag
Reply With Quote #3

Quote:
Originally Posted by RojedaFeik View Post
PHP Code:
#include <amxmodx>
#include <jctf>
#include <cstrike>
#include <dhudmessage>

#define PLUGIN "Team Score (JCTF)"
#define VERSION "1.46"
#define AUTHOR "Sugisaki"

new scorett
new scorect

new Conteo
new Tonteo

new SND_BLUE_WIN[] = "ctf/blue_wins.wav"
new SND_RED_WIN[] = "ctf/red_wins.wav"
new SND_TEAMS_TIED[] = "ctf/teams_tied.wav"

enum
{
    
TEAM_NONE 0,
    
TEAM_RED,
    
TEAM_BLUE,
    
TEAM_SPEC
}

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("TextMsg","game_c","a","2&#Game_C")
    
set_task(0.7,"score_round",_,_,_,"b")
    
set_task(0.1"check"___"b")
    
set_task(0.1,"conteo_team",19708,_,_,"b")
    
scorett 0
    scorect 
0
}
public 
PlaySound(sound[])
{
    
client_cmd(0"spk ^"%s^""sound)
}
public 
plugin_precache()
{
    
precache_sound(SND_BLUE_WIN)
    
precache_sound(SND_RED_WIN)
    
precache_sound(SND_TEAMS_TIED)
}
public 
game_c()
{
    
set_task(3.0"reset_score")
}
public 
reset_score()
{
    
scorett 0
    scorect 
0
}
public 
jctf_flag(evidtm)
{
    if(
ev == FLAG_CAPTURED)
    {
        switch(
tm)
        {
            case 
TEAM_REDscorect++
            case 
TEAM_BLUEscorett++
        }
    }
    return
}
public 
score_round()
{
    
set_dhudmessage(2552552550.340.0306.012.0)
    
show_dhudmessage(0"[%d] Blue Team || Red Team [%d]^n        %i                      %i"ConteoTonteoscorectscorett)
}
public 
check()
{
    new 
string[10]
    
get_cvar_string("amx_timeleft"string10)
    
    if(
equal(string"00:00"))
    {
        
remove_task(_)
        if(
scorect == scorett)
            
PlaySound(SND_TEAMS_TIED)
        else if(
scorect>scorett)
            
PlaySound(SND_BLUE_WIN)
        else if(
scorect<scorett)
            
PlaySound(SND_RED_WIN)
    }
}

public 
conteo_team() {
    new 
iCTconteo                                                                                            
        
for(new 0<= get_maxplayers(); i++) {                                                    
        if(
is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT)
        {
            
iCTconteo++
        }
    }    
    new 
iTRconteo
        
for(new 0<= get_maxplayers(); i++) 
    {                                                        
        if(
is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T)
        {
            
iTRconteo++
        }
    }
    
Conteo iCTconteo
    Tonteo 
iTRconteo


I have the following error:

Error: Can not read from file: "dhudmessage" on line 4
jievylook is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 05-17-2019 , 06:07   Re: Plugin team score for capture the flag
Reply With Quote #4

Download https://github.com/OciXCrom/INCLibra...hudmessage.inc

Put that files in \cstrike\addons\amxmodx\scripting\include

Compile.
4ever16 is offline
jievylook
Senior Member
Join Date: Sep 2018
Old 05-17-2019 , 21:16   Re: Plugin team score for capture the flag
Reply With Quote #5

Quote:
Originally Posted by 4ever16 View Post
Download https://github.com/OciXCrom/INCLibra...hudmessage.inc

Put that files in \cstrike\addons\amxmodx\scripting\include

Compile.
I put everything correctly, I could compile the plugin, the plugin is running perfectly but nothing appears on the screen.

Can the plugin jctf.amxx be generating some conflict?
jievylook is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 05-18-2019 , 05:29   Re: Plugin team score for capture the flag
Reply With Quote #6

plugins.ini

jctf.amxx debug

\cstrike\addons\amxmodx\logs

Check errors there report back.
4ever16 is offline
jievylook
Senior Member
Join Date: Sep 2018
Old 05-23-2019 , 20:24   Re: Plugin team score for capture the flag
Reply With Quote #7

Quote:
Originally Posted by 4ever16 View Post
plugins.ini

jctf.amxx debug

\cstrike\addons\amxmodx\logs

Check errors there report back.

L 05/23/2019 - 21:20:46: Start of error session.
L 05/23/2019 - 21:20:46: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20190523.log")
L 05/23/2019 - 21:20:46: Function "ResetBonuses" was not found
L 05/23/2019 - 21:20:46: [AMXX] Run time error 19 (plugin "Buy_Menu.amxx") - debug not enabled!
L 05/23/2019 - 21:20:46: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
jievylook is offline
Reply


Thread Tools
Display Modes

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 07:54.


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