No Switch Teams

Programarea si configurarea jocului Counter-Strike!

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
x3MeNToX
Membru, skill 0
Membru, skill 0
Posts: 6
Joined: 05 Dec 2013, 14:37
Detinator Steam: Nu
CS Status: OwNeR - Server
Detinator server CS: iFree.xTremeZone.Ro
Contact:

21 Dec 2013, 13:00

Imi cer scuze daca nu am postat la categoria potrivita dar am nevoie de ajutor!
Am un server furien si vreau sa nu mai pot sa intru in alta echipa apasand "M"
Vreau sa scrie ceva de genu' : "Pe acest server nu este permisa schimbarea echipelor" cand apas pe "M"

Va multumesc anticipat si inca o data imi cer scuze pentru categorie!
Rapidserver
User avatar
SaLLeR ;ddd
Membru, skill +4
Membru, skill +4
Posts: 1544
Joined: 22 Jul 2011, 23:08
Detinator Steam: Nu
CS Status: Nu mai joc.
Detinator server CS: Mai demult.
SteamID: Inexistent.
Reputatie: Restrictie moderator!
Membru Club eXtreamCS (1 luna)
Location: Cum ajung acasa?
Has thanked: 119 times
Been thanked: 164 times

31 Dec 2013, 00:03

User avatar
Doctor whO? <3
Membru, skill +2
Membru, skill +2
Posts: 881
Joined: 21 Jun 2013, 11:40
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Reputatie: Fost Membru Club eXtreamCS (doua luni)
Has thanked: 99 times
Been thanked: 18 times
Contact:

11 Jun 2014, 13:07

| Afiseaza codul
#include <amxmodx>

#define PLUGIN  "Block Chooseteam"
#define AUTHOR  "Alucard"
#define VERSION "0.0.1"

new p_BlockChooseTeam

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    
    p_BlockChooseTeam = register_cvar("bc_enable", "1");
    
    register_clcmd("chooseteam", "HookCmdChooseTeam");
}

public HookCmdChooseTeam(iClient)
{
    return get_pcvar_num(p_BlockChooseTeam) ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
}
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

15 Jun 2014, 20:14

| Afiseaza codul
#include <amxmodx>

#define PLUGIN  "Block Chooseteam"
#define AUTHOR  "Alucard"
#define VERSION "0.0.1"

new p_BlockChooseTeam

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    
    p_BlockChooseTeam = register_cvar("bc_enable", "1");
    
    register_clcmd("chooseteam", "HookCmdChooseTeam");
}

public HookCmdChooseTeam(iClient)
{
    return get_pcvar_num(p_BlockChooseTeam) ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
    client_print(id,print_center,"Pe acest server nu este permisa schimbarea echipelor");
}
User avatar
CryWolf
Fost moderator
Fost moderator
Posts: 6343
Joined: 07 Aug 2008, 15:33
Detinator Steam: Da
Reputatie: Administrator
Fost Scripter
Detinator ZM.eXtream.Ro
Fost manager CS.eXtream.Ro
Fost manager CSGO.eXtream.Ro
Fost manager global
Location: Botosani
Has thanked: 185 times
Been thanked: 821 times
Contact:

15 Jun 2014, 21:34

scosmynnnn wrote:
| Afiseaza codul
#include <amxmodx>

#define PLUGIN  "Block Chooseteam"
#define AUTHOR  "Alucard"
#define VERSION "0.0.1"

new p_BlockChooseTeam

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    
    p_BlockChooseTeam = register_cvar("bc_enable", "1");
    
    register_clcmd("chooseteam", "HookCmdChooseTeam");
}

public HookCmdChooseTeam(iClient)
{
    return get_pcvar_num(p_BlockChooseTeam) ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
    client_print(id,print_center,"Pe acest server nu este permisa schimbarea echipelor");
}
Cum sa adaugi client_print dupa return ? iti va da unrecheable code odata ce ai dat return pluginul automat se opreste sau continua doar daca este 0.
=))

Corect ar fi

Code: Select all

#include <amxmodx>

#define PLUGIN  "Block Chooseteam"
#define AUTHOR  "Alucard"
#define VERSION "0.0.1"

new p_BlockChooseTeam

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    
    p_BlockChooseTeam = register_cvar("bc_enable", "1");
    
    register_clcmd("chooseteam", "HookCmdChooseTeam");
}

public HookCmdChooseTeam(iClient)
{
    if ( get_pcvar_num ( p_BlockChooseTeam ) )
    {
        client_print ( iClient, print_center, "Pe acest server nu este permisa schimbarea echipelor" );
        return 1;
    }
    return 0;
} 
De vanzare Zombie Sparkle++- O imbunatatita versiunde de ZP
MetaMod Enhanced v1.0.0 - O versiune de metamod fara meta list si Updatata in ultimul SDK
Vrei un CS fara binduri, slowhack, si curat din SteamPipe? Counter-Strike UPDATE 9.March.2017
User avatar
HamletEagle
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 750
Joined: 21 Sep 2013, 14:05
Detinator Steam: Da
CS Status: Inactiv cateva zile.
SteamID: privat
Reputatie: Scripter eXtreamCS.com
Fost Moderator ajutator
Has thanked: 19 times
Been thanked: 86 times

20 Jun 2014, 19:43

Adaugati si jointeam,e aceeasi comanda ca si chooseteam in mare. Sau ati putea altera offset-ul 125 ( m_bHasChangeTeamThisRound ) in plugin_init si in new round , setandu-i bitii 1<<8,astfel engineul va crede ca si-au schimbat deja echipa si nu ii va mai lasa.

Atentie, tinand cont ca e un offset legat de playeri pe linux valoarea e cea de pe windows + 5. Este integer, se poate folosi set_pdata_int din fakemeta.
Daca vreti ajutorul meu, nu dati bump la topic, fara intrebari de genu "cat mai dureaza/mai astept mult?".
Post Reply

Return to “CStrike”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests