Raised This Month: $32 Target: $400
 8% 

Getting player name not working


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ReyZ
Junior Member
Join Date: Oct 2020
Old 01-10-2021 , 06:44   Getting player name not working
Reply With Quote #1

I want to print client name but not working
HTML Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>

public Plugin:myinfo =
{
	name = "KACCM",
	author = "ReyZ",
	description = "KACCM",
	version = "1",
	url = "http://www.sourcemod.net/"
};

public void OnPluginStart()
{
	RegConsoleCmd("sm_deneme", KomutKACCM, "KACCM");
}

public Action:KomutKACCM(client, args)
{
	new String:name[32];
	GetClientName(client, name, sizeof(name));
	PrintToChatAll("Deneme %s", name);
	return Plugin_Handled;
}
ReyZ is offline
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 01-10-2021 , 06:46   Re: Getting player name not working
Reply With Quote #2

If you want to directly put name to chat then you should use %N instead:
Code:
	PrintToChatAll("Deneme %N", client);
	return Plugin_Handled;
__________________

Last edited by MAGNAT2645; 01-10-2021 at 06:46.
MAGNAT2645 is offline
ReyZ
Junior Member
Join Date: Oct 2020
Old 01-10-2021 , 06:49   Re: Getting player name not working
Reply With Quote #3

Quote:
Originally Posted by MAGNAT2645 View Post
If you want to directly put name to chat then you should use %N instead:
Code:
	PrintToChatAll("Deneme %N", client);
	return Plugin_Handled;
Thanks it works
ReyZ is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode