Raised This Month: $ Target: $400
 0% 

Description keeps popping up...?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
smarttart62
Junior Member
Join Date: Jun 2006
Location: Connecticut, USA
Old 06-29-2006 , 21:29   Description keeps popping up...?
Reply With Quote #1

Well so this is my first mod, and the description keeps popping up instead of continuing the plugin...
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

public plugin_init() {
	register_plugin("TEST MOD", "1.0", "Steve")
	register_concmd("amx_nowep","nowep",ADMIN_SLAY,"<target>")
}

public nowep(id,level,cid){
	if (!cmd_access(id,level,cid,3)){
		return PLUGIN_HANDLED
	}
	
	new Arg1[24]
	read_argv(1,Arg1,23)
	new player = cmd_target(id, Arg1, 1)
	
	if (!player)
	{
		console_print(id,"Sorry, player %s could not be found or targeted!")
		return PLUGIN_HANDLED
	}else{
		strip_user_weapons(player)
	}
	
	return PLUGIN_HANDLED
}
Help would be appreciated.
Thanks,
-Steve
smarttart62 is offline
Send a message via AIM to smarttart62 Send a message via MSN to smarttart62 Send a message via Skype™ to smarttart62
smarttart62
Junior Member
Join Date: Jun 2006
Location: Connecticut, USA
Old 06-29-2006 , 21:41   Re: Description keeps popping up...?
Reply With Quote #2

Ugh. Nevermind, fixed.
-Steve
smarttart62 is offline
Send a message via AIM to smarttart62 Send a message via MSN to smarttart62 Send a message via Skype™ to smarttart62
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-30-2006 , 12:45   Re: Description keeps popping up...?
Reply With Quote #3

Just for future reference, since you're using a name, it's better to use 32 / 33 for the array size. This is because the max length of a name in HL is 32 characters, or something within 1 or 2 cells of that.

Also, you should probably make Arg1 static (use the static operator rather than new), but this really doesn't matter and will effect your script only by a marginal amount.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 07:58.


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