Raised This Month: $ Target: $400
 0% 

on map


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-15-2021 , 21:21   Re: on map
Reply With Quote #4

Quote:
Originally Posted by Supremache View Post
PHP Code:
new szMapName[64]
get_mapname(0szMapName63)
If(
szMapNameequal ("de_")) return; 
No. You may want to test code before posting.

_____________________________________________ ____________

@MacL, this is a Scripting Help question so you should post things like this in Scripting Help in the future.

You would use get_mapname() and equal() to compare only the first X number of characters (because both examples given only have 3 characters, you would set argument 'c' to 3).

If you have differing sizes of prefixes, you may want to consider breaking the string with something like strtok() using the underscore as a tocken and comparing the first result to your prefixes.

_____________________________________________ ____________

For others who might want it: No plugin code modification required, simply configure the plugin to only load on the maps you want: https://wiki.alliedmods.net/Configur...ecific_Plugins
__________________

Last edited by fysiks; 06-15-2021 at 21:29.
fysiks 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 19:59.


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