message connection
#1

Hello!
The first thing I am a novice and use ****** translator (I'm Spanish).
I have a doubt and asked if they could help me.

This is the question.
I'm in a project (I think is completely original) but I'm missing something or not to start.
The project uses Dini, ZCMD and sscanf. Well, I want to know how to make a player to see the connection to the server message if it is just this "friend". Msn serious type.

They put something like "SendCommandToAdmins" for administrators to see the post, but since I can do that by connecting with a name, this will get the message?

I hope I've explained it well, thanks.
Reply
#2

You mean "Player Bobubia has joined the server?" Or you mean the icon on the right hand side of your screen?
For the icon, put this onplayerconnect(..)
Код:
if(!IsPlayerNPC(playerid)){
   	SendDeathMessage(INVALID_PLAYER_ID,playerid, 200);}
If you want the players to see when one players leaves, put this onplayerdisconnect(..)"
Код:
 if(!IsPlayerNPC(playerid)){
	SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);}
For the other one, and again put this onplayerconnect:
Код:
new PlayerName[MAX_PLAYER_NAME], str[128];
	GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
	
	format(str,sizeof(str),"*%s(ID:%d) has joined the server.", PlayerName, playerid);
	SendClientMessageToAll(YOURCOLOR,str);
plus, change the color to whatever you want it to be.[/code]
Reply
#3

no, i mean if i could put a command like "added as a friend" like in windows messenger. and then i only could see him or he could see me. only if a added him as a friend

RelaxCafe well thanks for the help.
Help me with that?


Edit:

how could I explain:
When you run a command, say

CMD: Add to Friend (playerid, params [])
{
dini_IntSet (file, "(name of another player)", pInfo [playerid] ...
return 1;
}

who made the command, add the name of another player. So when the other player added into the server, only see the message that gave the command.

note: just one example
Reply
#4

sorry for double post ..
Any help or suggestions?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)