04.04.2016, 13:23
Quote:
Код:
//top of script #include <a_samp> #include <zcmd> #include <sscanf> new Mute[MAX_PLAYERS]; CMD:fakekick(playerid, params[]) { new ID, targetid; if (sscanf(params, "us[90]", ID)) return SendClientMessage(playerid, 0x1F36E0FF, "USAGE: /fakekick [Playerid/Name]"); if (!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xF50A0AFF, "NOTICE: Player not found."); new string[128]; format(string,sizeof(string),"%s has been kicked by %s for ****** Hacks", PlayerName(ID), PlayerName(playerid)); SendClientMessageToAll(0xAA3333AA, string); SendClientMessage(ID, 0xAA3333AA, "Server closed the connection."); SendDeathMessage(INVALID_PLAYER_ID, playerid, 201); SetPlayerVirtualWorld(playerid, 2); Mute[targetid] = 1; return 1; } public OnPlayerText(playerid, text[]) { if(Mute[playerid] >= 1) { return 0; } return 1; } PlayerName(playerid) { new CName[24]; GetPlayerName(playerid, CName, 24); return CName; } |
You're not using targetid:
PHP код:
new ID, targetid;
PHP код:
if (sscanf(params, "us[90]", ID))
PHP код:
new string[128];
PHP код:
OnPlayerText(playerid, text[])
{
if(Mute[playerid] >= 1)
{
return 0;
}
PHP код:
new bool:Mute[playerid]
PHP код:
Mute[playerid] = true;
PHP код:
Mute[playerid] = false;
PHP код:
Mute[playerid] = !Mute[playerid];
PHP код:
if(Mute[playerid]) // Player is muted
PHP код:
if(!Mute[playerid]) // Player is not muted