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
Des12
Senior Member
Join Date: Jan 2005
Old 06-10-2006 , 20:16  
Reply With Quote #1

5 parts:

Code:
//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; }

5: In the sql, make an item, and have the command be:
item_hit <id>
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
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