Raised This Month: $ Target: $400
 0% 

Clan_tag Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Corno
New Member
Join Date: Mar 2010
Old 06-15-2010 , 12:19   Clan_tag Problem
Reply With Quote #1

Hi all,i have few problems,with plugin.


#include <amxmodx>

#define PLUGIN "Clan Tag on Respawn"
#define VERSION "0.1"
#define AUTHOR "Severnadze"

#define MAXPLAYERS 32
#define TS 1
#define CTS 2

new bool:g_reset[MAXPLAYERS + 1]
new g_checkname[MAXPLAYERS + 1]

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("ResetHUD", "event_ResetHUD", "be")
register_clcmd("say /na", "event_ResetHUD")
}

public client_putinserver(id)
{
g_reset[id] = true

new name[32]
g_checkname[id] = get_user_name(id, name, charsmax(name))
//g_checkname[id] = get_user_info(id, "name", name, charsmax(name))
}

public event_ResetHUD(id)
{
if (g_reset[id])
{
g_reset[id] = false

new name[32]
g_checkname[id] = get_user_name(id, name, charsmax(name))
//g_checkname[id] = get_user_info(id, "name", name, charsmax(name))

set_task(1.0, "checknames", id)
}
}

public checknames(id)
{
if (get_user_team(id) == TS)
client_cmd(id, "name ^"a.%s^"", g_checkname[id])

if (get_user_team(id) == CTS)
client_cmd(id, "name ^"b.%s^"", g_checkname[id])
}




I need the client nick saved before the change it self...

It is like in gather-network..

I need help !


Sorry for my English ;]
Corno is offline
Amonel
Senior Member
Join Date: May 2009
Old 06-15-2010 , 14:36   Re: Clan_tag Problem
Reply With Quote #2

amx_nick or force update on scoreboard :-?
Amonel is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 06-15-2010 , 14:39   Re: Clan_tag Problem
Reply With Quote #3

What do you want to do with this??
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Corno
New Member
Join Date: Mar 2010
Old 06-16-2010 , 01:24   Re: Clan_tag Problem
Reply With Quote #4

Quote:
Originally Posted by #8 SickneSS View Post
What do you want to do with this??


Look that is foto : http://www.ipix.lt/images/93860666.jpg


I need,for all the clan tags assigned ..


CT'S Tag : a.


T'S Tag : b.
Corno is offline
FlyingHorse
Senior Member
Join Date: Apr 2010
Location: Under your bed.
Old 06-16-2010 , 01:47   Re: Clan_tag Problem
Reply With Quote #5

search next time.. Heres the scoreboard tag http://forums.alliedmods.net/showthread.php?p=1047869
FlyingHorse is offline
Send a message via Skype™ to FlyingHorse
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-16-2010 , 02:07   Re: Clan_tag Problem
Reply With Quote #6

Try using this:

http://forums.alliedmods.net/showpos...97&postcount=7

You will need to change the tags (obviously).

Quote:
Originally Posted by FlyingHorse View Post
search next time.. Heres the scoreboard tag http://forums.alliedmods.net/showthread.php?p=1047869
Wow. . . That has absolutely nothing to do with this thread.
__________________
fysiks is offline
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 06-15-2010 , 20:14   Re: Clan_tag Problem
Reply With Quote #7

I have no idea what you are trying to do, so I just optimized the last bit so that it would actually work...
PHP Code:
#include <amxmodx>
#include <cstrike>
 
#define PLUGIN "Clan Tag on Respawn"
#define VERSION "0.1"
#define AUTHOR "Severnadze"
 
#define MAXPLAYERS 32
#define TS 1
#define CTS 2
 
new bool:g_reset[MAXPLAYERS 1]
new 
g_checkname[MAXPLAYERS 1]
 
public 
plugin_init()
{
   
register_plugin(PLUGINVERSIONAUTHOR)
   
register_event("ResetHUD""event_ResetHUD""be")
   
register_clcmd("say /na""event_ResetHUD")
}
 
public 
client_putinserver(id)
{
   
g_reset[id] = true
 
   
new name[32]
   
g_checkname[id] = get_user_name(idnamecharsmax(name))
   
//g_checkname[id] = get_user_info(id, "name", name, charsmax(name))
}
 
public 
event_ResetHUD(id)
{
   if (
g_reset[id])
   {
     
g_reset[id] = false
 
     
new name[32]
 
     
g_checkname[id] = get_user_name(idnamecharsmax(name))
     
//g_checkname[id] = get_user_info(id, "name", name, charsmax(name))
     
set_task(1.0"checknames"id)
   }
}
 
public 
checknames(id)
{
   if (
cs_get_user_team(id) == CsTeams:TS)
      
client_cmd(id"name ^"a.%s^""g_checkname[id])
   else if (
cs_get_user_team(id) == CsTeams:CTS)
      
client_cmd(id"name ^"b.%s^""g_checkname[id])

RedRobster is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-15-2010 , 21:30   Re: Clan_tag Problem
Reply With Quote #8

FYI
get_user_name() has no return value.
g_checkname[id] is not a string.
__________________

Last edited by fysiks; 06-15-2010 at 21:32.
fysiks is offline
Corno
New Member
Join Date: Mar 2010
Old 06-16-2010 , 02:23   Re: Clan_tag Problem
Reply With Quote #9

fysiks,thnks ;]
Corno is offline
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 14:54.


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