View Single Post
Kazafka
Junior Member
Join Date: Dec 2020
Old 12-20-2020 , 08:36   Re: [CS:GO] Trying to make a script to change player's name, when they join
Reply With Quote #3

Umm, actually I'm going to test this out:
Code:
#include <sourcemod>
#include <sdktools_functions>

// Info na temat plugina - Plugin info
public Plugin:myinfo = {
	name = "CSMaxShot Core",
	author = "Kazafka",
	description = "Dobry plugin, polecam!",
	version = "0.0.3"
}

// Zmiana pseudonimu gracza - Player's alias changing
public OnClientPutInServer(client) {
	char name[MAX_NAME_LENGTH], group[MAX_NAME_LENGTH]
	new target = FindTarget(client, "")
	
	GetClientName(client, name, sizeof(name))
	AdminId aid = GetUserAdmin(target)
	GroupId gid = GetAdminGroup(aid, 0, group, sizeof(group))
	
	StrCat(group, sizeof(group), name)
	
	if(gid) {
		SetClientName(client, group)
	}
}
And yeah, the compiler didn't throw any error but now let's test if it does work in the game lol.

Last edited by Kazafka; 12-20-2020 at 08:42.
Kazafka is offline