Raised This Month: $ Target: $400
 0% 

Kicking in AMX


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tekHneEk
New Member
Join Date: Sep 2004
Location: harlingen, tx
Old 09-24-2004 , 02:58   Kicking in AMX
Reply With Quote #1

okay I am BRAND new to AMX and have no previous coding experience as far as making plugins. I want to write a plugin.. preferably by myself that will kick people if they have 0 kills at the end of the round but have no idea how to do so, please don't write it for me just point me to a tuturial so I can learn, or tell me the command or help me with syntax anything, I am not a newb programmer, but new to AMX scripting I will pick it up fast with a little help, thanks alot.

-Bryan

on second thought I'm sure this is like 5-10 lines of code if even that much, so if you did write it out I wouldn't hate you, I would probably learn alot from it, just a thought.
tekHneEk is offline
Send a message via AIM to tekHneEk
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 09-24-2004 , 03:15  
Reply With Quote #2

Sorry but this is at the beginning of a new round but it's still usable, right?
Code:
#include <amxmodx> // load functions from amxmodx.inc #inlcude <amxmisc> // some other functions from amxmisc.inc public plugin_init() { // declare the main of the plugin  register_plugin("Kick on 0","1","tekHneEk") // define the plugin as "Name" "version" and "author"  register_event("ResetHUD","docheck","b") // whenever someone spawns (usually on new round) execute docheck function and b flag sends it to the single player } // close the main function public docheck(id) { // make the function that is executed on new round and get their id  new frags = get_user_frags(id) // put their kills in the variable "frags"  if(frags == 0) { // if their kills are 0 then do this next part   client_cmd(id,"disconnect") // disconnect them from the server  } // end the if function  return PLUGIN_HANDLED // finish this function } // close this function
Im sorry that i written this for you but i added some pointers in it so you can understand how amxx scripting works but here's an example and i hope this helps
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
tekHneEk
New Member
Join Date: Sep 2004
Location: harlingen, tx
Old 09-24-2004 , 03:22  
Reply With Quote #3

sweet man thanks alot I plan on becoming very good at this, and writing several plugins. thanks alot.
tekHneEk is offline
Send a message via AIM to tekHneEk
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 17:15.


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