Raised This Month: $ Target: $400
 0% 

How to execute command on client console ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
assd
Junior Member
Join Date: Jul 2008
Old 12-22-2008 , 03:26   How to execute command on client console ?
Reply With Quote #1

I try to execute command on client's console, but it's not work. What is wrong?
I use pfnClientCommand function.
Code:
void OnClientPutInServer(edict_t *pEntity){/*
 g_engfuncs.pfnClientCommand(pEntity, "disconnect");
 RETURN_META(MRES_IGNORED);
};
It doesn't work !!!

I try to kick player, but server print "bad server command kick #1"
Code:
g_engfuncs.pfnServerCommand("kick #1");
g_engfuncs.pfnServerExecute();
Is there alternative function pfnClientCommand, can do it? May be it is possible through a write_message() ?
assd is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 12-22-2008 , 03:55   Re: How to execute command on client console ?
Reply With Quote #2

Code:
CLIENT_COMMAND(pEntity, "disconnect\n");
Code:
char kickcmd[16];
sprintf(kickcmd, "kick #%d\n", GETPLAYERUSERID(pEntity));
SERVER_COMMAND(kickcmd);
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Reply



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 09:07.


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