AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Mix Selection 1.0 (https://forums.alliedmods.net/showthread.php?t=154943)

Neeeeeeeeeel.- 04-15-2011 16:09

Mix Selection 1.0
 
2 Attachment(s)
MixSelection
1.0
by Neeeeeeeeeel.-



Post in english:

Description:
When the admin active this plugin, all de players goes to spec, then he has to select one capitan for each team, the both capitans have to do a knife round, the capitan winner select the first teammate, when the ten players are selected the plugins end and you can start a "mix"

Basically its to better organaize in mixs
(Sorry for my bad english)

Admin commands:
Code:
say /cortar - All the players goes to spect and the plugin starts say /publico - If one capitan or player dissconect yo can stop the plugin with this command
Cvars:
Code:
ms_enabled 1/0 (default: 1) - Turn on/off ms_min_players (default: 10) - The minimum ammount of player to start
Credits:
Marcelo21 - Gave me the idea
meTaLiCroSS - I used this https://forums.alliedmods.net/showthread.php?t=90269
shinoda - He help me with a loop to open the teammates menu to the other capitan when the first select a player
lucas_7_94 - Some fixs and cvar to show servers running this plugin

Multilang:
ES - Neeeeeeeeeel.-
EN - Neeeeeeeeeel.-
BP - TheArmagedon
RO - DjOptimuS


Post en español:

Descripción:
Cuando un admin activa este plugin todos los jugadores se pasan a espectadores y al admin le aparece un menú para elegir un capitán para cada equipo, después los dos capitanes hacen una ronda de cuchillo, el que gana elige primero a su primer compañero después el otro y así hasta que los dos equipos tienen cinco jugadores cada uno. Y ahí termina el plugin y el admin puede empesar el mix.

El plugin es para facilitar la selección de compañeros y la ronda de cuchillo para ver quien elige primero.

Comandos de admin:
Code:
say /cortar - Todos los jugadores se tranfieren a espectadores y empieza el plugin say /publico - Si un capitan o jugador se desconecta podes volver todo a la normalidad con este comando
Cvars:
Code:
ms_enabled 1/0 (Por defecto: 1) - Prender/Apagar el plugin ms_min_players (Por defecto: 10) - La menor cantidad de jugadores para poder usar el plugin
Credits:
Marcelo21 - El me dió la idea
meTaLiCroSS - Usé este tutorial: https://forums.alliedmods.net/showthread.php?t=90269
shinoda - Me dió un loop para abrirle el menú al capitan contrario cuando el primero elegia a su teammate
lucas_7_94 - Algunos fixs y me dió una cvar para ver los servers que usan este plugin

Multilenguaje:
ES - Neeeeeeeeeel.-
EN - Neeeeeeeeeel.-
BP - TheArmagedon
RO - DjOptimuS


Saludos y espero que les guste.

Marcelo21 04-15-2011 18:08

Re: Mix Selection 1.0
 
Very good, I was testing

http://i52.tinypic.com/ilywqf.jpg

Neeeeeeeeeel.- 04-15-2011 18:09

Re: Mix Selection 1.0
 
In this section you must write in english
Now i will fix it.

Off: Solo podes contestar en inglés.

Edit: Fixed, thank you.

lucas_7_94 04-15-2011 22:46

Re: Mix Selection 1.0
 
1_ : The Whole Description should be in english.
2_ : Check if the attacker is a valid player.
3_ :
Code:
public Check() {     if(!equal(AUTHOR, "Neeeeeeeeeel.-"))     {         set_fail_state("Error")         return     } }

I think its rebundant.

4_
Code:
 for(new i = 1; i <= 32; i++)
Why make 32 loops when you cached the g_maxplayers ?

Neeeeeeeeeel.- 04-16-2011 00:19

Re: Mix Selection 1.0
 
1) I dont understand
</br>2) is_user_connected ?
</br> 3) Deleted
</br>4) Fixed Thank you (:
</br>Edit: The forum works bad ¬¬

lucas_7_94 04-16-2011 05:18

Re: Mix Selection 1.0
 
#ES: El thread tiene que ser en ingles solamente. , y 1 < id < g_maxplayers creo que era asi si mal no recuerdo para chequear conecta , a su vez intenta usar las publics tambien en ingles.

Neeeeeeeeeel.- 04-16-2011 19:20

Re: Mix Selection 1.0
 
I can post in two languages, i look it here: http://forums.alliedmods.net/showthread.php?t=21956 "You can include you description in the other language, but having the description in English is a must" I dont understand why i've to check if is a valid player... what kind of bug can do?

lucas_7_94 04-16-2011 20:16

Re: Mix Selection 1.0
 
possible bugs maybe.

And in Ham_Spawn , should check if the player is alive too.

Neeeeeeeeeel.- 04-16-2011 21:21

Re: Mix Selection 1.0
 
Quote:

Originally Posted by lucas_7_94 (Post 1451732)
possible bugs maybe.

And in Ham_Spawn , should check if the player is alive too.

Fixed, thanks.

Neeeeeeeeeel.- 04-20-2011 14:08

Re: Mix Selection 1.0
 
-Some fixes with commands /cut and /public

Mortred 04-20-2011 18:56

Re: Mix Selection 1.0
 
Quote:

Originally Posted by Neeeeeeeeeel.- (Post 1450737)
MixSelection
1.0
by Neeeeeeeeeel.-



Post in english:

Description:
When the admin active this plugin, all de players goes to spec, then he has to select one capitan for each team, the both capitans have to do a knife round, the capitan winner select the first teammate, when the ten players are selected the plugins end and you can start a &quot;mix&quot;

Basically its to better organaize in mixs
(Sorry for my bad english)

Admin commands:
Code:

say /cortar - All the players goes to spect and the plugin starts
say /publico - If one capitan or player dissconect yo can stop the plugin with this command

Cvars:
Code:

ms_enabled 1/0 (default: 1) - Turn on/off
ms_min_players (default: 10) - The minimum ammount of player to start

Credits:
Marcelo21 - Gave me the idea
meTaLiCroSS - I used this https://forums.alliedmods.net/showthread.php?t=90269
shinoda - He help me with a loop to open the teammates menu to the other capitan when the first select a player
lucas_7_94 - Some fixs and cvar to show servers running this plugin

Multilang:
ES - Neeeeeeeeeel.-
EN - Neeeeeeeeeel.-


Post en español:

Descripción:
Cuando un admin activa este plugin todos los jugadores se pasan a espectadores y al admin le aparece un menú para elegir un capitán para cada equipo, después los dos capitanes hacen una ronda de cuchillo, el que gana elige primero a su primer compañero después el otro y así hasta que los dos equipos tienen cinco jugadores cada uno. Y ahí termina el plugin y el admin puede empesar el mix.

El plugin es para facilitar la selección de compañeros y la ronda de cuchillo para ver quien elige primero.

Comandos de admin:
Code:

say /cortar - Todos los jugadores se tranfieren a espectadores y empieza el plugin
say /publico - Si un capitan o jugador se desconecta podes volver todo a la normalidad con este comando

Cvars:
Code:

ms_enabled 1/0 (Por defecto: 1) - Prender/Apagar el plugin
ms_min_players (Por defecto: 10) - La menor cantidad de jugadores para poder usar el plugin

Credits:
Marcelo21 - El me dió la idea
meTaLiCroSS - Usé este tutorial: https://forums.alliedmods.net/showthread.php?t=90269
shinoda - Me dió un loop para abrirle el menú al capitan contrario cuando el primero elegia a su teammate
lucas_7_94 - Algunos fixs y me dió una cvar para ver los servers que usan este plugin

Multilenguaje:
ES - Neeeeeeeeeel.-
EN - Neeeeeeeeeel.-


Saludos y espero que les guste.

The plugin is not bad... but your english is terrible.. HAHAhA... Congrats! and Go Practice! ENGLISH lol ^^

Olaizola 05-04-2011 05:35

Re: Mix Selection 1.0
 
Muy interesante y útil plugin.
Lo instalé, pero tengo un problema con él.
T capitanes y TC puede elegir sólo un jugador por equipo.
Para mí no hay otra opción del menú aparece.
Utilizan simple plugin amxmodx 1.8.1 amx_match_deluxe.


Very interesting and useful the plugin, but is am problem with the plugin.
After the first selection for each team don't working, don't apear the menu.
Use amxmodx 1.8.1 and amx_match_deluxe.

Neeeeeeeeeel.- 05-08-2011 11:55

Re: Mix Selection 1.0
 
Quote:

Originally Posted by Olaizola (Post 1462963)
Very interesting and useful the plugin, but is am problem with the plugin.
After the first selection for each team don't working, don't apear the menu.
Use amxmodx 1.8.1 and amx_match_deluxe.

This version have some bugs, i'm working in 1.1, but anyway the 1.0 works for me. Maybe amx_match_deluxe isn't compatible with MixSelection, try to desactive and use only this plugin.

DjOptimuS 05-16-2011 14:05

Re: Mix Selection 1.0
 
do you need any kind of help ?

TheArmagedon 05-19-2011 21:56

Re: Mix Selection 1.0
 
Portuguese/Brazilian Translate:

Quote:

[bp]
MS_PUBLIC = Voltou ao modo normal
MS_NOT_ENABLED = Nao ativado
MS_MIN_PLAYERS = Precisa de !team%d !ypessoas para comecar
MS_NOT_ACCES = Voce nao tem acesso a este comando

MS_SELECT_CAPITAN = O Administrador tem que escolher os capitaes
MS_SELECT_CAP_CT = Escolhe o capitao do time CT
MS_SELECT_CAP_TT = Escolhe o capitao do time TR
MS_CAPCT_SELECTED = !yselecionou o capitao dos !teamCTs
MS_CAPTT_SELECTED = !yselecionou o capitao dos !teamTRs
MS_SELECT_OTHER = !yEh o capitao do CT, escolha outro

MS_KNIFE_START = Comecou a rodada de FACA!
MS_CAPCT_WIN = !yganhou o round de faca para o time dos CTs
MS_CAPTT_WIN = !yganhou o round de faca para o time dosTRs

MS_SELECT_TEAMMATES = Escolha os times
MS_TT_SELECTED = !yselecionou o time de TR
MS_CT_SELECTED = !yselecionou o time de CT

MS_ALREADYPUBLIC = O Server ja esta publico
MS_ALREADYON = !team%s %s !yja esta ativado

MS_WELCOME = Este server usa !team%s !yfeito por !team%s
MS_END = !yA Selecao esta completa, comecara o mix

MS_NEXT_PAGE = Proximo
MS_BACK_PAGE = Voltar
MS_EXIT = Sair

DjOptimuS 05-20-2011 01:25

Re: Mix Selection 1.0
 
[ro]
MS_PUBLIC = Ne-am intors la modul public
MS_NOT_ENABLED = Nu este activat
MS_MIN_PLAYERS = Avem nevoie de !team%d !yjucatori pentru a porni
MS_NOT_ACCES = Nu ai acces la aceasta comanda

MS_SELECT_CAPITAN = Administratorul trebuie sa aleaga Capitanii
MS_SELECT_CAP_CT = Alege capitanul CT
MS_SELECT_CAP_TT = Alege capitanul T
MS_CAPCT_SELECTED = !ya fost ales capitanul !teamCTs
MS_CAPTT_SELECTED = !ya fost ales capitanul !teamTTs
MS_SELECT_OTHER = !yEste capitanul CT, alege pe altcineva

MS_KNIFE_START = Va porni runda de lame
MS_CAPCT_WIN = !ya castigat runda de lame pentru CT
MS_CAPTT_WIN = !ya castigat runda de lame pentru T

MS_SELECT_TEAMMATES = Alege-ti coechipierii
MS_TT_SELECTED = !ya fost selectat pentru echipa T
MS_CT_SELECTED = !ya fost selectat pentru echipa CT

MS_ALREADYPUBLIC = Serverul este deja public
MS_ALREADYON = !team%s %s !yfunctia este deja pornita

MS_WELCOME = Serverul foloseste !team%s !yrealizat de !team%s
MS_END = !ySelectia este completa, meciul este gata pentru a porni

MS_NEXT_PAGE = Inainte
MS_BACK_PAGE = Inapoi
MS_EXIT = Iesire

FOUTA 05-20-2011 03:22

Re: Mix Selection 1.0
 
Why not instead for the admin has to choose two captains put an option where the two captains will be chosen randomly, u can put this in the next version

Neeeeeeeeeel.- 05-22-2011 17:42

Re: Mix Selection 1.0
 
Quote:

Originally Posted by FOUTA (Post 1472398)
Why not instead for the admin has to choose two captains put an option where the two captains will be chosen randomly, u can put this in the next version

Its a great idea, thank you. I thking that i will add it but with a cvar to turn on/off randomly capitan choose. And thank you for TheArmagedon and DjOptimuS for the translations. I dont finish the new version because i'm very busy with school and some works. But i will finish it soon.

mohammadhitman 05-29-2011 03:34

Re: Mix Selection 1.0
 
hi.

i use this but when knife round end and one leader pick a player, then leader 2 click on player number not go on Terorr. i think something stop it to end.

plz cheak it.

Hunter-Digital 05-29-2011 04:00

Re: Mix Selection 1.0
 
About ML, you already have "back", "more", "exit" and some other common words in common.txt, you should use those.

mohammadhitman 05-29-2011 04:49

Re: Mix Selection 1.0
 
i said when leader of 1st team selected player , will join to teem
and then leader of 2nd team select players , will not to the team.


it,s my plugin code :
Quote:

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

#define PLUGIN "Mix"
#define VERSION "1.0"
#define AUTHOR "HitMaN"


// Vars
new CapitanCT[33], CapitanTT[33], MS_tag[20], SelectionON,
RoundKnife, CTsCount, TTsCount, g_iMaxplayers, g_iMsgMoney

// Pcvars
new cvar_tag, cvar_ms_enabled, cvar_MinPlayers

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

register_clcmd("say /mix", "sayCut")
register_clcmd("say /public", "sayPublic")

register_concmd("jointeam", "BlockFuction")

register_dictionary("Mix.txt")

register_event( "Money", "EventMoney", "b" )

RegisterHam(Ham_Spawn, "player", "fw_playerspawn", 1)
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")

register_cvar("Mix Sarter v1.0" , AUTHOR , FCVAR_SERVER | FCVAR_PROTECTED)

cvar_tag = register_cvar("ms_tag", "Mix")
cvar_ms_enabled = register_cvar("ms_enable", "1")
cvar_MinPlayers = register_cvar("ms_min_players", "10")

get_pcvar_string(cvar_tag, MS_tag, charsmax(MS_tag))

g_iMaxplayers = get_maxplayers()
g_iMsgMoney = get_user_msgid("Money")
}

