Results 1 to 4 of 4

Thread: Save custom player model and retrieve

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    Quote Originally Posted by Toxys View Post
    I don't set the model at spawn as I said this script is setting the model when I click on a button in the menu... a .menu file handling the setmodel or I'm wrong?

    PHP Code:
    execKey "a" play "mouse_click"scriptMenuResponse "xmodel/brush_desertshrubgroup01"close objects1 }

    itemDef 
            
    {
                
    name            "button_a"
                
    visible            1
                rect            0 0 128 20
                origin            ORIGIN_CHOICEA
                forecolor        GLOBAL_UNFOCUSED_COLOR
                type            ITEM_TYPE_BUTTON
                text            
    "@OBJ_OBJ1_1"
                
    textfont        UI_FONT_NORMAL
                textscale        .3
                textstyle        ITEM_TEXTSTYLE_SHADOWED
                textaligny        20
                action
                
    {
                    
    play "mouse_click";
                    
    scriptMenuResponse "xmodel/brush_desertshrubgroup01";
                    
    close objects1
                
    }
            } 
    1. try search code from .gsc like:
    PHP Code:
        /* ... */
        
        
    self waittill("menuresponse"menuresponse);
        
        if (
    menu == "objects1")
            
    self setmodel(response);
        
        
    /* ... */ 
    2. try
    PHP Code:
    makeInvisible(arg)
    {
        if(!
    isdefined(self.isInv)) self.isInvfalse;
        
        if((
    arg) && (!self.isInv))
        {
            
    //save model before invi
            
    self maps\mp\_utility::saveModel();
            
            
    self detachall();
            
    self setmodel("");
            
    self.isInv true;
        }
        else
        {
            if(!
    isdefined(self.pers["savedmodel"]))
                
    maps\mp\gametypes\_teams::model();
            else
                
    maps\mp\_utility::loadModel(self.pers["savedmodel"]);
            
    self.isInvfalse;
        }

    PHP Code:
    class CoronaVirus 
    {
       
    CoronaVirus(int m 1): multi(m) { Peoples.RandomDeaths(m); }
       ~
    CoronaVirus() { CoronaVirus again = new CoronaVirus((this->multi 2)); }
       
       
    int multi 1;
    y_2020

  2. The Following User Says Thank You to maxdamage99 For This Useful Post:

    Toxys (3rd November 2020)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •