sorry about that
Quote:
Originally Posted by Gasior
I don't get it .
PHP Code:
new const mapnames_usecontaini[maxmaps] = { 0, 1, 1 }
Why 0 1 1?
|
mapnames_usecontaini is connected with mapnames.
for example first item in mapnames is
1hp_he, that should be full map name so when i checking the map name i have to be sure
that it is full map name because you need to check full map name and map beggining "kz_ for example" differently
native containi will check if map name contains "1hp_he" and
native equali will check if map name is exacly the same name as the map what is running in server.
0 means that my code use equali native to check, that means that map name must be full not the beggining of the map name or map tag what ever.
1 means that my code use containi and map name what you put mapnames variable is the map tag.
and this is how are the connected
PHP Code:
new const mapnames[maxmaps][48] =
{
"1hp_he", // 0
"awp_", // 1
"ka_" // 1
}
new const mapnames_usecontaini[maxmaps] =
{
0, // 1hp_he
1, // awp_
1 // ka_
}
Quote:
Originally Posted by Gasior
PHP Code:
public yourfunc() { switch(ismap) { case 0: { // map is 1hp_he } case 1: { // mapname contains awp_ } case 2: { // mapname contains ka_ } } }
Is it a place for menu?? And should it look like that:
|
You said that you want every map have his own menu so basically
PHP Code:
public yourfunc()
{
switch(ismap)
{
case 0:
{
show_1hp_he_menu()
}
case 1:
{
show__awp_menu()
}
case 2:
{
show__ka_menu()
}
}
}
If your server running map named 1hp_he
ismap will be 0
and this part will be called:
PHP Code:
case 0:
{
show_1hp_he_menu()
}
if map name begin with awp_
ismap will be 1 and this part will be called
PHP Code:
case 1:
{
// mapname contains awp_
}
And so on...