public sayPublic(id)
{
if(!SelectionON)
{
ChatColor(id, "!g[%s] !y%L", MS_tag, LANG_PLAYER, "MS_ALREADYPUBLIC")
return PLUGIN_HANDLED
}

if(get_user_flags(id) & ADMIN_KICK)
{
new players[32], pnum, tempid

get_players(players, pnum)

for( new i; i<pnum; i++ )
{
tempid = players[i]
CapitanCT[tempid] = false
CapitanTT[tempid] = false
}

RoundKnife = 0
SelectionON = 0
server_cmd("sv_restart 1")

ChatColor(0, "!g[%s] !y%L", MS_tag, LANG_PLAYER, "MS_PUBLIC")
}

else
{
ChatColor(id, "!g[%s] !y%L", MS_tag, LANG_PLAYER, "MS_NOT_ACCES")
return PLUGIN_HANDLED
}

return PLUGIN_HANDLED
}

public sayCut(id)
{
if(!get_pcvar_num(cvar_ms_enabled))
{
ChatColor(id, "!g[%s] !y%s %L", MS_tag, PLUGIN, LANG_PLAYER, "MS_NOT_ENABLED")
return PLUGIN_HANDLED
}

new PlayersON

for(new i = 1; i <= g_iMaxplayers; i++)
{
if(is_user_connected(i))
PlayersON++
}

if(PlayersON < get_pcvar_num(cvar_MinPlayers))
{
ChatColor(id, "!g[%s] !y%L", MS_tag, LANG_PLAYER, "MS_MIN_PLAYERS", get_pcvar_num(cvar_MinPlayers))
return PLUGIN_HANDLED
}

if(get_user_flags(id) & ADMIN_KICK)
{
if(SelectionON)
{
ChatColor(id, "!g[%s] !y%L", MS_tag, LANG_PLAYER, "MS_ALREADYON", PLUGIN, VERSION)
return PLUGIN_HANDLED
}

new players[32], num
get_players(players, num)

new player
for(new i = 0; i < num; i++)
{
player = players[i]

user_kill(player, 1)
cs_set_user_team(player, CS_TEAM_SPECTATOR)
}

ChatColor(0, "!g[%s] !y%L", MS_tag, LANG_PLAYER, "MS_SELECT_CAPITAN")

set_task(3.0, "menuCapCT", id)
SelectionON = 1
}

else
{
ChatColor(id, "!g[%s] !y%L", MS_tag, LANG_PLAYER, "MS_NOT_ACCES")
return PLUGIN_HANDLED
}

return PLUGIN_HANDLED
}

