Raised This Month: $ Target: $400
 0% 

Different Menu's for different maps


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 08-21-2013 , 15:47   Re: Different Menu's for different maps
Reply With Quote #6

sorry about that

Quote:
Originally Posted by Gasior View Post
I don't get it .
PHP Code:
new const mapnames_usecontaini[maxmaps] = 

    
0
    
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 View Post

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...

Last edited by .Dare Devil.; 08-21-2013 at 15:50.
.Dare Devil. 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 15:59.


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