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(id, name, charsmax(name));
client_print(0, print_chat, "%s connected", name);
}
public client_putinserver(id)
{
new name[32], teamname[32], arg1[32];
new player = cmd_target(id, arg1, 2);
get_user_name(id, name, charsmax(name));
read_argv(1, arg1, 31)
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(0, print_chat, "%s is joining the %s force", name, teamname);
}
public client_disconnect(id)
{
new name[32];
get_user_name(id, name, charsmax(name));
client_print( 0, print_chat, "%s has left the game", name );
}