Raised This Month: $ Target: $400
 0% 

Need some help for register plugin and my plugin.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GarbageBox
Senior Member
Join Date: Feb 2010
Old 11-19-2010 , 23:49   Need some help for register plugin and my plugin.
Reply With Quote #1

I am using the Alka's UserRegister System v1.0
The plugin is register by console, but I want register by using say.
Here is the plugin: http://forums.alliedmods.net/showthread.php?t=59596

Second, the following plugin is make by me.
But I find the message show the maximum of kill number is 5.
Never show > 5 even I kill more then 5.
Lastly, can someone add if tow player kill number is same, show their name too.
Best Killer: Player1 & Player2 ^nKill: 3 / HS: 1 & 2

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

#define PLUGIN "Round Message"
#define VERSION "1.0"
#define AUTHOR "WS:)"
new SzAddCmd[] = "amx_pausecfg add ^"%s^""
new hudsync
new SzTeamScore[2]
new SzKills = 0, SzWho = 0, SzHs = 0

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_logevent("ERM",2,"1=Round_End") 
	register_logevent("New_Round",2,"1=Round_Start")  
	register_event( "TeamScore", "eTeamScore", "a" )
	hudsync = CreateHudSyncObj()
	server_print("^n^t%s v%s, Copyright (C) 2010 by %s^n", PLUGIN, VERSION, AUTHOR)
}

public plugin_cfg()
{
	// Put here titles of plugins which you don't want to pause
	server_cmd(SzAddCmd, "Round Message")
}

public New_Round()
{
	SzKills = 0, SzWho = 0, SzHs = 0
//	g_Killers[ id ][0] = 0
}

public eTeamScore()
{ 
	new SzTeam[2]
	read_data( 1, SzTeam, 1 )
	SzTeamScore[ (SzTeam[0]=='C') ? 1 : 0 ] = read_data(2)
}

public ERM()
{
	new SzPlayers[32], SzPnum, SzStats[8], SzBodyhits[8]
	get_players(SzPlayers, SzPnum) 
	for(new i = 0; i < SzPnum; ++i)
	{
		get_user_rstats( SzPlayers[i], SzStats, SzBodyhits)
		if ( SzStats[0] > SzKills )
		{
			SzWho = SzPlayers[i]
			SzKills = SzStats[0]
			SzHs = SzStats[2]
		}  
		if (is_user_connected(SzWho))
		{
			new SzName[32]
			get_user_name(SzWho, SzName, 31)
			set_hudmessage(10, 70, 10, 0.05, 0.50, 0, 3.0, 4.0, 1.0, 1.0, -1) 
			ShowSyncHudMsg(0, hudsync, "Best Killer: %s^nKill: %d / HS: %d^n覧覧覧覧覧覧覧覧^nTr: %d / CT: %d", SzName, SzKills, SzHs, SzTeamScore[0] , SzTeamScore[1])
		}
	}
}
__________________
You can be a SUPER coder but you Haven't to say such as "stupid, etc." words to the others
GarbageBox is offline
Altecaho
Senior Member
Join Date: Oct 2010
Old 11-20-2010 , 03:55   Re: Need some help for register plugin and my plugin.
Reply With Quote #2

1.I guess:
Code:
    register_concmd("amx_register", "register_user", ADMIN_ALL, "<mod:1[Name],2[Ip],3[SteamID]> <password>");
    register_concmd("amx_login", "login_user", ADMIN_ALL, "<password>");
    register_concmd("amx_changepassword", "change_password", ADMIN_ALL, "<old password> <new password>");
TO

Code:
    register_clcmd("/register", "register_user", ADMIN_ALL, "<mod:1[Name],2[Ip],3[SteamID]> <password>");
    register_clcmd("/login", "login_user", ADMIN_ALL, "<password>");
    register_clcmd("/cpass", "change_password", ADMIN_ALL, "<old password> <new password>");
But i'm not really sure about that ;D
Altecaho is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-20-2010 , 13:28   Re: Need some help for register plugin and my plugin.
Reply With Quote #3

Quote:
Originally Posted by Altecaho View Post
1.I guess:
Code:
    register_concmd("amx_register", "register_user", ADMIN_ALL, "<mod:1[Name],2[Ip],3[SteamID]> <password>");
    register_concmd("amx_login", "login_user", ADMIN_ALL, "<password>");
    register_concmd("amx_changepassword", "change_password", ADMIN_ALL, "<old password> <new password>");
TO

Code:
    register_clcmd("/register", "register_user", ADMIN_ALL, "<mod:1[Name],2[Ip],3[SteamID]> <password>");
    register_clcmd("/login", "login_user", ADMIN_ALL, "<password>");
    register_clcmd("/cpass", "change_password", ADMIN_ALL, "<old password> <new password>");
But i'm not really sure about that ;D
You can't just change it like that (and they are registered wrong anyways). You have to register say and filter the string which means a significant change to the code. Just use the console.
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

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:24.


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