View Single Post
Author Message
lnteresting
Junior Member
Join Date: Jan 2019
Old 02-26-2019 , 15:03   I need help with my plugin
Reply With Quote #1

The plugin im trying to make sets players clan tags as their userID here's an expample


the plugin compiles but doesnt work in game

Code:
#pragma semicolon 1

#define DEBUG

#define PLUGIN_AUTHOR "Interesting"
#define PLUGIN_VERSION "1.00"

#include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <sdkhooks>


public Plugin myinfo = 
{
	name = "UserID",
	author = PLUGIN_AUTHOR,
	description = "Sets player's clan tag as their userID'",
	version = PLUGIN_VERSION,
	url = "https://steamcommunity.com/id/AAAAAAGGHHH/"
};

public void OnClientPostAdminCheck(int client)
{
	int ID = GetClientUserId(client);
	char userID[6];
	
	for(int i = 0; ID > 0; i++)
	{
		userID[i] = ID % 10;
		ID = ID / 10;
	}
	
	CS_SetClientClanTag(client, userID);
}
Attached Files
File Type: sp Get Plugin or Get Source (userID.sp - 113 views - 647 Bytes)

Last edited by lnteresting; 02-26-2019 at 15:03.
lnteresting is offline