Raised This Month: $12 Target: $400
 3% 

csgo; Change model color


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
awyx
Member
Join Date: Mar 2019
Old 03-30-2019 , 20:49   csgo; Change model color
Reply With Quote #1

Hey, this is probably pretty easy to do, but im kinda new.
The plugin I want is to change your model color(in csgo), I was searching and I think you need to use " SetEntityRenderColor ", but well I dont really know how to do it, and idk if there is a plugin to do that, so ye, if someone wanna help me I would be grateful.
Example : http://prntscr.com/n584g1

Last edited by awyx; 04-08-2019 at 15:17.
awyx is offline
Rowdy4E
Junior Member
Join Date: Nov 2018
Location: Czech Republic
Old 03-31-2019 , 11:11   Re: csgo; Change model color
Reply With Quote #2

Hello, but can you tell me how the plugin should work ? Menu with custom colors or set color on clients by theirs team?
__________________
Rowdy4E is offline
awyx
Member
Join Date: Mar 2019
Old 03-31-2019 , 13:56   Re: csgo; Change model color
Reply With Quote #3

Quote:
Originally Posted by Rowdy4E View Post
Hello, but can you tell me how the plugin should work ? Menu with custom colors or set color on clients by theirs team?
Hey, no menu, just setting color on clients by theirs team.
awyx is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-31-2019 , 14:39   Re: csgo; Change model color
Reply With Quote #4

You would need to have a custom model first, SetEntityRenderColor will just apply a 'tint' to the material. The custom model will need to have a plain white texture.
Mitchell is offline
Rowdy4E
Junior Member
Join Date: Nov 2018
Location: Czech Republic
Old 03-31-2019 , 15:04   Re: csgo; Change model color
Reply With Quote #5

Hmm, try this..
Attached Files
File Type: smx teamcolor.smx (6.0 KB, 99 views)
__________________

Last edited by Rowdy4E; 03-31-2019 at 15:52. Reason: bad script
Rowdy4E is offline
Rowdy4E
Junior Member
Join Date: Nov 2018
Location: Czech Republic
Old 03-31-2019 , 15:51   Re: csgo; Change model color
Reply With Quote #6

Quote:
Originally Posted by awyx View Post
not working , someone did this but it still doesnt work, any ideas?


PHP Code:
public void OnPluginStart(){   
    
HookEvent("player_spawn"TrocarCorEventHookMode_Post);
}

public 
Action TrocarCor(Event evento, const char[] nomebool broadcast){
    
    
int userId GetEventInt(evento"userid");
    
int id GetClientOfUserId(userId);
    
    
SetEntityRenderMode(idRENDER_TRANSCOLOR);
    
    if(
GetClientTeam(id) == CS_TEAM_CT){
        
SetEntityRenderColor(id00255255); 
    }
    else{
        
SetEntityRenderColor(id25500255);
    }
    
    return 
Plugin_Continue;

Where is problem?

PHP Code:
public void OnPluginStart()
{
    
HookEvent("player_spawn"OnPlayerSpawn);
}

public 
void OnPlayerSpawn(Handle eventchar[] namebool dontBroadcast) {
    
int client GetClientOfUserId(GetEventInt(event"userid"));
    
int team GetClientTeam(client);
    
    if (
team == CS_TEAM_CT) {
        
SetEntityRenderColor(client00255255);
    } else if (
team == CS_TEAM_T) {
        
SetEntityRenderColor(client25500255);
    }

__________________

Last edited by Rowdy4E; 03-31-2019 at 15:54.
Rowdy4E is offline
CliptonHeist
Senior Member
Join Date: Feb 2016
Old 03-31-2019 , 18:32   Re: csgo; Change model color
Reply With Quote #7

You could try using RequestFrame() to delay the change by a frame and see if it helps.
CliptonHeist is offline
Cruze
Veteran Member
Join Date: May 2017
Old 03-31-2019 , 21:48   Re: csgo; Change model color
Reply With Quote #8

Quote:
Originally Posted by CliptonHeist View Post
You could try using RequestFrame() to delay the change by a frame and see if it helps.
Yes + Maybe IsValidClient check
__________________
Taking paid private requests! Contact me

Last edited by Cruze; 03-31-2019 at 21:50.
Cruze is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 04-02-2019 , 01:23   Re: csgo; Change model color
Reply With Quote #9

I really canīt remember exactly if this cvar (sv_disable_immunity_alpha) has something to do with it........
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
Reply


Thread Tools
Display Modes

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 15:10.


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