Post: Getting the current player model
10-13-2015, 01:07 AM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); I have seen the use of
    setModel(model)
a lot which changes the player's model. However, how can one get the current model name of a player? I want to make it possible to revert back to the initial player model after having changed it.

Thank you
(adsbygoogle = window.adsbygoogle || []).push({});
10-13-2015, 01:13 AM #2
Default Avatar
Remy
Guest
Originally posted by BullyWiiPlaza View Post
I have seen the use of
    setModel(model)
a lot which changes the player's model. However, how can one get the current model name of a player? I want to make it possible to revert back to the initial player model after having changed it.

Thank you


This will change your model back to the appropriate for your team on X map if that makes sense, basically a reset model functions.
    self [[game["set_player_model"][self.team]["default"]]]();
10-13-2015, 01:41 AM #3
BullyWiiPlaza
Climbing up the ladder
Originally posted by Infraction View Post
This will change your model back to the appropriate for your team on X map if that makes sense, basically a reset model functions.
    self [[game["set_player_model"][self.team]["default"]]]();

Alright, what about on Zombies or for the Zombies themselves?

    transformAllZombies(model)
{
zombies = GetAiSpeciesArray("axis", "all");

for(i = 0; i < zombies.size; i++)
{
zombies[i] setModel(model);
}

self iPrintln("All Zombies ^2transformed^7");
}
10-13-2015, 01:42 AM #4
Default Avatar
Remy
Guest
Originally posted by BullyWiiPlaza View Post
Alright, what about on Zombies or for the Zombies themselves?


Not familiar with zombies sorry :p
10-13-2015, 03:48 AM #5
Loz
Vault dweller
Originally posted by BullyWiiPlaza View Post
I have seen the use of
    setModel(model)
a lot which changes the player's model. However, how can one get the current model name of a player? I want to make it possible to revert back to the initial player model after having changed it.

Thank you


i would save the original model as a variable b4 you change it

self.savedModel = self.model;

The following user thanked Loz for this useful post:

BullyWiiPlaza
10-13-2015, 04:58 AM #6
FRINZ
I’m too L33T
self iprintin(self.model);
name of the model u current on seb5594
10-13-2015, 11:59 AM #7
BullyWiiPlaza
Climbing up the ladder
Originally posted by Loz View Post
i would save the original model as a variable b4 you change it

self.savedModel = self.model;

Yes, that is exactly what I wanted to do. Nice Smile

Here's the full code:

    togglePlayerModel(playerModel)
{
if(!isDefined(self.currentPlayerModel))
{
self.currentPlayerModel = self.model;
}

if(self.model == playerModel)
{
self setModel(self.currentPlayerModel);
self iPrintln("Model ^1reset");

return;
}

self setModel(playerModel);
self iPrintln("Model ^2set");
}
10-14-2015, 04:21 AM #8
Adrian
Adrian is back!
Originally posted by BullyWiiPlaza View Post
Yes, that is exactly what I wanted to do. Nice Smile

Here's the full code:

    togglePlayerModel(playerModel)
{
if(!isDefined(self.currentPlayerModel))
{
self.currentPlayerModel = self.model;
}

if(self.model == playerModel)
{
self setModel(self.currentPlayerModel);
self iPrintln("Model ^1reset");

return;
}

self setModel(playerModel);
self iPrintln("Model ^2set");
}


Question has been answered. If you have any other questions feel free to make another thread.

-Thread Closed.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo