if(IsPlayerInRangeOfPoint(i, 20.0, chatX, chatY, chatZ))
{
if(pInfo[playerid][Preso] > 0)
{
format(cstring, sizeof(cstring), "[PRISIONEIRO] %s diz: %s", GetName(playerid, true), text);
SendClientMessage(i, COLOR_FADE3, cstring);
}
format(cstring, sizeof(cstring), "%s diz: %s", GetName(playerid, true), text);
SendClientMessage(i, COLOR_FADE1, cstring);
}
if(pInfo[playerid][Preso] > 0)
{
format(cstring, sizeof(cstring), "[PRISIONEIRO] %s diz: %s", GetName(playerid, true), text);
SendClientMessage(i, COLOR_FADE3, cstring);
return false;
}
public OnPlayerText(playerid, text[])
{
new name[MAX_PLAYER_NAME]; //Procedimentos da callback
GetPlayerName(playerid, name, sizeof(name));
new strmsg[170];
if(strlen(text) > sizeof(strmsg)) return SendClientMessage(playerid, -1, "Mensagem muito grande");
if(DesLog[playerid] == 0){
format(strmsg, sizeof(strmsg), "%s{00FA9A}[Noob/Guest]{ffffff}: %s", name, text); //Formating
SendClientMessageToAll(-1, strmsg); return 0; //Send to all
}
if(DesLog[playerid] == 1){
format(strmsg, sizeof(strmsg), "%s{FF1493}[Deslogado]{ffffff}: %s", name, text);
SendClientMessageToAll(-1, strmsg); return 0;
}
if(DesLog[playerid] == 2){
format(strmsg, sizeof(strmsg), "%s{00FFFF}[Logado]{ffffff}: %s", name, text);
SendClientMessageToAll(-1, strmsg); return 0;
}
return 1;
}
|
PHP код:
|