Raised This Month: $ Target: $400
 0% 

Can anyone help me on this ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vids
Junior Member
Join Date: Jun 2006
Old 06-19-2006 , 14:11   Can anyone help me on this ?
Reply With Quote #1

This is for DOD HL1
Can anyone help me on this scripts? Is there anything wrong with it ? It's seems don't work even deaths reach to 10 . Maybe I'm too nub to understand where did I go wrong.


==================================

#include <amxmodx>


public plugin_init() {
// ..
register_plugin("deaths_Kicker","1.0","Shadow Leader(123)")
register_event("ResetHUD","newRound","b")
register_cvar("deaths_limit","10")
}

public newRound(id) {

if(get_user_deaths(id) >= get_cvar_num("deaths_limit")) {
server_cmd("banid #%d 5",get_user_userid(id))
server_cmd("kick #%d ^"Reached Death Limits (%d) - Banned 5 min^"",get_user_userid(id),get_user_deaths(id ))
}

return PLUGIN_HANDLED
}

=================

Thank you in advance
vids is offline
Z@C
Member
Join Date: May 2006
Location: Moscow, Russia
Old 06-19-2006 , 14:50  
Reply With Quote #2

server_cmd(kick ..... change to server_cmd(ban .....
and
server_cmd(ban ..... change to server_cmd(kick .....

Reached Death Limits (%d),get_user_deaths(id) change to
Reached Death Limits (%d),get_cvar_num("deaths_limit")

server_cmd("banid #%d 5",get_user_userid(id)) change to
new authid[32]
get_user_authid(id, authid, 31)
server_cmd("banid %d 5",authid)
__________________
HLDS protocol 48 (CS 1.1.2.6 build 4883 on FreeBSD 9.0)
AMXX v1.8.1.3746 | METAMOD v1.19p32 | DProto 0.9.87
Web: Nginx 1.0.10 (build 1.1), Apache 2.2.21, PHP 5.3.8, MySQL 5.5.17
Z@C is offline
Send a message via ICQ to Z@C
vids
Junior Member
Join Date: Jun 2006
Old 06-20-2006 , 03:30  
Reply With Quote #3

Hi there. thanks for the reply, I've tried to change it as mentioned.
But no luck, it won't kick when reach 10 deaths. Did I make anymore mistakes ?

Thanks in advance

============================
#include <amxmodx>


public plugin_init() {
// ..
register_plugin("deaths_Kicker","1.0","Shadow Leader(123)")
register_event("ResetHUD","newRound","b")
register_cvar("deaths_limit","10")
}

public newRound(id) {

if(get_user_deaths(id) >= get_cvar_num("deaths_limit")) {
server_cmd("kick #%d ^"Reached Death Limits (%d)^"",get_cvar_num("deaths_limit"),get_user _deaths(id))
new authid[32]
get_user_authid(id, authid, 31)
server_cmd("banid %d 5",authid)

}

return PLUGIN_HANDLED
}

=============================
vids is offline
Z@C
Member
Join Date: May 2006
Location: Moscow, Russia
Old 06-20-2006 , 04:11  
Reply With Quote #4

you have 1 line not right
Code:
#include <amxmodx> public plugin_init() { register_plugin("deaths_Kicker","1.0","ShadowLeader(123)") register_event("ResetHUD","newRound","b") register_cvar("deaths_limit","10") } public newRound(id) { new authid[32] get_user_authid(id, authid, 31) if(get_user_deaths(id) >= get_cvar_num("deaths_limit")) { server_cmd("kick #%d ^"Reached Death Limits (%d)^"",get_user_userid(id),get_cvar_num("deaths_limit")) server_cmd("banid %d 5",authid) } return PLUGIN_HANDLED }
this is right code,write all
__________________
HLDS protocol 48 (CS 1.1.2.6 build 4883 on FreeBSD 9.0)
AMXX v1.8.1.3746 | METAMOD v1.19p32 | DProto 0.9.87
Web: Nginx 1.0.10 (build 1.1), Apache 2.2.21, PHP 5.3.8, MySQL 5.5.17
Z@C is offline
Send a message via ICQ to Z@C
vids
Junior Member
Join Date: Jun 2006
Old 06-20-2006 , 04:37  
Reply With Quote #5

Thanks Again.
But still no luck. It did not auto kick or auto banned. Script compile correctly and run perfectly....

Thank you.
vids is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-20-2006 , 05:46  
Reply With Quote #6

try this:
Code:
#include <amxmodx> #include <dodfun> public plugin_init() { register_plugin("deaths_Kicker","1.0","ShadowLeader(123)") register_event("ResetHUD","newRound","b") register_cvar("deaths_limit","10") } public newRound(id) {   new authid[32]   get_user_authid(id, authid, 31)   if(dod_get_pl_deaths(id) >= get_cvar_num("deaths_limit")) {     server_cmd("kick #%d ^"Reached Death Limits (%d)^"",get_user_userid(id),get_cvar_num("deaths_limit"))     server_cmd("banid %s 5",authid) // changed %d to %s because authid is a string   } }
You must download/enable the dodfun module.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Z@C
Member
Join Date: May 2006
Location: Moscow, Russia
Old 06-20-2006 , 07:44  
Reply With Quote #7

Quote:
Originally Posted by v3x
try this:
Code:
server_cmd("banid %s 5",authid) // changed %d to %s because authid is a string
You must download/enable the dodfun module.
you right i notice this (%d to %s)
__________________
HLDS protocol 48 (CS 1.1.2.6 build 4883 on FreeBSD 9.0)
AMXX v1.8.1.3746 | METAMOD v1.19p32 | DProto 0.9.87
Web: Nginx 1.0.10 (build 1.1), Apache 2.2.21, PHP 5.3.8, MySQL 5.5.17
Z@C is offline
Send a message via ICQ to Z@C
vids
Junior Member
Join Date: Jun 2006
Old 06-20-2006 , 09:41  
Reply With Quote #8

Thank you for the Reply.


I've tried both: By v3x
if(dod_get_pl_deaths(id) >= get_cvar_num("deaths_limit"))

and by: Z@C
if(get_user_deaths(id) >= get_cvar_num("deaths_limit"))

Both scripts I have changed the "%s"
and enable/disable dodfun (tried both)

But it seems luck not on my side. It still won't kick when reach 10 deaths.

any further suggestion to help?

Thank you.
vids is offline
Z@C
Member
Join Date: May 2006
Location: Moscow, Russia
Old 06-28-2006 , 23:38   Re: Can anyone help me on this ?
Reply With Quote #9

try this:
#include <amxmodx>
#include <dodfun>

public plugin_init() {
register_plugin("deaths_Kicker","1.0","Shadow Leader(123)")
register_event("ResetHUD","newRound","a") // flag "b" change to "a"
register_cvar("deaths_limit","10")
}

public newRound(id) {
new authid[32],reason[64]
get_user_authid(id, authid, 31)
if(dod_get_pl_deaths(id) >= get_cvar_num("deaths_limit")) {
format(reason,63,"Reached Death Limits (%s)",get_cvar_num("deaths_limit")) // i add this
server_cmd("kick #%d %s,get_user_userid(id),reason)
server_cmd("banid %s 5",authid) // changed %d to %s because authid is a string
}
}
__________________
HLDS protocol 48 (CS 1.1.2.6 build 4883 on FreeBSD 9.0)
AMXX v1.8.1.3746 | METAMOD v1.19p32 | DProto 0.9.87
Web: Nginx 1.0.10 (build 1.1), Apache 2.2.21, PHP 5.3.8, MySQL 5.5.17
Z@C is offline
Send a message via ICQ to Z@C
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 16:23.


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