Raised This Month: $ Target: $400
 0% 

Team Name


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
tyin
Member
Join Date: Jun 2011
Location: Macedonia
Old 01-13-2013 , 22:17   Team Name
Reply With Quote #1

What should plugin do:
This is CSO Like connect announce to other users.
When new player connect on server other players will see this message
"name" connected
When new player choose team and join the server other players will see this message
"name" joined the "teamname" force
When player left the server other players will see this message
"name" has left the game

Problem with my plugin is @ client_putinserver
When new player choose a team and class other players don't see
"name" joined the "teamname" force

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public client_connect(id)
{
    new 
name[32];
    
get_user_name(idnamecharsmax(name));

    
client_print(0print_chat"%s connected"name);
}

public 
client_putinserver(id)
{
    new 
name[32], teamname[32], arg1[32];
    new 
player cmd_target(idarg12);
    
get_user_name(idnamecharsmax(name));
    
read_argv(1arg131)

    if ( 
cs_get_user_team(player) == CS_TEAM_T )
    {
        
teamname "Terrorist"
    
}
    else if ( 
cs_get_user_team(player) == CS_TEAM_CT )
    {
        
teamname "Counter-Terrorist"
    
}

    
client_print(0print_chat"%s is joining the %s force"nameteamname);
}

public 
client_disconnect(id)
{
    new 
name[32];
    
get_user_name(idnamecharsmax(name));

    
client_print0print_chat"%s has left the game"name );

tyin 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 13:44.


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