27.09.2012, 17:10
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:
Didn't really test it but nobody does here anyway. Just give it a go and tell me if it works.
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;
}