Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help self.classnum
#1
Hi, someone know how to find what class i have choose?

I want to do a function like this:

Code:
switch( self. class number )
{
case 0: bla bla
case 1: bla bla
}

Someone know how to do this?
Reply

#2
It would involve menu files. Find the custom classes menufile, and see what the responses are. Say the responses are "default1" to "default5" and "custom1" to "custom5".

You would put some code in mod like
PHP Code:
onMenuResponse()
{
    
self endon"death" );
    
self endon"disconnect" );
    
    while( 
true )
    {
        
self waittill"menuresponse"menuresponse );
        
        if( 
response == "default1" )
        {
            
self.myclass "class1"
        
}
       if( 
response == "default2" )
        {
            
self.myclass "class2"
        
}
  }


Then somewhere else do a switch of self.myclass. Case "class1" give certain weapons, etc.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.