Calar Nao Funciona -
Luucass - 07.08.2013
quando digita /calar ele aparece o texto q o user foi calado , mais ele continua falando , quando usa o mp ele fala q ta calado ? oq pode ta acontecendo
CMD's
/calar
pawn Код:
COMMAND:calar(playerid, params[])
{
new Msg[128], Name[24], AdminName[24], Reason[128], OtherPlayer;
SendAdminText(playerid, "/calar", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 1)
{
if (sscanf(params, "us[128]", OtherPlayer, Reason)) SendClientMessage(playerid, 0xFF0000AA, "Use: /calar [id] [motivo]");
else
{
if (IsPlayerConnected(OtherPlayer))
{
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(OtherPlayer, Name, sizeof(Name));
APlayerData[OtherPlayer][Muted] = true;
format(Msg, 128, "{FF0000}-| %s foi calado por %s. Motivo: %s |-", Name, AdminName, Reason);
SendClientMessageToAll(0xFFFFFFFF, Msg);
PlayerFile_Save(OtherPlayer);
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}O jogador nгo estб online.");
}
}
else
return 0;
}
else
return 0;
return 1;
}
OnPlayerText
pawn Код:
public OnPlayerText(playerid, text[])
{
// Block the player's text if he has been muted
if (APlayerData[playerid][Muted] == true)
{
// Let the player know he's still muted
SendClientMessage(playerid, 0xFFFFFFFF, "{808080}Voce estб Mudo Agora.");
// Don't allow his text to be sent to the chatbox
return 1;
}
return 1;
}
Espero que alguйm me ajude
Re: Calar Nao Funciona -
humildadeforever - 07.08.2013
Troque o PRIMEIRO return 1; por return 0; (na OnPlayerText)
Re: Calar Nao Funciona -
iFox - 07.08.2013
Modifique sua public OnPlayerText para esta:
PHP код:
public OnPlayerText(playerid, text[])
{
// Block the player's text if he has been muted
if (APlayerData[playerid][Muted] == true)
{
// Let the player know he's still muted
SendClientMessage(playerid, 0xFFFFFFFF, "{808080}Voce estб Mudo Agora.");
// Don't allow his text to be sent to the chatbox
return 0;
}
return 1;
}
Re: Calar Nao Funciona -
Luucass - 07.08.2013
Opps Continua a mesma coisa !
Re: Calar Nao Funciona -
mau.tito - 07.08.2013
Bota no comeзo da callback a msg que ta calado .
pawn Код:
public OnPlayerText(playerid, text[])
{
if (APlayerData[playerid][Muted] == true)return SendClientMessage(playerid, 0xFFFFFFFF, "{808080}Voce estб Mudo Agora.");
return 1;
}
Re: Calar Nao Funciona -
Luucass - 07.08.2013
@mau.tito
continua ! podendo falar
Re: Calar Nao Funciona -
Luucass - 08.08.2013
Up ?
Re : Calar Nao Funciona -
ThiagoMK - 08.08.2013
Tenta ai й do ppc_trucking
pawn Код:
COMMAND:calar(playerid, params[])
{
new Msg[128], Name[24], AdminName[24], Reason[128], OtherPlayer;
SendAdminText(playerid, "/calar", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 1)
{
if (sscanf(params, "us[128]", OtherPlayer, Reason)) SendClientMessage(playerid, 0xFF0000AA, "Use: /calar [id] [motivo]");
else
{
if (IsPlayerConnected(OtherPlayer))
{
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(OtherPlayer, Name, sizeof(Name));
APlayerData[OtherPlayer][Muted] = true;
format(Msg, 128, "{FF0000}-| %s foi calado por %s. Motivo: %s |-", Name, AdminName, Reason);
SendClientMessageToAll(0xFFFFFFFF, Msg);
PlayerFile_Save(OtherPlayer);
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}O jogador nгo estб online.");
}
}
else
return 0;
}
else
return 0;
return 1;
}
pawn Код:
public OnPlayerText(playerid, text[])
{
// Block the player's text if he has been muted
if (APlayerData[playerid][Muted] == true)
{
// Let the player know he's still muted
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк ainda estб mudo.");
// Don't allow his text to be sent to the chatbox
return 0;
}
return 1;
}
Re: Calar Nao Funciona -
Juniiro3 - 08.08.2013
pawn Код:
public OnPlayerText(playerid, text)
{
new Msg[128], Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, );
// Block the player's text if he has been muted
if (APlayerData[playerid][Muted] == true)
{
// Let the player know he's still muted
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк ainda estб mudo.");
// Don't allow his text to be sent to the chatbox
return 0;
}
else
{
format(Msg, sizeof(Msg), "%s: {FFFFFF}%s", Nome, text);
SendClientMessageToAll(GetPlayerColor(playerid), Msg)
return 1;
}
return 0; // AQUI RETORNA ZERO NA PPC TRUCK
}
OBS: tu baixou o BR truck nй? OU foi o TOB? Esses dois sгo bugadхes, tu vai ter mo trabalho para desbugar.