Help about something!
#8

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.
Reply


Messages In This Thread
Help about something! - by RyanPetersons - 24.09.2012, 12:08
Re: Help about something! - by RyanPetersons - 27.09.2012, 13:10
Re: Help about something! - by SmithyComp - 27.09.2012, 13:16
Re: Help about something! - by RyanPetersons - 27.09.2012, 15:37
Re: Help about something! - by Jarnu - 27.09.2012, 15:38
Re: Help about something! - by dannyk0ed - 27.09.2012, 15:51
Re: Help about something! - by RyanPetersons - 27.09.2012, 16:05
Re: Help about something! - by Hiddos - 27.09.2012, 17:10

Forum Jump:


Users browsing this thread: 1 Guest(s)