Raised This Month: $ Target: $400
 0% 

[HELP] Help with contain..


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-25-2016 , 16:32   Re: [HELP] Help with contain..
Reply With Quote #2

From the string.inc const ( in amxmodx.inc )

/* Checks if source contains string. On success function
* returns position in source, on failure returns -1. */
native contain(const source[],const string[]);

Means that:

new A[10] = "BlahBlah"
new B[10] = "LAHLAH"

//contain(A, B) will return -1

// So if -1 != -1

if(contain(A, B)) != -1)
{
//Something will happen if A and B match.
}


Please correct me if I'm wrong ^_^

Last edited by eyal282; 08-25-2016 at 16:40.
eyal282 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 03:05.


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