AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Clan_tag Problem (https://forums.alliedmods.net/showthread.php?t=129667)

Corno 06-15-2010 12:19

Clan_tag Problem
 
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 ;]

Amonel 06-15-2010 14:36

Re: Clan_tag Problem
 
amx_nick or force update on scoreboard :-?

#8 SickneSS 06-15-2010 14:39

Re: Clan_tag Problem
 
What do you want to do with this??

RedRobster 06-15-2010 20:14

Re: Clan_tag Problem
 
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])



fysiks 06-15-2010 21:30

Re: Clan_tag Problem
 
FYI
get_user_name() has no return value.
g_checkname[id] is not a string.

Corno 06-16-2010 01:24

Re: Clan_tag Problem
 
Quote:

Originally Posted by #8 SickneSS (Post 1209667)
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.

FlyingHorse 06-16-2010 01:47

Re: Clan_tag Problem
 
search next time.. Heres the scoreboard tag http://forums.alliedmods.net/showthread.php?p=1047869

fysiks 06-16-2010 02:07

Re: Clan_tag Problem
 
Try using this:

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

You will need to change the tags (obviously).

Quote:

Originally Posted by FlyingHorse (Post 1210139)
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.

Corno 06-16-2010 02:23

Re: Clan_tag Problem
 
fysiks,thnks ;]


All times are GMT -4. The time now is 14:54.

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