Raised This Month: $ Target: $400
 0% 

how to assign a skin to entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Miew
Member
Join Date: Jan 2014
Old 02-20-2014 , 14:10   how to assign a skin to entity
Reply With Quote #1

some one can explain me the way to assigne a custom skin to entity ?
for create something like this :

http://miew.verygames.net/2013-11-12_00002.jpg
Miew is offline
CoolJosh3k
AlliedModders Donor
Join Date: Mar 2010
Old 02-20-2014 , 14:32   Re: how to assign a skin to entity
Reply With Quote #2

If you mean for only the player/client, then you can check out skin replacements on sites like gamebanana and cstrike-planet. These sites often include guides for each skin you download.

If you are talking about modifying a skin for all players on the server (server-side), then things become more complex. The best way is to write a plugin that replaces the skin of an object, with a vmt you have provided (clients also need this file). You would also need to force sv_pure appropriately.

If you are trying to change the currently active skin of an object (such as red/blu in tf2), then you can modify the entity's keyvalue params via a plugin.

If you give more details on exactly what you want, I am sure someone here can help you with the details.
CoolJosh3k is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-20-2014 , 16:20   Re: how to assign a skin to entity
Reply With Quote #3

That's planted_c4 model replaced with
Code:
models\items\ammocrate_ar2.mdl
Precache new model on map start and set that entity model

and welcome to scripting section, http://docs.sourcemod.net/api/
Bacardi is offline
Miew
Member
Join Date: Jan 2014
Old 02-20-2014 , 16:55   Re: how to assign a skin to entity
Reply With Quote #4

Thx bacardi and if i precache model from gamesbanana for exemple it s ok ?
Miew is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-21-2014 , 01:49   Re: how to assign a skin to entity
Reply With Quote #5

...yes, works if You get new Model which no one have.
But gamebanana offers mostly models to replace current Game files,
Those works for Player itself.


Read cooljosh3k post
Bacardi is offline
Miew
Member
Join Date: Jan 2014
Old 02-21-2014 , 03:57   Re: how to assign a skin to entity
Reply With Quote #6

I have read his post and i seek models for entity like the screenshot

Thx u 2.
Miew is offline
Miew
Member
Join Date: Jan 2014
Old 02-21-2014 , 07:26   Re: how to assign a skin to entity
Reply With Quote #7

i have try this :

PHP Code:
public Action:commandprop(clientargs)
{
   if(
args 1)
   {
      
ReplyToCommand(client"Please enter a model name");
      return 
Plugin_Handled;
   }
   
   new 
String:arg1[150];
   
GetCmdArg(1arg1sizeof(arg1));
   
   new 
EntIndex CreateEntityByName("prop_dynamic");
   if(
EntIndex != -&& IsValidEntity(EntIndex))
   {
      new 
Float:origin[3];
      
GetClientAbsOrigin(clientorigin);
      
DispatchKeyValueFloat(EntIndex"solid"2.0);
      
DispatchKeyValue(EntIndex"model",arg1);
      
DispatchSpawn(EntIndex);
      
/*
      * origin[0] = x;
      * origin[1] = y;
      * origin[2] = z;
      */
      
origin[0] += 30.0;
      
TeleportEntity(EntIndexoriginNULL_VECTORNULL_VECTOR);
   } else {
      
ReplyToCommand(client"Cannot create entity!");
   }
   
   return 
Plugin_Handled;

the enity is create but it's an error

the model is precached , i test with this "models/props_combine/combine_monitor"

solved ! thx for all explication ;)

Last edited by Miew; 02-21-2014 at 10:24. Reason: SOLVED
Miew is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode