only de_,cs_
Hi ...
How i can do so method, whoes will do something only when will be de_ or cs_ map ? ex. Now is on the server aim_dgl map. Menu -> dont open ex2. Is map as de_dust2. Menu -> OPEN ! Do you understand ? Thanks |
Re: only de_,cs_
Either use per-map plugin feature, or use get_mapname() to check map name for allowed maps.
|
Re: only de_,cs_
hm ... but i dont know a name of map :D ... i need some function whoes will know do it
|
Re: only de_,cs_
Use get_mapname() and compare the first part to check for "de_" or "cs_".
|
Re: only de_,cs_
Quote:
|
Re: only de_,cs_
There are several ways:
- equal(string, compare, length_to_check) - contain(string, find) or strfind(string, find) - Or check individual chars: string[0] == 'd' && string[1] == 'e' && string[2] == '_' For methods 1 & 2, use the funcwiki for information about how to use the functions. |
Re: only de_,cs_
I believe this would work too:
Code:
Code:
Correct me if I'm wrong. I'm more confident in the first one being true than the second one. |
Re: only de_,cs_
Those 2 are indeed the same, except the 2nd uses unnecessary memory.
And yes, '\0' = 0, except with Pawn's default escape character it would be '^0'. There are 2 methods to escape an integer to a char: 1. '\33' where 33 is a decimal integer. This example results in 33 as the decimal integer, which corresponds to the exclamation point character '!'. 2. '\x33' where 33 is a hexadecimal integer. This example results in 51 as the decimal integer, which corresponds to the number 3 character '3'. See http://www.asciitable.com for more info. |
Re: only de_,cs_
Quote:
from amxx wiki ( http://wiki.amxmodx.org/index.php/Configuring_AMX_Mod_X ) For example, if you wanted the map de_dust to disable the plugin ham.amxx and enable the plugin pickle.amxx you would put this in amxmodx/configs/maps/plugins-de_dust.ini: Code:
ham.amxx disabledPlugin based configuration files are loaded by map first (plugins-de_nuke.ini) and prefix second (plugins-de.ini). |
| All times are GMT -4. The time now is 11:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.