Raised This Month: $ Target: $400
 0% 

If equali - some text..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 06-04-2013 , 10:12   If equali - some text..
Reply With Quote #1

Hello!

PHP Code:
new szName[32]
get_user_name(idszNamecharsmax(szName))
        
if(
equali(szName"%Player%"))
{
     
//some code

Did this works with this names, for example: "123Player1", "Player (1)", "12345Player"?
How to make this filter? Const = "Player", and a left or right part of nickname may be different.
__________________
sorry my bad english...

Last edited by alonelive; 06-04-2013 at 10:14.
alonelive is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 06-04-2013 , 10:15   Re: If equali - some text..
Reply With Quote #2

use
Code:
if( contain( szName, "Player" ) )
instead of:
Code:
if( equali( szName, "%Player%" ) )
TheDS1337 is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 06-04-2013 , 10:23   Re: If equali - some text..
Reply With Quote #3

Quote:
Originally Posted by DeagLe.Studio View Post
use
Code:
if( contain( szName, "Player" ) )
instead of:
Code:
if( equali( szName, "%Player%" ) )
conain() actualy returns the position of found string or -1 when not found. Therefor check >= 0 .
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 06-04-2013 , 10:27   Re: If equali - some text..
Reply With Quote #4

Quote:
Originally Posted by hornet View Post
conain() actualy returns the position of found string or -1 when not found. Therefor check >= 0 .
i really don't know the different between format and formatex, equal and equali, contain and containi
can you explain ?
TheDS1337 is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 06-04-2013 , 10:40   Re: If equali - some text..
Reply With Quote #5

Quote:
Originally Posted by DeagLe.Studio View Post
i really don't know the different between format and formatex, equal and equali, contain and containi
can you explain ?
Read the wiki rather than thread hijacking.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 06-05-2013 , 01:59   Re: If equali - some text..
Reply With Quote #6

.. a.. And what about my question?
__________________
sorry my bad english...
alonelive is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-05-2013 , 02:17   Re: If equali - some text..
Reply With Quote #7

Quote:
Originally Posted by alonelive View Post
.. a.. And what about my question?
Use contain or containi
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 06-05-2013 , 03:35   Re: If equali - some text..
Reply With Quote #8

Thank you all.
i will try it.
__________________
sorry my bad english...

Last edited by alonelive; 06-05-2013 at 03:36.
alonelive is offline
Reply


Thread Tools
Display Modes

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 16:27.


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