Thread: Weapon skin problem.

Results 1 to 4 of 4
  1. #1
    Registered User Dr.Abc's Avatar
    Join Date
    Sep 2018
    Posts
    5

    Weapon skin problem.

    Hi!
    I want to built a weapon with multi-skinfamily and switch v_model skins in random.
    Code:
    self.ChangeWeaponSkin(( Math.RandomLong( 1, 26 ) ));
    it didn't work, how can i make it?:)


  2. #2
    200 MB Angelscript log file KernCore's Avatar  
    Artist
    Join Date
    Apr 2016
    Location
    Brazil
    Posts
    273

    Re: Weapon skin problem.

    Quote Originally Posted by Dr.Abc View Post
    Hi!
    I want to built a weapon with multi-skinfamily and switch v_model skins in random.
    Code:
    self.ChangeWeaponSkin(( Math.RandomLong( 1, 26 ) ));
    it didn't work, how can i make it?
    You cannot. Changing pev.skins in weapons only works on the client side and seems like the server doesn't know about the weapon's skins so it doesn't work.
    You can try manually modifying the cvar 'skin' tho.

  3. #3
    Just another co-op player Maestro Fénix's Avatar
    Join Date
    Dec 2012
    Location
    Spain
    Posts
    362

    Re: Weapon skin problem.

    You can however with bodygroups, like we did for our C&C map.

    Sure, is a bit redundant to make bodygroups for only switching skins, but it works both client and serverside.


    Here we go again

  4. #4
    begadang jangan begadang =_= anggara_nothing's Avatar
    Join Date
    Jan 2016
    Location
    Indonesia
    Posts
    155

    Re: Weapon skin problem.

    pev.skin is only works for w_ (weaponbox or newly created entity) and possibly p_ model.

Posting Permissions

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