Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2013-11-23 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
November 23, 2013, 12:56:11 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://ownageclan.com/jenkins/job/War3Source-Default1/
WIKI page: http://ownageclan.com/wiki/index.php/Main_Page
War3Source GIT repo: https://github.com/War3Source/War3Source
War3Source servers: http://www.game-monitor.com/search.php?vars=a_war3_version=
War3Source Function Reference: http://ownageclan.com/war3source/functionreference/?search=player
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How can i set skin4 or 3 for this model?  (Read 36 times)
alex0310
Full Member
***
Posts: 186



View Profile WWW
« on: November 17, 2013, 12:35:20 PM »

I need help!
How can i set skin4 or 3 for this model???


Default setting skin2
Code:
SetVariantString("models/props_halloween/halloween_demoeye.mdl");
AcceptEntityInput(client, "SetCustomModel");
Logged
Revan
Sr. Member
****
Posts: 411



View Profile
« Reply #1 on: November 17, 2013, 04:04:12 PM »

Try using something like this:
Code:
DispatchKeyValue(ent, "skin","2");
Logged

#war3source on gamesurge
alex0310
Full Member
***
Posts: 186



View Profile WWW
« Reply #2 on: November 18, 2013, 10:02:48 AM »

Code:
#define HDE_model "models/props_halloween/halloween_demoeye.mdl"
public OnMapStart()
{
PrecacheModel(HDE_model, true);

}
public InitPassiveSkills( client )

if( War3_GetRace( client ) == thisRaceID ){


SetVariantString(HDE_model);
AcceptEntityInput(client, "SetCustomModel");

if(GetClientTeam(client)==3)
{

PrintToChatAll( "before [%d]", GetEntProp(client, Prop_Send, "m_nSkin"));
DispatchKeyValue(client, "skin","4");
PrintToChatAll( "after [%d]", GetEntProp(client, Prop_Send, "m_nSkin")); 

}
if(GetClientTeam(client)==2)
{
DispatchKeyValue(client, "skin","3");
}
if(ValidPlayer(client,true))
{
War3_SetBuff(client,bFlyMode,thisRaceID,true);

}
}
else{

TF2_RemoveAllWeapons(client);
TF2_RegeneratePlayer(client);

}
}

 This was my failed attempt to switch the model's skin, based on the players team...
else ideas...
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!