View Single Post
Author Message
AlliedModders Donor
Join Date: Dec 2015
Old 12-26-2015 , 16:03   Namechecking, beginner question
Reply With Quote #1

I made my first plugin after reading some wiki, but its not working (but listed at sm plugins list).
It's supposed to write in console if client have specified string in nickname.
What I'm doing wrong?
#include <sourcemod>
#include <string>

public void OnPluginStart()
	PrintToServer("Nick checker enabled!");

public onClientConnected(client){
	char clientName[32];
	GetClientName(client, clientName, 32);
	if(StrContains(clientName, "test", false)){
		PrintToServer("%s don't have test", clientName);
		PrintToServer("%s have test", clientName);

Last edited by fard; 12-26-2015 at 16:05.
fard is offline