Raised This Month: $ Target: $400
 0% 

Why Does My Plugin not work?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
xsamar
New Member
Join Date: Dec 2007
Old 12-11-2007 , 19:34   Why Does My Plugin not work?
Reply With Quote #1

Hello,

I have been coding a plugin for CS 1.6 to CONSTANTLY be monitoring to balance teams. When there is 2 people more on one team than the other, it should move one player over when they die.

Here is what i have so far, and i cant seem to see whats missing:

Code:
#include <amxmodx>
#include <engine>

#define MAXPLAYERS 32

new g_MaxPlayers
new g_UserTeam[MAXPLAYERS+1]

public plugin_init() 
{
    register_plugin("Munda Team balancer","1.0.0","GGW")
 
    g_MaxPlayers = get_maxplayers()
}

public client_putinserver(id)
{
    if(is_user_hltv(id))
        return PLUGIN_CONTINUE
    else
    {
        g_UserTeam[id] = -1
        AutoAssignPlayer(id)
    }
    return PLUGIN_CONTINUE
}

stock get_team(id) return entity_get_int(id,EV_INT_team)
stock AutoAssignPlayer(id)
{
    //client_cmd(id,"autoassign")
    engclient_cmd(id,"autoassign")
    g_UserTeam[id] = -1
    
    new Name[32]
    get_user_name(id,Name,31)
}

public Event_RoundEnd()
{
    remove_task(1)
}
xsamar is offline
 



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 11:00.


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