PDA

View Full Version : flag mod team score plugin


xxkingxx
01-07-2017, 05:37
Hi guys , pls ctf csdm flag mod team score plugin necessary

shehzad1234
01-07-2017, 05:39
u wan't this?? click me (https://forums.alliedmods.net/showthread.php?p=397473)

xxkingxx
01-07-2017, 05:42
u wan't this?? click me (https://forums.alliedmods.net/showthread.php?p=397473)

mod : Click (https://forums.alliedmods.net/showthread.php?t=132115)

shehzad1234
01-07-2017, 05:44
please full explain what u wan't

xxkingxx
01-07-2017, 05:52
please full explain what u wan't

Sample İmages : Clickkkkhttp://i.hizliresim.com/77QDWY.png

AdamK
01-08-2017, 14:12
@xxkingxx (https://forums.alliedmods.net/member.php?u=276954):


Try this, No idea if it works,


#include <amxmodx>
#include <jctf>
#include <dhudmessage>

#define PLUGIN "Score"
#define VERSION "0.1"
#define AUTHOR "Unknown"

new scorett
new scorect

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(PLUGIN, VERSION, AUTHOR)
register_event("TextMsg","game_c","a","2&#Game_C")
set_task(1.0,"score_round",_,_,_,"b")
set_task(0.9, "check", _, _, _, "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(ev, id, tm)
{
if(ev == FLAG_CAPTURED)
{
switch(tm)
{
case TEAM_RED: scorect++
case TEAM_BLUE: scorett++
}
}
return
}
public score_round()
{
set_dhudmessage(255, 255, 255, -1.0, 0.0, 0, 0.0, 1.0+0.01)
show_dhudmessage(0, "Blue Team || Red Team^n%i %i", scorect, scorett)
}
public check()
{
new string[10]
get_cvar_string("amx_timeleft", string, 10)

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)
}
}