Raised This Month: $32 Target: $400
 8% 

server_cmd (need help)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pcfdo.bat
Junior Member
Join Date: Dec 2006
Old 01-05-2008 , 14:38   server_cmd (need help)
Reply With Quote #1

Hi all

I need a little help to convert a plugin to use amxbans, but i cant seem to catch the right commands.
So i would be happy if someone could help me with this code :

server_cmd("kick #%d Sorry but you have a bad score", userid)

How can i change this line to ban a person for 1440 minutes.

Regards
pcfdo.bat
__________________
pcfdo.bat is offline
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 01-05-2008 , 15:25   Re: server_cmd (need help)
Reply With Quote #2

PHP Code:

new ip[32]

get_user_ip(idip,31)

server_cmd("kick #%d ^"Sorry but you have a bad score^";wait;addip 1440  ^"%s^";wait;writeip"useridminutesip
or with id...
__________________


I hate Spammers....
vl@d is offline
pcfdo.bat
Junior Member
Join Date: Dec 2006
Old 01-05-2008 , 15:41   Re: server_cmd (need help)
Reply With Quote #3

ehhh...

Sorry, but i cant understand where php and the ip lines comes in to the picture here..lol Is it just me or should the command not be something like amx_ban instead of kick?

Regards
pcfdo.bat
__________________
pcfdo.bat is offline
lolhax44
BANNED
Join Date: Jan 2008
Old 01-05-2008 , 16:28   Re: server_cmd (need help)
Reply With Quote #4

That is gonna ban them as soon as they join rofl.
lolhax44 is offline
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 01-05-2008 , 16:51   Re: server_cmd (need help)
Reply With Quote #5

Code:
server_cmd("amx_ban 1440 #%i ^"Sorry but you have a bad score^"", userid);
This assumes AMXBans supports banning by UserID - the documentation that I read is unclear.

@lolhax44
With respect, you don't have a clue.
Lee is offline
lolhax44
BANNED
Join Date: Jan 2008
Old 01-05-2008 , 18:00   Re: server_cmd (need help)
Reply With Quote #6

Quote:
Originally Posted by Lee View Post
Code:
server_cmd("amx_ban 1440 #%i ^"Sorry but you have a bad score^"", userid);

This assumes AMXBans supports banning by UserID - the documentation that I read is unclear.

@lolhax44
With respect, you do have a clue.
And Yes i do.
lolhax44 is offline
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 01-05-2008 , 18:34   Re: server_cmd (need help)
Reply With Quote #7

You think that the above code in global scope will be executed when someone joins. It won't even compile - and for good reason - the request calls for a single line of existing code to be replaced.

Last edited by Lee; 01-05-2008 at 18:37.
Lee is offline
lolhax44
BANNED
Join Date: Jan 2008
Old 01-06-2008 , 06:30   Re: server_cmd (need help)
Reply With Quote #8

ohhh soz didn't Realise

I thought it was gonna be a Self-impelement Code
lolhax44 is offline
taheri6
Member
Join Date: Mar 2006
Old 01-07-2008 , 00:52   Re: server_cmd (need help)
Reply With Quote #9

Nope, thats just one line of the plugin that you would need to write, or to change in an existing plugin to do what you want, by itself that one line wont do what you want, its just a small piece in a larger puzzle
__________________
http://www.yaur.com -=[Yaur]=- Clan Website
taheri6 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 23:53.


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