You are not logged in.

ROKKSTAR 1

Beginner

  • "ROKKSTAR 1" started this thread

Posts: 28

wcf.user.option.userOption53: Nein

  • Send private message

1

Tuesday, June 2nd 2015, 12:36pm

CS:S Team Farb Overlay Plugin gesucht, Ct'S = blau, T's = rot

Hallo,

Ich suche ein Plugin, welches mir die Teams färbt. Problem, da ich skins auf meinem Server habe, möchte ich das man trotz der Skins erkennt, welchem Team der jeweilige Player angehört.
Sprich die T's bekommen ein rotes farb overlay und die CT's ein blaues. (hab das auch schon oft auf anderen Servern gesehen).

Hab bis jetzt leider kein passendes Plugin gefunden. Und wenn ich das über das "Spawn Protection" Plugin (https://forums.alliedmods.net/showthread.php?p=1208196) es versuche, klappts auch nicht. ^^ Oder ich bin einfach zu doof das richtig einzustellen/installieren big-lol

Kennt jemand n passendes Plugin? Oder hab ich höchst wahrscheinlich das Protection Plugin nicht richtig installiert( falls ja, kann ich euch ja schreiben, wie ichs "installiert" hab)

mfg

Impact

Super Moderator

Posts: 1,276

wcf.user.option.userOption53: Nein

  • Send private message

2

Tuesday, June 2nd 2015, 2:00pm

Ich habe es jetzt nicht ausführlich getestet, die Farben werden daher teilweise auch öfter als nötig gesetzt, aber das sollte funktionieren.

Spoiler Spoiler

PHP Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#include <sourcemod>
#include <cstrike>
#include <sdktools>

#pragma semicolon 1
#pragma newdecls required



public Plugin myinfo = 
{
    name "PlayerColors",
    author "Impact",
    description "Sets each player's colors depending on team",
    version "0.1.0",
    url "http://gugyclan.eu"
}



public void OnPluginStart()
{
    HookEvent("round_start"OnRoundStart);
    HookEvent("player_spawn"OnPlayerSpawn);

    SetPlayerColors();
}

void SetPlayerColors()
{
    for (int i=1i<= MaxClientsi++)
    {
        if (IsClientInGame(i))
        {
            SetPlayerColor(i);
        }
    }
}


void SetPlayerColor(int client)
{
    int team GetClientTeam(client);
    
    if (team == CS_TEAM_T)
    {
        SetEntityRenderColor(client25500255);
    }
    else if (team == CS_TEAM_CT)
    {
        SetEntityRenderColor(client043255255);
    }
}


public Action OnRoundStart(Handle event, const char[] namebool dontBroadcast)
{
    SetPlayerColors();
}


public Action OnPlayerSpawn(Handle event, const char[] namebool dontBroadcast)
{
    int client GetClientOfUserId(GetEventInt(event"userid"));
    
    if (client)
    {
        SetPlayerColor(client);
    }
}

Die Farben kannst du ja selbst anpassen, sind einfach rgb Werte.

ROKKSTAR 1

Beginner

  • "ROKKSTAR 1" started this thread

Posts: 28

wcf.user.option.userOption53: Nein

  • Send private message

3

Tuesday, June 2nd 2015, 3:10pm

Danke,

Ich will dich ja nicht nerven, aber ich bin total neu auf dem Gebiet. ^^

Ich weiß gerade nichts mit deiner Antwort anzufangen. :schaem1:

Wo muss ich den PHP Quelltext denn einfügen?

Wenn ich das recht sehe, korrigier mich wenn ich falsch liege, hast du das Plugin selbst geschrieben.

-> muss man das irgendwie in ne smx Datei umwandeln?

Wie gesagt bin total neu auf demm Gebiet, als nähmts mir nicht übel.

mfg

Newbie'

Professional

Posts: 580

Location: Zuhause

wcf.user.option.userOption53: Nein

  • Send private message

4

Tuesday, June 2nd 2015, 3:43pm

https://www.sourcemod.net/compiler.php

Kopieren, Einfügen, Compile drücken ...

ROKKSTAR 1

Beginner

  • "ROKKSTAR 1" started this thread

Posts: 28

wcf.user.option.userOption53: Nein

  • Send private message

5

Tuesday, June 2nd 2015, 3:48pm

Danke! wirklich :D

werds mal ausprobieren

mfg

ROKKSTAR 1

Beginner

  • "ROKKSTAR 1" started this thread

Posts: 28

wcf.user.option.userOption53: Nein

  • Send private message

6

Tuesday, June 2nd 2015, 3:55pm

So, habs getestet und geht wunderbar!

Wirklich, herzlichen danke an Newbie und an dich Impac. Danke für die Mühe. ^^

mfg

Similar threads