I've an idea about how to make my chat more "Special Chat" in my server! -
DeathCore - 05.10.2016
I was thinking about making my chat even better, when you sending a message it will sendclientmessage to anyone with your NAME: Text... but you will see in your screen this: You: Text..
it returns 0 and ONLY ONE MESSAGE SENT and not two sendclientmessages I mean I can't do this right?
SendClientMessage(i,0xffffffaa, str); // Message Shows To Anyone but not you
SendClientMessage(playerid,0xffffffaa, istr); // Message Shows ONLY to you!
return 0;
Thank you for your help!
Re: I've an idea about how to make my chat more "Special Chat" in my server! -
SickAttack - 05.10.2016
Use SendClientMessageToAll.
Re: I've an idea about how to make my chat more "Special Chat" in my server! -
DeathCore - 05.10.2016
Quote:
Originally Posted by SickAttack
Use SendClientMessageToAll.
|
But it will send to anyone including myself, I want that one message will send only to me, and the other message will send to the others but not me
NAME: hi all <<< everyone will see it but not me
You: hi all << I will see it but no one else will see it
Re: I've an idea about how to make my chat more "Special Chat" in my server! -
[WSF]ThA_Devil - 05.10.2016
PHP код:
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
if(i == playerid) {
SendClientMessage(i,0xffffffaa, istr); // Message Shows ONLY to you!
} else {
SendClientMessage(i,0xffffffaa, str); // Message Shows To Anyone but not you
}
}
}
Excuse my indentation, wrote it in the reply box.
EDIT: My OCD kicked in.. had to fix the indentation... xD
Re: I've an idea about how to make my chat more "Special Chat" in my server! -
DeathCore - 05.10.2016
Quote:
Originally Posted by [WSF]ThA_Devil
PHP код:
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
if(i == playerid) {
SendClientMessage(i,0xffffffaa, istr); // Message Shows ONLY to you!
} else {
SendClientMessage(i,0xffffffaa, str); // Message Shows To Anyone but not you
}
}
}
Excuse my indentation, wrote it in the reply box.
EDIT: My OCD kicked in.. had to fix the indentation... xD
|
If I will put return 0 under these functions it will work? these 2 functions will work at the same time when I'll send one message in public OnPlayerText? I had no time to test it out sorry.
Re: I've an idea about how to make my chat more "Special Chat" in my server! -
[WSF]ThA_Devil - 05.10.2016
Put a return 0 after it.
Also, test it, as I might or might not have made mistake with the code.