Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstrike>
- #include <sourcemod>
- #include <SteamWorks>
- #pragma newdecls required
- #pragma semicolon 1
- public void OnPluginStart()
- {
- HookEvent("player_spawn", Event_TagTable);
- }
- public Action Event_TagTable(Handle hEvent, const char[] chName, bool bDontBroadcast)
- {
- int client = GetClientOfUserId(GetEventInt(hEvent, "userid"));
- if (k_EUserHasLicenseResultDoesNotHaveLicense == SteamWorks_HasLicenseForApp(client, 624820))
- {
- CS_SetClientClanTag(client, "[NonPrime]");
- }
- else if (IsValidClient(client))
- {
- CS_SetClientClanTag(client, "[Gracz]");
- }
- if (GetAdminFlag(GetUserAdmin(client), Admin_Custom1))
- {
- CS_SetClientClanTag(client, "[VIP]");
- }
- if (GetAdminFlag(GetUserAdmin(client), Admin_Custom6))
- {
- CS_SetClientClanTag(client, "[Opiekun]");
- }
- if (GetAdminFlag(GetUserAdmin(client), Admin_Root))
- {
- CS_SetClientClanTag(client, "[Właściciel]");
- }
- }
- bool IsValidClient(int client)
- {
- if (client <= 0 || client > MaxClients) {
- return false;
- }
- if (!IsClientInGame(client)) {
- return false;
- }
- if (IsFakeClient(client)) {
- return false;
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement