Cypher_44

Add custom models

Recommended Posts

Posted (edited)

How to add custom models that can only be accessed by a vip or admin?

I need to add custom player characters without replacing current player models. The custom player characters should be only accessed by vip players. I need this for promod live 220

This for example http://cfgfactory.com/downloads/show/5cdfd935112ce

Any ideas how to do that?

Edited by Cypher_44

Share this post


Link to post
Share on other sites

You have to grab all the files, paste them in your mod, add the lines to the mod.csv and then compile it, then you need to make a script or a command which only admins can access.

Share this post


Link to post
Share on other sites

I managed to do that but I get an error when trying to load the model

With the reason: Server crashed: dobj for xmodel 'plr_terry_johnwick' has more than 128 bones (see console for details)[0m

Is it something wrong with the model or the way I did it o.O

This was the model that I put  http://cfgfactory.com/downloads/show/5cdfd935112ce

This was the script :

onPlayerConnected(){
    if(self isVip() ){
        //self setRank( 54 );
        self.statusIcon = "hudicon_opfor";
        self thread testRank(); 
        self iPrintln("^5"+self.name+ ", ^7YOU'RE ^1ViP MEMBER ^7OF THIS SERVER.");
    
    self setModel("
plr_terry_johnwick");
    self iprintln("^3[^1ViP^3] ^5"+self.name+" ^7Is now ^3JW!");
}

Share this post


Link to post
Share on other sites

Add a 'self detachAll();' before you set the model.

Some models have extra joints in their skeleton and hit the limit when the game attaches stuff like c4 to the player body.

The detachAll removes the attached stuff (and the heads when it's not a fullbody player model - because heads are attachments too)

  • Like 1

Share this post


Link to post
Share on other sites

Yes it's working detachall did the trick, but however the model is only visible when the a round is starting, after the round started it will turn back to the original model. I think because it is called in the onPlayerConnected(). Do you have a separate script for vip characters? It will be very helpful 

Share this post


Link to post
Share on other sites
Posted (edited)

No i dont have one.

But without knowing your Script i would say you have to move it to the spawn of the player, not on connect

 

Edit: corrected the damn autocorrection of my phone.

Edited by Viking

Share this post


Link to post
Share on other sites

You have to call the skin after spawn/ready up, because it will overwrite it, especially if you are using promod, not sure for vanilla.

Share this post


Link to post
Share on other sites

For vanilla, on choosing your class loadout the player model is generally set based on the weapon. In giveloadout in the standard class gsc this is set by 'playerModelForWeapon()'. If this VIP is given only one particular model, instead being offered a a range of choices, bypass that function and set the model manually.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.