Raised This Month: $ Target: $400
 0% 

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-08-2010 , 16:22   Re: How do i check if a map contains a word?
Reply With Quote #7

Quote:
Originally Posted by wrecked_ View Post
Specifically for your plugin, you'd want to do something like this:
PHP Code:
#include <amxmodx>

new sz_MapName[32]

public 
plugin_init()
{
    
register_plugin"Map Finder Example""9999.5""wrecked_" )
    
    
register_clcmd"say /shop""cmd_ShopHandler" // Just because I know you're using this for the VIP thing
}

public 
cmd_ShopHandlerid )
{
    
get_mapnamesz_MapNamecharsmaxsz_MapName ) )
    
    if( 
containisz_MapName"jb_" ) )
    {
        
// JB Shop Code Here
    
}
    else
    {
        
// Normal Shop Code Here
    
}

No you don't.

Code:
#include < amxmodx > public plugin_init( ) {     register_plugin( "Map plugin example", "0.0.1", "Exolent" );         new szMapName[ 64 ];     get_mapname( szMapName, 63 );         if( containi( szMapName, "jb" ) == -1 )     {         pause( "a" );         return;     }         // rest of plugin_init( ) code here }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 07:19.


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