public client_putinserver(id)
{
if(SelectionON)
set_task(5.0, "TranferSpect", id)

CapitanCT[id] = false
CapitanTT[id] = false

set_task(4.0, "WelcomeMessage", id)
}

public TranferSpect(id)
{
user_kill(id, 1)
cs_set_user_team(id, CS_TEAM_SPECTATOR)
}

public WelcomeMessage(id)
ChatColor(id, "!g[%s] !y%L", MS_tag, LANG_PLAYER, "MS_WELCOME", PLUGIN, AUTHOR)

public menuCapCT(id)
{
new data[128], players[32], pnum, tempid, szName[33], szTempid[10]

formatex(data, charsmax(data), "\y%s^n\wVersion: \r%s^n^n\w%L", PLUGIN, VERSION, LANG_PLAYER, "MS_SELECT_CAP_CT")
new Menu = menu_create(data, "Show_CapCT")

get_players(players, pnum)

for( new i; i<pnum; i++ )
{
tempid = players[i]

get_user_name(tempid, szName, charsmax(szName))
num_to_str(tempid, szTempid, charsmax(szTempid))
menu_additem(Menu, szName, szTempid, 0)
}

formatex(data, charsmax(data), "%L", LANG_PLAYER, "MS_NEXT_PAGE")
menu_setprop(Menu,MPROP_NEXTNAME, data)

formatex(data, charsmax(data), "%L", LANG_PLAYER, "MS_BACK_PAGE")
menu_setprop(Menu,MPROP_BACKNAME, data)

formatex(data, charsmax(data), "%L", LANG_PLAYER, "MS_EXIT")
menu_setprop(Menu,MPROP_EXITNAME, data)
menu_display(id, Menu, 0)
}

