24.12.2018, 17:07
(
Последний раз редактировалось StRaphael; 24.12.2018 в 18:28.
)
Try to do something like this:
hope I helped you!
PHP код:
#include <sscanf2>
#include <zcmd>
new pBlockedID[MAX_PLAYERS];
CMD:blockplayer(playerid, params[])
{
new id;
if(sscanf(params, "u", id) return SendClientMessage(playerid, -1, "Syntax: /blockplayer <id/playername>");
pBlockedID[playerid] = id;
SendClientMessage(playerid, -1, "You blocked succesfully the player!");
}
public OnPlayerText(playerid, text[])
{
foreach(new i: Player)
{
if(i==pBlockedID[playerid])// checks if the player who send message is blocked
{
return 1;
}
else SendClientMessage(i, COLOR, text);
}
return 0;
}