Raised This Month: $ Target: $400
 0% 

A tiny question#


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
amnezia
Member
Join Date: Jul 2014
Old 11-09-2014 , 01:44   A tiny question#
Reply With Quote #1

well guys, i'm using sylvesters Autoteam join plugin saw it somewhere in a post.

Code:
Code:
#include <amxmodx>
#include <hamsandwich>

#define TID_HIDE_MENU 5323568

new bool:g_autojoin_team[33]
new bool:g_autojoin_class[33]
new g_vgui_menus[33][5]

public plugin_init(){
    register_plugin("autojoin", "1.0", "Sylwester")
    register_message(get_user_msgid("ShowMenu"), "message_show_menu")
}


public client_connect(id){
    get_user_info(id, "_vgui_menus", g_vgui_menus[id], 4)
    set_user_info(id, "_vgui_menus", "0")
    g_autojoin_team[id] = true
}


public message_show_menu(msgid, dest, id) {
    new tmp[32]
    get_msg_arg_string(4, tmp, 31)
    if(contain(tmp, "#Team_Select")==0){
        if(!g_autojoin_team[id])
            return PLUGIN_CONTINUE
        g_autojoin_team[id] = false
        g_autojoin_class[id] = true
        client_cmd(id, "jointeam 5")
        return PLUGIN_HANDLED
    }
    if(contain(tmp, "#CT_Select")==0 || contain(tmp, "#Terrorist_Select")==0){
        if(!g_autojoin_class[id])
            return PLUGIN_CONTINUE
        if(!task_exists(TID_HIDE_MENU+id))
            set_task(0.1, "hide_menu", TID_HIDE_MENU+id)
        g_autojoin_class[id] = false
        client_cmd(id, "joinclass 5")
        set_user_info(id, "_vgui_menus", g_vgui_menus[id])
        return PLUGIN_HANDLED
    }
    return PLUGIN_CONTINUE
}

public hide_menu(tid){
    new id = tid-TID_HIDE_MENU
    show_menu(id, 0, "^n", 1)
    if(!is_user_alive(id))
        ExecuteHam(Ham_CS_RoundRespawn, id)
}  
it works perfectly fine, but 1 little problem im running a zombie plague server.
which means when they connect they connect as a human..
how can i make it that whoever joins the server they will be a zombie.
untill the next round?
amnezia is offline
Old 11-09-2014, 02:09
zmd94
This message has been deleted by zmd94.
Old 11-09-2014, 03:31
Natsheh
This message has been deleted by Natsheh.
Reply



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 17:32.


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