public Show_CapCT(id, Menu, item)
{
new data[6], iName[64]
new access, callback
menu_item_getinfo(Menu, item, access, data,5, iName, 63, callback)

new tempid = str_to_num(data)


cs_set_user_team(tempid, CS_TEAM_CT)
CapitanCT[tempid] = true
ChatColor(0, "!g[%s] !team%s %L", MS_tag, iName, LANG_PLAYER, "MS_CAPCT_SELECTED")
menuCapTT(id)

menu_destroy(Menu)
return PLUGIN_HANDLED
}

public menuCapTT(id)
{
new data[128], players[32], pnum, tempid, szName[33], szTempid[10]

formatex(data, charsmax(data), "\y%s^n\wVersion: \r%s^n^n\w%L", PLUGIN, VERSION, LANG_PLAYER, "MS_SELECT_CAP_TT")
new Menu = menu_create(data, "Show_CapTT")

get_players(players, pnum)

for( new i; i<pnum; i++ )
{
tempid = players[i]

if(!CapitanCT[tempid])
{
get_user_name(tempid, szName, charsmax(szName))
num_to_str(tempid, szTempid, charsmax(szTempid))
menu_additem(Menu, szName, szTempid, 0)
}
}

formatex(data, charsmax(data), "%L", LANG_PLAYER, "MS_NEXT_PAGE")
menu_setprop(Menu,MPROP_NEXTNAME, data)

formatex(data, charsmax(data), "%L", LANG_PLAYER, "MS_BACK_PAGE")
menu_setprop(Menu,MPROP_BACKNAME, data)

formatex(data, charsmax(data), "%L", LANG_PLAYER, "MS_EXIT")
menu_setprop(Menu,MPROP_EXITNAME, data)
menu_display(id, Menu, 0)
}

