SendClientMessageEx & SendClientMessage??
#1

What's the difference between SendClientMessageEx and the SendClientMessage? I'm unable to compile my script without having to use SendClientMessage, because the script is using SendClientMessageEx.

PS: SendClientMessageEx is undefined in my script which explains why I can't compile it and the problem is I don't know where or how do I define it.
Reply
#2

In my gamemode instead of SetPlayerCheckpoint, i use SetPlayerCheckpointEx, because with this stock im also saving some player checkpoint's variables (to connect at timer or textdraw).

Basically there is no difference, it's like you do SCM instead of SendClientMessage.

Normally it's used to "avoid" limitations on current functions to add new needed ones. (In my case i have a distance textdraw based on the created checkpoint, so i made SetPlayerCheckpointEx).

However the use is like the normal SendClientMessage, so:

pawn Код:
SendClientMessageEx(playerid, color, string);
Reply
#3

Quote:
Originally Posted by KinderClans
Посмотреть сообщение
In my gamemode instead of SetPlayerCheckpoint, i use SetPlayerCheckpointEx, because with this stock im also saving some player checkpoint's variables (to connect at timer or textdraw).

Basically there is no difference, it's like you do SCM instead of SendClientMessage.

Normally it's used to "avoid" limitations on current functions to add new needed ones. (In my case i have a distance textdraw based on the created checkpoint, so i made SetPlayerCheckpointEx).

However the use is like the normal SendClientMessage, so:

pawn Код:
SendClientMessageEx(playerid, color, string);
But with SendClientMessageEx, I can't compile it since it's undefined symbol.
Reply
#4

Because you need to define them.
Reply
#5

How? I mean where?
Reply
#6

PHP код:
SendClientMessageEx(playeridcolormessage[], more_if_needed...)
{
    
//code

Reply
#7

Quote:
Originally Posted by Lokii
Посмотреть сообщение
PHP код:
SendClientMessageEx(playeridcolormessage[], more_if_needed...)
{
    
//code

No?

pawn Код:
#define SendClientMessageEx SendClientMessage
Reply
#8

Quote:
Originally Posted by KinderClans
Посмотреть сообщение
No?

pawn Код:
#define SendClientMessageEx SendClientMessage
i made a custom function while you just defined a longer name for sendclientmessage

tho he can also make custom function using marco

PHP код:
#define SendClientMessageEx(%0,%1,%2,%3..more_if_needed) SendClientMessgae(%0,%1,%2); //more code here 
Reply
#9

SendClientMessageEx is when someone modifies the original SendClientMessage but he does not have a good name in his mind so just adds an 'Ex'... If you copy pasted the code then also copy-paste SendClientMessageEx function.
Reply
#10

SendClientMessage is main message sender for player
SendClientMessageEx is exception of SendClientMessage, because it for example modifies text or does something else with the text.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)