Help about something! -
RyanPetersons - 24.09.2012
Help about something!
I need help about a command /ignore [playerid], like if we ignore someone then, everyone can see that playerid messages in chat, but one who ignored cant see, you know how to do that, i know the thing it would be in OnPlayerText, but i dont know what to do with ONPlayerText on the work in this command...?
Anyone know then pleaze tell me, or make it?
Re: Help about something! -
RyanPetersons - 27.09.2012
CAN ANYONE REPLY FOR GOD SAKE? I'VE BEEN WAITING MUCH DAYS ARE YOU GUYS BLIND YOU GUYS CANT SEE THIS TOPIC, YOU ARE GETTING ME MUCH ANNOYED!
Re: Help about something! -
SmithyComp - 27.09.2012
There isn't an individual command which can mute one single player's text to another person, it's a world-wide command, like /mute for an example, good luck finding somebody who can make it though.
Re: Help about something! -
RyanPetersons - 27.09.2012
PLEAZE SOME ONE REPLY FOR GOD SAKE!
Re: Help about something! - Jarnu - 27.09.2012
Can you for godsake properly explain what you want.. i just understand that you want /ignore command
DO you want the player who is ignored cannot CHAT anymore till he is /unignored
Re: Help about something! -
dannyk0ed - 27.09.2012
Maybe you should ask nicely, ask explain better what you want coded.
Re: Help about something! -
RyanPetersons - 27.09.2012
Listen carefully, now I want a command know as /ignore [playerid]
So, if the current player ignores another player..
so, if the another player writes some text in the chat..
then the current player can't see the text which another player wrote in the chat..
Thats it.
now understood?
Re: Help about something! -
Hiddos - 27.09.2012
I thought it was pretty clear in the first post what he wanted?
OT: I don't think it's worth explaining how to do it, so I'll just give you the code.
This works with ZCMD:
pawn Код:
new bool:ignored[MAX_PLAYERS][MAX_PLAYERS];
public OnPlayerDisconnect(playerid, reason)
{
for(new i = 0; i != MAX_PLAYERS; i++) { ignored[i][playerid] = false; }
return 1;
}
public OnPlayerText(playerid, text[])
{
for(new i = 0; i != MAX_PLAYERS; i++) { if(ignored[i][playerid] == false) { SendPlayerMessageToPlayer(i, playerid, text); } }
return 0;
}
COMMAND:ignore(playerid, params[])
{
new id = strval(params);
if(!IsPlayerConnected(id) || (id == 0 && params[0] != '0')) return SendClientMessage(playerid, 0xFF0000FF, "Invalid ID! (/ignore [id])");
ignored[playerid][id] = !ignored[playerid][id];
if(ignored[playerid][id] == true) SendClientMessage(playerid, 0x00FF00FF, "Succesfully blocked that ID!");
else SendClientMessage(playerid, 0x00FF00FF, "Succesfully unblocked that ID!");
return 1;
}
Didn't really test it but nobody does here anyway. Just give it a go and tell me if it works.