AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   csgo; Change model color (https://forums.alliedmods.net/showthread.php?t=315272)

awyx 03-30-2019 20:49

csgo; Change model color
 
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

Rowdy4E 03-31-2019 11:11

Re: csgo; Change model color
 
Hello, but can you tell me how the plugin should work ? Menu with custom colors or set color on clients by theirs team?

awyx 03-31-2019 13:56

Re: csgo; Change model color
 
Quote:

Originally Posted by Rowdy4E (Post 2645703)
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.

Mitchell 03-31-2019 14:39

Re: csgo; Change model color
 
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.

Rowdy4E 03-31-2019 15:04

Re: csgo; Change model color
 
1 Attachment(s)
Hmm, try this..

Rowdy4E 03-31-2019 15:51

Re: csgo; Change model color
 
Quote:

Originally Posted by awyx (Post 2645731)
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);
    }



CliptonHeist 03-31-2019 18:32

Re: csgo; Change model color
 
You could try using RequestFrame() to delay the change by a frame and see if it helps.

Cruze 03-31-2019 21:48

Re: csgo; Change model color
 
Quote:

Originally Posted by CliptonHeist (Post 2645750)
You could try using RequestFrame() to delay the change by a frame and see if it helps.

Yes + Maybe IsValidClient check

andi67 04-02-2019 01:23

Re: csgo; Change model color
 
I really canīt remember exactly if this cvar (sv_disable_immunity_alpha) has something to do with it........


All times are GMT -4. The time now is 07:51.

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