public Show_CapTT(id, Menu, item)
{
new data[6], iName[64]
new access, callback
menu_item_getinfo(Menu, item, access, data,5, iName, 63, callback)

new tempid = str_to_num(data)
new uName[33]
get_user_name(tempid, uName, charsmax(uName))

if(cs_get_user_team(tempid) == CS_TEAM_CT)
{
ChatColor(id, "!g[%s] !team%s %L", MS_tag, uName, LANG_PLAYER, "MS_SELECT_OTHER")
menuCapTT(id)
}

else
{
cs_set_user_team(tempid, CS_TEAM_T)
CapitanTT[tempid] = true
ChatColor(0, "!g[%s] !team%s %L", MS_tag, uName, LANG_PLAYER, "MS_CAPTT_SELECTED")
server_cmd("sv_restart 5")
set_task(4.0, "StartRoundKnife")
}

menu_destroy(Menu)
return PLUGIN_HANDLED
}

public StartRoundKnife()
{
ChatColor(0, "!g[%s] !y%L", MS_tag, LANG_PLAYER, "MS_KNIFE_START")
RoundKnife = 1
}

public fw_playerspawn(id)
{
if(RoundKnife && is_user_alive(id))
{
fm_strip_user_weapons(id)
give_item(id, "weapon_knife")
}
}

