Raised This Month: $ Target: $400
 0% 

How do i check if a map contains a word?[SOLVED]


Post New Thread Reply   
 
Thread Tools Display Modes
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-08-2010 , 19:03   Re: How do i check if a map contains a word?
Reply With Quote #21

Quote:
Originally Posted by Bugsy View Post
PHP Code:
new szMap32 ];
get_mapnameszMap charsmaxszMap ) );

//map name does not contain jb
if ( !containiszMap "jb" ) )
     return 
PLUGIN_HANDLED;

//your code here 
PHP Code:
if ( !containiszMap "jb" ) ) 
will return true if and only if "jb" is the first two letters in the mapname.
__________________

Last edited by fysiks; 02-08-2010 at 19:06.
fysiks is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 02-08-2010 , 19:09   Re: How do i check if a map contains a word?
Reply With Quote #22

This is already fixed, putting solved in title now. stop posting god dammit.
NiQu is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-08-2010 , 19:19   Re: How do i check if a map contains a word?
Reply With Quote #23

Quote:
Originally Posted by fysiks View Post
PHP Code:
if ( !containiszMap "jb" ) ) 
will return true if and only if "jb" is the first two letters in the mapname.
You've found a bug in containi, not my logic.

Here's a fix

PHP Code:
Change

if ( !containiszMap "jb" ) ) 

to

if ( strfindszMap "jb" ) == -
__________________
Bugsy is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-08-2010 , 19:24   Re: How do i check if a map contains a word?
Reply With Quote #24

Quote:
Originally Posted by Bugsy View Post
You've found a bug in containi, not my logic.
I agree. The action and name do not go together.
__________________
fysiks is offline
Reply



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 07:19.


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