[Ajuda] OnPlayerText '.' - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] OnPlayerText '.' (
/showthread.php?tid=387112)
OnPlayerText '.' -
Maklister - 23.10.2012
Bom dia manolos,
Nгo sei o que da dando errado mais quando sou Vip e coloco ". Teste" apare 3 chats, o normal, o proprio do samp, e o vip, era pra aparecer so o VIP pra quem e VIP
code
PHP код:
public OnPlayerText(playerid, text[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(text[0] == '.')
{
new t[128];
if(PlayerInfo[playerid][pVip] == 1)
{
if(PlayerInfo[i][pVip] == 1)
{
format(String, sizeof(String), "™ [ VIP ] %s %s", nome(playerid), t);
SendClientMessage(i, 0xFF80C0AA, String);
return 1;
}
}
}
}
return 0;
}
Re: OnPlayerText '.' -
DrTHE - 23.10.2012
coloca return 0 no chat vip.
Re: OnPlayerText '.' -
Sergiinhonike - 23.10.2012
Bom dia mano, Acho que tem que ser assim:
return SendClientMessage(i, 0xFF80C0AA, String);
Tenta aн..
@EDIT
Ou coloca como co cara aн de cima falou.
Re: OnPlayerText '.' -
Don_Speed - 23.10.2012
Como o DrTHE disse voce precisa colocar o return 0 no chat para que nao ocorra flood!
Re: OnPlayerText '.' -
[BOPE]Seu._.Madruga - 23.10.2012
Eai manin Murilin

vo postar aqui vai
PHP код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '.')
{
if(PlayerInfo[playerid][pVip] == 1)
{
new tmp[148];
new string[148];
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid,aname,sizeof(aname));
strmid(tmp, text, 1, strlen(text));
if(!strlen(tmp))
{
SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}use: . [ Mensagem ]");
return 0;
}
else
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pVip] == 1)
{
format(string, sizeof(string), "™ [ VIP ] %s %s", aname, tmp);
SendClientMessage(i, 0xFF80C0AA, string);
return 0;
}
}
}
}
}
return 0;
}
Tб ae manin =)
Re: OnPlayerText '.' -
Maklister - 23.10.2012
Obrigado ai manolos =)