public EventMoney(id)
{
if(RoundKnife && is_user_alive(id))
{
set_pdata_int(id, 115, 0)
message_begin( MSG_ONE_UNRELIABLE, g_iMsgMoney, _, id )
write_long (0)
write_byte (1)
message_end()
}
}

public fw_PlayerKilled(victim, attacker, shouldgib)
{
if(RoundKnife && is_user_alive(attacker))
{
new CapitanAttacker = get_user_team(attacker)
new CapitanVictim = get_user_team(victim)

new atName[33]
get_user_name(attacker, atName, charsmax(atName))

if(CapitanAttacker == 2 && CapitanVictim == 1)
{
ChatColor(0, "!g[%s] !team%s %L", MS_tag, atName, LANG_PLAYER, "MS_CAPCT_WIN")
set_task(5.0, "SelectCT", attacker)
}

else if(CapitanAttacker == 1 && CapitanVictim == 2)
{
ChatColor(0, "!g[%s] !team%s %L", MS_tag, atName, LANG_PLAYER, "MS_CAPTT_WIN")
set_task(5.0, "SelectTT", attacker)
}

RoundKnife = 0
}
}

public SelectTT(id)
{
new data[128], players[32], pnum, tempid, szName[33], szTempid[10]

formatex(data, charsmax(data), "\y%s^n\wVersion: \r%s^n^n\w%L", PLUGIN, VERSION, LANG_PLAYER, "MS_SELECT_TEAMMATES")
new Menu = menu_create(data, "Show_PlayersTT")

get_players(players, pnum)

for( new i; i<pnum; i++ )
{
tempid = players[i]

if(get_user_team(tempid) == 3)
{
get_user_name(tempid, szName, charsmax(szName))
num_to_str(tempid, szTempid, charsmax(szTempid))
menu_additem(Menu, szName, szTempid, 0)
}
}

formatex(data, charsmax(data), "%L", LANG_PLAYER, "MS_NEXT_PAGE")
menu_setprop(Menu,MPROP_NEXTNAME, data)

formatex(data, charsmax(data), "%L", LANG_PLAYER, "MS_BACK_PAGE")
menu_setprop(Menu,MPROP_BACKNAME, data)

formatex(data, charsmax(data), "%L", LANG_PLAYER, "MS_EXIT")
menu_setprop(Menu,MPROP_EXITNAME, data)
menu_display(id, Menu, 0)
}

