Raised This Month: $ Target: $400
 0% 

First plugin attempt - Error 010


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-08-2009 , 23:58   Re: First plugin attempt - Error 010
Reply With Quote #6

Quote:
Originally Posted by tomato_love View Post
Thank you very much! I think that did it! But still not quite right - when i type something and add the 'yo' my name shows up like its supposed to, but no text. Also when not using the "yo" no name or text appears at all. Should i unhook the say? or should the PLUGIN_HANDLED be something different?

or should:
Code:
    if( (contain(said, "yo") != -1) && !(contain(said, " yo") != -1) ) {
    client_print(0, print_chat, name, said);
maybe instead of using said, there is something else that will print the message?
When using strings in a format fashion, use the below within your string to represent the string variable then place the actual variables in the respective order.
%s - string
%d - interger
%f - float

ie.
new iNumber = 10
new szTest[] = "hello"
new Float:fNum = 0.50

To print these in a string.
client_print( 0 , print_chat , "%s please give me %d dollars. i will give you %f cents." , szTest , iNumber , fNum )

The above will result in "hello please give me 10 dollars. i will give you 0.50 cents."

PHP Code:
if( (contain(said"yo") != -1) && !(contain(said" yo") != -1) ) {
    
client_print(0print_chat"%s said %s" name said 
__________________

Last edited by Bugsy; 02-09-2009 at 00:04.
Bugsy 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 17:01.


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