Raised This Month: $ Target: $400
 0% 

How can i make a function...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zezima14
Member
Join Date: Feb 2010
Old 10-22-2010 , 14:43   How can i make a function...
Reply With Quote #1

How can i make that??

example i want register a clcmd and can type in say "/hi" and later a name:
result:

say /hi NAME

other example

say /hi Zezima14


Thanks, and excuse my little english.
Zezima14 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-22-2010 , 18:30   Re: How can i make a function...
Reply With Quote #2

You have to register only "say" and then parse the information manually.
__________________
fysiks is offline
Zezima14
Member
Join Date: Feb 2010
Old 10-22-2010 , 19:37   Re: How can i make a function...
Reply With Quote #3

i tried with this:


PHP Code:

register_clcmd
"say /hi""CmdPlayers" )

[...]

public 
CmdPlayersid )
{
     static 
szArg32 ];
     
read_argv1szArg31 )

     new 
Target cmd_targetid szArg )

     if( !
Target )
          return 
PLUGIN_HANDLED;

     
client_printTarget print_chat"Hi %s"szArg] )
     return 
PLUGIN_HANDLED;

But doesn't work...

Last edited by Zezima14; 10-22-2010 at 19:40.
Zezima14 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-22-2010 , 21:26   Re: How can i make a function...
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
You have to register only "say" and then parse the information manually.
1. read_args()
2. remove quotes
3. remove /hi
4. Use what is left over.
__________________

Last edited by fysiks; 10-22-2010 at 21:30.
fysiks 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 10:17.


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