Junior Member
Join Date: Jul 2008
Location: Brazil
|
10-12-2008
, 20:57
PunkServer Easy Mix - REWRITEN
|
#1
|
I've rewriten this plugin, the old one was bugged and got unapproved, this one works 100%!
WORKS ONLY WITH COUNTER-STRIKE MOD!
Plugin: PunkServer - MIX ®
Lang Suport: English ,Brazilian Portguese and Español(Special Thx to AntiBots )
Created by: OffspringBR [ Ricardo de Lima Thomaz ]
Join: punk-server.servegame.com:27015
PunkServer Addons v1.3 : www.punk-server.vai.la
What the Plugin does?
You can SET Tags for the Teams
You can send EVERYONE to SPECTATE
You can SORT the Players TEAM
You can Start a MIX
This is my first plugin! I had this Idea after looking for some plugin that helps me making
a Mix on my server. I don't know if MIX is Known in the whole world, so I'm going to explain
it!
MIX: Is a gameplay just like a CF, a CPL but with random Players and a sorted team. It is
played with 5 Players on wich team.
The Configs are down here. . .
Commands:
you can just use /mix on the Chat [ say and say_team ]
or you can do it manual,
Execute TAG: punkserver_tag
Execute MIX: punkserver_mix
All To Spec: punkserver_allspec
Sort Team: punkserver_sortteam
The configs CVAR are:
Define the Counter-Terrorist TEAM TAG: amx_mix_tagCT <tag>
Define the Terrorist TEAM TAG: amx_mix_tagTR <tag>
Define the Side of the TAG: amx_lado_tag 0/1 [ for LEFT/RIGHT ]
Fell Free for translating for your own lang. EDIT the punkserver_lang.txt
READ THIS:
Now the configs of Mix can be changed by a .cfg file.
How to set the configs?
Create a file named mix.cfg at you counter-strike server Folder, in the same place of server.cfg
in this file you have to put the Config you want to.
Here is the cfg I use.
Code:
mp_autokick 0
mp_autocrosshair 0
mp_autoteambalance 0
mp_buytime 0.25
mp_consistency 1
mp_c4timer 35
mp_fadetoblack 0
mp_falldamage 0
mp_flashlight 1
mp_forcecamera 3
mp_friendlyfire 1
mp_freezetime 6
mp_fraglimit 0
mp_hostagepenalty 0
mp_limitteams 6
mp_logfile 1
mp_logmessages 1
mp_logdetail 3
mp_maxrounds 15
mp_playerid 0
mp_roundtime 1.75
mp_startmoney 800
mp_timelimit 999
mp_tkpunish 0
mp_winlimit 0
sv_aim 0
sv_airaccelerate 10
sv_airmove 1
sv_allowdownload 0
sv_clienttrace 1.0
sv_clipmode 0
sv_allowupload 0
sv_maxspeed 320
sv_maxupdaterate 101
sys_ticrate 10000
decalfrequency 60
pausable 0
log on
decalfrequency 60
edgefriction 2
host_framerate 0
exec listip.cfg
exec banned.cfg
Sorry if there is any English error
If there is any bug report them to: [email protected]
Code:
//
// DO NOT CHANGE THE plugin_register
//
// Plugin: PunkServer - MIX ®
// Lang Suport: English and Brazilian Portguese
// Created by: OffspringBR [ Ricardo de Lima Thomaz ]
// Join: punk-server.servegame.com:27015
//
// What the Plugin does?
//
// You can SET Tags for the Teams
// You can send EVERYONE to SPECTATE
// You can SORT the Players TEAM
// You can Start a MIX
//
//
// This is my first plugin! I had this Idea after looking for some plugin that helps me making
// a Mix on my server. I don't know if MIX is Known in the whole world, so I'm going to explain
// it!
//
// MIX: Is a gameplay just like a CF, a CPL but with random Players and a sorted team. It is
// played with 5 Players on wich team.
// The Configs are down here. . .
//
// Commands:
// you can just use /mix on the Chat [ say and say_team ]
// or you can do manual,
// Execute TAG: punkserver_tag
// Execute MIX: punkserver_mix
// All To Spec: punkserver_allspec
// Sort Team: punkserver_sortteam
//
// The configs CVAR are:
// Define the Counter-Terrorist TEAM TAG: amx_mix_tagCT <tag>
// Define the Terrorist TEAM TAG: amx_mix_tagTR <tag>
// Define the Side of the TAG: amx_lado_tag 0/1 [ for LEFT/RIGHT ]
//
// Fell Free for translating for your own lang. EDIT the punkserver_lang.txt
//
// Sorry if there is any English error = X
//
//
// If there is any bug report them to: [email protected]
//
//
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
new mmixmenu // Menu
new a = 0
new b = 0
new pcvar
new CTpcvar
new TRpcvar
new contador
new contar
public plugin_init() {
register_plugin("Mix TAG", "1.0", "OffspringBR")
CTpcvar = register_cvar("amx_mix_tagCT", "mIx # ")
TRpcvar = register_cvar("amx_mix_tagTR", ">MiX< | ")
pcvar = register_cvar("amx_lado_tag", "0")
register_concmd("punkserver_tag","Tag")
register_concmd("punkserver_mix","Mix")
register_concmd("punkserver_allspec","AllSpec")
register_concmd("punkserver_sortteam","SortTeam")
register_concmd("say /mix","MixMenu")
register_concmd("say_team /mix","MixMenu")
register_dictionary("punkserver_lang.txt")
return PLUGIN_CONTINUE
}
public MixMenu(id)
{
/* Menu Menu - PunkServer Mix */
/* Use menu_display(id, mMenu-PunkServerMix, 0) to show the menu to an user. */
new all_spec[32]
format(all_spec, 31,"%L", id, "ALL_SPEC")
new sort_team[32]
format(sort_team, 31,"%L", id, "SORT_TEAM")
new turn_on[32]
if( contador == 1 )
{
format(turn_on, 31,"%L [TURNED ON]", id, "TURN_ON")
}
else
{
format(turn_on, 31,"%L [TURNED OFF]", id, "TURN_ON")
}
new tag_on[32]
format(tag_on, 32,"%L", id, "TAG_ON")
/* Menu mixmenu */
/* Use menu_display(id, mmixmenu, 0) to show the menu to an user. */
mmixmenu = menu_create("mixmenu", "mh_mixmenu")
menu_additem(mmixmenu, all_spec, "ma_mixmenu", ADMIN_MENU)
menu_additem(mmixmenu, sort_team, "ma_mixmenu", ADMIN_MENU)
menu_additem(mmixmenu, turn_on, "ma_mixmenu", ADMIN_MENU)
menu_additem(mmixmenu, tag_on, "ma_mixmenu", ADMIN_MENU)
/* Menu End */
menu_display(id, mmixmenu, 0)
return PLUGIN_HANDLED
}
public Tag(id)
{
if( is_user_admin(id) )
{
return PLUGIN_CONTINUE
}
new tagTR[32]
new tagCT[32]
new team[32]
new nick[32]
new newnick[32]
get_pcvar_string(CTpcvar, tagCT, 31)
get_pcvar_string(TRpcvar, tagTR, 31)
get_user_team(id,team,31)
get_user_name(id,nick,31)
if( strcmp(team,"@terrorist") == 0 || strcmp(team,"TERRORIST") == 0)
{
if (containi(nick,tagTR) != -1 )
return PLUGIN_HANDLED
if(get_pcvar_num(pcvar))
{
format(newnick, 31, "%s%s", nick, tagTR)
set_user_info(id, "name", newnick)
}
else
{
format(newnick, 31, "%s%s", tagTR, nick)
set_user_info(id, "name", newnick)
}
server_print("%L",id,"TR_NICK" , nick)
client_print(id,print_center,"%L", id, "NICK_CHANGE")
return PLUGIN_HANDLED
}
if( strcmp(team,"@counter") == 0 || strcmp(team,"CT") == 0)
{
if (containi(nick,tagCT) != -1 )
return PLUGIN_HANDLED
if(get_pcvar_num(pcvar))
{
format(newnick, 31, "%s%s", nick, tagCT)
set_user_info(id, "name", newnick)
}
else
{
format(newnick, 31, "%s%s", tagCT, nick)
set_user_info(id, "name", newnick)
}
server_print("%L",id,"CT_NICK", nick)
client_print(id,print_center,"%L",id,"NICK_CHANGE")
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
public Mix(id)
{
if(contador != 1 && contador != 0)
{
server_cmd("exec mix.cfg")
contador = 1
}
else if( contar == 1)
{
server_cmd("exec mix.cfg")
contador = 1
}
else
{
server_cmd("exec server.cfg")
contador = 2
}
return PLUGIN_HANDLED
}
public AllSpec(id)
{
set_hudmessage(255, 0, 0, -1.0, -1.0)
show_hudmessage(id, "[ %L ]",id, "ALL_SPEC")
user_silentkill(id)
cs_set_user_team(id ,CS_TEAM_SPECTATOR,CS_DONTCHANGE)
return PLUGIN_HANDLED
}
public SortTeam(id)
{
set_hudmessage(0, 255, 0, -1.0, -1.0)
show_hudmessage(id, "%L", id, "BEING_SORT")
if(random_num(0,1) == 0)
{
if( 2*a <= get_playersnum(0) )
{
user_silentkill(id)
cs_set_user_team(id,CS_TEAM_T,CS_T_LEET)
a++
client_print(id,print_chat,"%L",id,"TR_NUM", a)
}
else
{
user_silentkill(id)
cs_set_user_team(id,CS_TEAM_CT,CS_CT_URBAN)
}
}
if(random_num(0,1) == 1)
{
if( 2*b <= get_playersnum() )
{
user_silentkill(id)
cs_set_user_team(id,CS_TEAM_CT,CS_CT_URBAN)
b++
client_print(id,print_chat,"%L",id,"CT_NUM", b)
}
else
{
user_silentkill(id)
cs_set_user_team(id,CS_TEAM_T,CS_T_LEET)
}
}
return PLUGIN_HANDLED
}
public mh_mixmenu(id, menu, item) {
if( item == 0 )
{
for(new i = 1; i <= get_maxplayers(); i ++)
{
server_print("%d", i)
if(is_user_connected(i))
AllSpec(i)
}
}
if( item == 1 )
{
for(new i = 1; i <= get_maxplayers(); i ++)
{
server_print("%d", i)
if(is_user_connected(i))
SortTeam(i)
}
}
if( item == 2 )
{
contar++
Mix(id)
}
if( item == 3 )
{
for(new i = 1; i <= get_maxplayers(); i ++)
{
server_print("%d", i)
if(is_user_connected(i))
Tag(i)
}
}
}
public ma_mixmenu(id) {
}
Code:
//"Save it to "/addons/amxmodx/data/lang"" [ save as punkserver_lang.txt ]
[en]
ALL_SPEC = All Spec
SORT_TEAM = Sort Teams
TURN_ON = Turn Mix On
TAG_ON = Use tag on Teams
TR_NICK = The nick name of the TERROR ^"%s^" was changed
CT_NICK = The nick name of the C-T ^"%s^" was changed
NICK_CHANGE = Your nickname was changed by the Administrator
BEING_SORT = The Teams are Being Sorted!
TR_NUM = There are %d Terrorists
CT_NUM = There are %d Counter-Terrorists
[bp]
ALL_SPEC = Todos para Spec
SORT_TEAM = Sortear Times
TURN_ON = Ligar modo MIX
TAG_ON = Colocar TAG nos times
TR_NICK = O Nick do TR ^"%s^" foi mudado
CT_NICK = O Nick do CT ^"%s^" foi mudado
NICK_CHANGE = Seu Nick foi mudado pelo administrador!
BEING_SORT = Os times estao sendo sorteados!
TR_NUM = Existem %d Terroristas
CT_NUM = Existem %d Contra-Terroristas
[es]
ALL_SPEC = Todos para Spec
SORT_TEAM = Sortear Equipos
TURN_ON = Modo MIX Activado
TAG_ON = Colocar TAG en los Equipos
TR_NICK = El nick de los TERROR ^"%s^" fue cambiado
CT_NICK = El nick de los CT ^"%s^" fue cambiado
NICK_CHANGE = Tu nick fue cambiado por el Administrador
BEING_SORT = Sorteo en progreso!
TR_NUM = Existen %d Terrorists
CT_NUM = Existen %d Counter-Terrorists
Thx for everybody!
I hope that you like the plugin!
REWRITEN
Last edited by OffspringBR; 10-13-2008 at 12:02.
Reason: Config File.
|
|