public Show_PlayersTT(id, Menu, item)
{
new data[6], iName[64]
new iaccess, callback
menu_item_getinfo(Menu, item, iaccess, data,5, iName, 63, callback)

new tempid = str_to_num(data)
new uName[33]
get_user_name(tempid, uName, charsmax(uName))


if(CapitanTT[id])
{
cs_set_user_team(tempid, CS_TEAM_T)
ChatColor(0, "!g[%s] !team%s %L", MS_tag, uName, LANG_PLAYER, "MS_TT_SELECTED")
TTsCount++

for(new i=1; i<=g_iMaxplayers; i++)
{
if(CapitanCT[i])
{
if((CTsCount + TTsCount) < 10)
{
SelectCT(i)
break
}
}
}
}

SelectionFinish()


menu_destroy(Menu)
return PLUGIN_HANDLED
}

public SelectCT(id)
{
new data[128], players[32], pnum, tempid, szName[33], szTempid[10]

formatex(data, charsmax(data), "\y%s^n\wVersion: \r%s^n^n\w%L", PLUGIN, VERSION, LANG_PLAYER, "MS_SELECT_TEAMMATES")
new Menu = menu_create(data, "Show_PlayersCT")

get_players(players, pnum)

for( new i; i<pnum; i++ )
{
tempid = players[i]

if(get_user_team(tempid) == 3)
{
get_user_name(tempid, szName, charsmax(szName))
num_to_str(tempid, szTempid, charsmax(szTempid))
menu_additem(Menu, szName, szTempid, 0)
}
}

formatex(data, charsmax(data), "%L", LANG_PLAYER, "MS_NEXT_PAGE")
menu_setprop(Menu,MPROP_NEXTNAME, data)

formatex(data, charsmax(data), "%L", LANG_PLAYER, "MS_BACK_PAGE")
menu_setprop(Menu,MPROP_BACKNAME, data)

formatex(data, charsmax(data), "%L", LANG_PLAYER, "MS_EXIT")
menu_setprop(Menu,MPROP_EXITNAME, data)
menu_display(id, Menu, 0)
}

public Show_PlayersCT(id, Menu, item)
{
new data[6], iName[64]
new access, callback
menu_item_getinfo(Menu, item, access, data,5, iName, 63, callback)

new tempid = str_to_num(data)
new uName[33]
get_user_name(tempid, uName, charsmax(uName))

if(CapitanCT[id])
{
cs_set_user_team(tempid, CS_TEAM_CT)
ChatColor(0, "!g[%s] !team%s %L", MS_tag, uName, LANG_PLAYER, "MS_CT_SELECTED")
CTsCount++

for(new i=1; i<=g_iMaxplayers; i++)
{
if( CapitanTT[i] )
{
if((CTsCount + TTsCount) < 10)
{
SelectCT(i)
break
}
}
}
}

SelectionFinish()


menu_destroy(Menu)
return PLUGIN_HANDLED
}

