Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma semicolon 1
- #define DEBUG
- #include <sourcemod>
- #include <sdktools>
- #include <cstrike>
- #pragma newdecls required
- public Plugin myinfo =
- {
- name = "[DSH] Tagi graczy i vipów",
- author = "deszableble",
- description = "Plugin dodaje na serwer tagi dla użytkowników.",
- version = "1.0",
- url = "/id/deszableble"
- };
- public void OnPluginStart()
- {
- HookEvent("player_spawn", Event_PlayerSpawn);
- }
- public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast)
- {
- int client = GetClientOfUserId(event.GetInt("userid"));
- SetPlayerClanTag(client);
- }
- public Action SetPlayerClanTag(int client)
- {
- if(IsPlayerVip(client))
- {
- CS_SetClientClanTag(client, "« VIP »");
- }
- else
- {
- CS_SetClientClanTag(client, "• Gracz •");
- }
- }
- stock bool IsValidClient(int client)
- {
- if(client <= 0 ) return false;
- if(client > MaxClients) return false;
- if(!IsClientConnected(client)) return false;
- if(IsFakeClient(client)) return false;
- return IsClientInGame(client);
- }
- stock bool IsPlayerVip(int client)
- {
- if (GetUserFlagBits(client) & ADMFLAG_CUSTOM3)
- return true;
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement