Raised This Month: $51 Target: $400
 12% 

No Kill in Console (V1.0)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose       
Mahoney
Member
Join Date: Oct 2005
Location: Alberta
Old 09-05-2006 , 21:17   No Kill in Console (V1.0)
Reply With Quote #1

Hey! This is my first plugin!
So if it sucks please go easy on me.

NoKill V1.0

V1.0
____________
-Initial Release
-Working No Kill in Console



// Mah
Attached Files
File Type: sma Get Plugin or Get Source (NoKill.sma - 1011 views - 428 Bytes)

Last edited by Mahoney; 09-06-2006 at 18:40.
Mahoney is offline
Send a message via MSN to Mahoney
Zenith77
Veteran Member
Join Date: Aug 2005
Old 09-05-2006 , 21:23   Re: No Kill in Console (V1.0)
Reply With Quote #2

1) Indent your code.
2)
Code:
get_cvar_num("ae_allow_suicide")

You never registered the CVAR.

This would be better:
Code:
#include <amxmodx> new gpCVAREnabled; public plugin_init() {     register_plugin("NoKill", "1.0", "Mahoney");     gpCVAREnabled = register_cvar("ae_allow_suicide", "0"); } public client_kill(id) {     if (!get_pcvar_num(gpCVAREnabled))     {         console_print(id, "[NOKILL] The command 'kill' is disabled on this server.");         return PLUGIN_HANDLED;     }         return PLUGIN_CONTINUE; }
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
chowdown
Member
Join Date: Nov 2005
Old 09-05-2006 , 22:05   Re: No Kill in Console (V1.0)
Reply With Quote #3

Nice idea Might want to include it in a multi-featured plugin if you decide to make one.
__________________
woot
chowdown is offline
Send a message via AIM to chowdown
Mahoney
Member
Join Date: Oct 2005
Location: Alberta
Old 09-05-2006 , 22:10   Re: No Kill in Console (V1.0)
Reply With Quote #4

What difference does indenting do?


BTW: i did register the cvar.. look again
Mahoney is offline
Send a message via MSN to Mahoney
Gizmo
Senior Member
Join Date: May 2006
Location: Sweden
Old 09-06-2006 , 02:05   Re: No Kill in Console (V1.0)
Reply With Quote #5

Quote:
Originally Posted by Mahoney View Post
What difference does indenting do?


BTW: i did register the cvar.. look again
No you did not.
Your plugin:
Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("NoKill", "1.0", "Mahoney") } public client_kill(id) {     if(!get_cvar_num("ae_allow_suicide"))     {         console_print(id,"[NOKILL] The command 'kill' is disabled on this server.");         return PLUGIN_HANDLED;     }     return PLUGIN_CONTINUE }
__________________
Gizmo is offline
Mahoney
Member
Join Date: Oct 2005
Location: Alberta
Old 09-06-2006 , 18:39   Re: No Kill in Console (V1.0)
Reply With Quote #6

ok ok.. but still, the plugin worked without doing it your way.. jeez
i put in the indenting thingy like you did, but i dont get what indenting changes..
Mahoney is offline
Send a message via MSN to Mahoney
wonsae
Senior Member
Join Date: Jan 2006
Location: Behind you >:D
Old 09-06-2006 , 23:07   Re: No Kill in Console (V1.0)
Reply With Quote #7

Makes it look neater. And gives this plugin more of a chance to approve I'm guessing.
wonsae is offline
s p l i t
Senior Member
Join Date: May 2006
Location: US, NC
Old 09-07-2006 , 00:01   Re: No Kill in Console (V1.0)
Reply With Quote #8

Mahoney, read this thread http://forums.alliedmods.net/showthread.php?t=21956 and you'll know why indenting is important.
s p l i t is offline
Send a message via AIM to s p l i t Send a message via MSN to s p l i t
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 09-07-2006 , 14:50   Re: No Kill in Console (V1.0)
Reply With Quote #9

Already made
Deviance is offline
s p l i t
Senior Member
Join Date: May 2006
Location: US, NC
Old 09-07-2006 , 18:52   Re: No Kill in Console (V1.0)
Reply With Quote #10

Indeed it is, unapproved.
s p l i t is offline
Send a message via AIM to s p l i t Send a message via MSN to s p l i t
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 09:35.


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