16.06.2015, 15:02
Hi how to make a untispam for key binder program mute or kick who use it
new muted[MAX_PLAYERS]; //on top of the script
CMD:muteplayer(playerid, param[])
{
new ID;
if(sscanf(params, "%u", ID))
{
//code here
retrun 1;
}
muted[ID] = 1;
return 1;
}
and in on player text write this
if(muted[playerid] == 1)
{
SendClientMessage(playerid, -1, "You are muted");
return 0;
}
//remember to return 0 OnPlayerText so it'll work
You shouldn't post solution that are unreliable because you "think"
OT: You could use a variable or an enum to store if the player is muted or not and then use OnPlayerText to not allow the player to speak. for example pawn Код:
|