public SelectionFinish()
{
if((CTsCount + TTsCount) == 8)
{
ChatColor(0, "!g[%s] %L", MS_tag, LANG_PLAYER, "MS_END")
SelectionON = 0
server_cmd("sv_restart 5")
}
}

public BlockFuction(id)
{
if(cs_get_user_team(id) == CS_TEAM_SPECTATOR && SelectionON)
{
cs_set_user_team(id, CS_TEAM_SPECTATOR)
return PLUGIN_HANDLED
}

return PLUGIN_CONTINUE
}

stock fm_strip_user_weapons(id)
{
static ent
ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "player_weaponstrip"))
if (!pev_valid(ent)) return;

dllfunc(DLLFunc_Spawn, ent)
dllfunc(DLLFunc_Use, ent, id)
engfunc(EngFunc_RemoveEntity, ent)
}

stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4") // Green Color
replace_all(msg, 190, "!y", "^1") // Default Color
replace_all(msg, 190, "!team", "^3") // Team Color
replace_all(msg, 190, "!team2", "^0") // Team2 Color

if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang2058\\ f0\\ fs16 \n\\ par }
*/

mohammadhitman 05-29-2011 06:36

Re: Mix Selection 1.0
 
And this show in my console, After i add "debug" witch out "" plugin name in plugins.ini :
Quote:

L 05/29/2011 - 02:57:53: String formatted incorrectly - parameter 8 (total 7)
L 05/29/2011 - 02:57:53: [AMXX] Displaying debug trace (plugin "MixStarter.amxx"
)
L 05/29/2011 - 02:57:53: [AMXX] Run time error 25: parameter error
L 05/29/2011 - 02:57:53: [AMXX] [0] MixStarter.sma::ChatColor (line 495)
L 05/29/2011 - 02:57:53: [AMXX] [1] MixStarter.sma::WelcomeMessage (line 159)

mohammadhitman 05-29-2011 06:47

Re: Mix Selection 1.0
 
And one idea : this plugin commands just work for admins not all of players!

howluen 06-04-2011 00:33

Re: Mix Selection 1.0
 
When will the ver1.1 release? I can't wait it!

FOUTA 06-06-2011 08:07

Re: Mix Selection 1.0
 
Yeah when?? Really loking forward to it

Neeeeeeeeeel.- 06-09-2011 12:48

Re: Mix Selection 1.0
 
If i have time next week i will restart working on it... and i will realse it soon.

@Off
@FOUTA
Why do you think all those plugins are yours? (In your signature)

FOUTA 06-14-2011 14:54

Re: Mix Selection 1.0
 
Quote:

Originally Posted by Neeeeeeeeeel.- (Post 1484450)
If i have time next week i will restart working on it... and i will realse it soon.

@Off
@FOUTA
Why do you think all those plugins are yours? (In your signature)

You know it's just a joke right?

howluen 07-28-2011 01:06

Re: Mix Selection 1.0
 
Ah~ no more update?

search4theyeti 08-10-2011 14:30

Re: Mix Selection 1.0
 
Is there anyway to get a verison of this plugin that dose not have the knife fight in it and whoever dose not get the first pick gets the next two. The knife fight seems to mess up other mods when used together. Thanks!

zannatti 08-11-2011 13:41

Re: Mix Selection 1.0
 
Set a cvar to remove knife round.

acrimonious 03-10-2012 13:55

Re: Mix Selection 1.0
 
Quote:

Originally Posted by search4theyeti (Post 1529765)
Is there anyway to get a verison of this plugin that dose not have the knife fight in it and whoever dose not get the first pick gets the next two. The knife fight seems to mess up other mods when used together. Thanks!

it should be an easy code to do just that


All times are GMT -4. The time now is 05:50.

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