Raised This Month: $ Target: $400
 0% 

Teach me how to make a custom item [TSRP] =]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drak
Veteran Member
Join Date: Jul 2005
Old 06-10-2006 , 21:27  
Reply With Quote #1

It looks like you forgot to add includes and messed up on some of your indents or something.
Code:
#include <amxmodx> #include <amxmisc> //1: a server command in the init function public plugin_init() {    register_srvcmd("item_hit","item_hit"); } //2: a public function for the item public item_hit() { //3: reading arg to get id    new arg[32];    read_argv(1, arg, 31);    new id = str_to_num(arg);    new name[32];    get_user_name(id, name, 31); //4: printing it out (0 = to everyone, %s = their name)    client_print(0,print_chat,"[Hit] %s is going to do a Hit!",name);    return PLUGIN_HANDLED; }
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
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:56.


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