Raised This Month: $ Target: $400
 0% 

Announce


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-19-2013 , 00:22   Re: Announce
Reply With Quote #3

Quote:
Originally Posted by aaarnas View Post
str_to_num is for converting string with number to integer.
Code:
#include <amxmodx> 

public plugin_init() 
{ 
	register_clcmd("/anno", "cmdAnno") 
	register_clcmd(".anno", "cmdAnno") 
} 

public cmdAnno(id) 
{ 
	new MessageText[100], Left[1], Right[50] 
	read_argv(1, MessageText, charsmax(MessageText)) 
	strtok(MessageText, Left, charsmax(Left), Right, charsmax(Right), ' ') 
	client_print(id, print_chat, "[prifix] %s", Right) 

	return PLUGIN_HANDLED 
}
This code is not correct either. There are no spaces in "abc123" and if there were, your code would give undesirable results. You simply need to print the variable MessageText, that's it.
__________________
fysiks 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 13:39.


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