Raised This Month: $ Target: $400
 0% 

[Resolved] read_argv and contain help plz!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
stupok
Veteran Member
Join Date: Feb 2006
Old 12-07-2006 , 00:44   Re: read_argv and contain help plz!
Reply With Quote #8

Tested and works. There ya go:

Code:
public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("say", "hook_say") } public hook_say(id) {     new arg1[37], origin[3], name[32]         read_args(arg1, 36) //register everything after "say" as a string     remove_quotes(arg1) //remove the quotes to make working with arg1 easier     //if /goto is not said, return plugin_continue to allow regular chatting     if(contain(arg1, "/goto") == -1) return PLUGIN_CONTINUE         new player = cmd_target(id, arg1[6])         if(!player)     {         client_print(id, print_chat, "[CSM] Client with this name not found.", name)         return PLUGIN_HANDLED     }         get_user_origin(player, origin, 0)     set_user_origin(id, origin)     get_user_name(player, name, 31)         client_print(id, print_chat, "[CSM] You have gone to %s's position", name)         return PLUGIN_CONTINUE }

Last edited by stupok; 12-07-2006 at 00:51.
stupok is offline
 



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 06:59.


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