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

Solved client_print() vs engclient_print()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 05-17-2021 , 14:03   client_print() vs engclient_print()
Reply With Quote #1

Hi there! What are the differences between these 2 natives?

PHP Code:
/* Sends message to player. Set index to 0 to send text globaly. */
native client_print(index,type,const message[],any:...);

/* Sends message to player by engine. Set index to 0 to send text globaly. */
native engclient_print(player,type,const message[],any:...); 

Last edited by kww; 05-18-2021 at 14:01.
kww is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 05-17-2021 , 14:52   Re: client_print() vs engclient_print()
Reply With Quote #2

Code:
Sends message to player
native client_print()

Code:
Sends message to player by
engine
native engclient_print()
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 05-17-2021 , 18:47   Re: client_print() vs engclient_print()
Reply With Quote #3

Quote:
Originally Posted by Shadows Adi View Post
Code:
Sends message to player
native client_print()

Code:
Sends message to player by
engine
native engclient_print()
I can read xd. But where is the difference between message sent by engine and not?
kww is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-17-2021 , 19:16   Re: client_print() vs engclient_print()
Reply With Quote #4

engclient_print()
Spoiler


client_print()
Spoiler
__________________
Bugsy is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 05-17-2021 , 19:28   Re: client_print() vs engclient_print()
Reply With Quote #5

client print uses TextMsg, engclient_print uses SVC_PRINT/SVC_CENTERPRINT

not 100% sure on this, but i think messages sent with engclient_print can be hooked/edited/blocked by other plugins but with client_print messages you can't do that
jimaway is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-18-2021 , 00:27   Re: client_print() vs engclient_print()
Reply With Quote #6

If it is analogous to client_cmd() and engclient_cmd() then client_print() is for sending a message to one or all players from the server and engclient_print() is for forcing a player to send a message without sending the message to the player's client console first (i.e. instead of using client_cmd(id, "say hello world")).

Quote:
Originally Posted by jimaway View Post
not 100% sure on this, but i think messages sent with engclient_print can be hooked/edited/blocked by other plugins but with client_print messages you can't do that
If this analogy is true, it wouldn't be hookable by any plugins. For engclient_cmd(), a new command, amxclient_cmd(), had to be created so that it could be hooked by a plugin.

This can easily be tested.
__________________

Last edited by fysiks; 05-18-2021 at 00:27.
fysiks 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 15:51.


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