Raised This Month: $ Target: $400
 0% 

Kicking help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 05-16-2006 , 22:28   Kicking help
Reply With Quote #1

can some one throw me a bone (a code snipet)

Code:
public cmdkick(id, level, cid) {     if (!cmd_access(id, level, cid, 2))         return PLUGIN_CONTINUE
now, i just need the finished code in the most basic form to kick someone.
__________________
Don't ever place an order with Vee Servers. This is why.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
KoST
Senior Member
Join Date: Jul 2005
Old 05-16-2006 , 22:32  
Reply With Quote #2

Code:
    new userid = get_user_userid(id)     server_cmd("kick #%d",userid) }
__________________
KoST is offline
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 05-16-2006 , 22:35  
Reply With Quote #3

no no no... i mean, i am creating my own amx_kick thing... it does a different option, i was reading admincmd.sma... but i was wondering if there was a simpler way to make an amx_kick thing.
__________________
Don't ever place an order with Vee Servers. This is why.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
KoST
Senior Member
Join Date: Jul 2005
Old 05-16-2006 , 22:41  
Reply With Quote #4

i updated my post, this is the easiest way to kick sb., i guess.
__________________
KoST is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 05-16-2006 , 22:46  
Reply With Quote #5

that would kick whoever used the command.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 05-16-2006 , 22:49  
Reply With Quote #6

can you help me then?
__________________
Don't ever place an order with Vee Servers. This is why.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 05-16-2006 , 22:51  
Reply With Quote #7

if you use 'your_cmd' followed by a person this is how you kick them.
Code:
new arg[36] read_argv(1 , arg , 35) new target = cmd_target(id , arg , 11) if(!target)     return PLUGIN_HANDLED new userid = get_user_userid(target) server_cmd("kick #%d",userid)
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 05-16-2006 , 23:00  
Reply With Quote #8

im a newb, but the code is pulling up a lot of errors... im not sure how, or what i should do to fix it.
__________________
Don't ever place an order with Vee Servers. This is why.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
KoST
Senior Member
Join Date: Jul 2005
Old 05-16-2006 , 23:05  
Reply With Quote #9

Code:
public cmdKick(id, level, cid) {     if (!cmd_access(id, level, cid, 2))         return PLUGIN_HANDLED     new arg[32]     read_argv(1, arg, 31)     new player = cmd_target(id, arg, 1)     if (!player)         return PLUGIN_HANDLED     new userid2     userid2 = get_user_userid(player)         server_cmd("kick #%d", userid2)     return PLUGIN_HANDLED }
__________________
KoST 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 16:27.


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