SA-MP Forums Archive
[Ajuda] Sistema aqui 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] Sistema aqui OnPlayerText (/showthread.php?tid=500106)



Sistema aqui OnPlayerText - rCr - 11.03.2014

Bem, queria fazer algo que й encontrado em servidores RPG. o cara fala e sу que vк o que ele falou й quem ta perto dele. Seguindo a lуgica de minha programaзгo HARD, consegui fazer isso kk :

pawn Code:
public OnPlayerText(playerid, text[])
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);

    for( new i = 0; i <MAX_PLAYERS; i++)
    {
        if(IsPlayerInRangeOfPoint( i , 0.5, x, y, z ));
        {
            {
                new var[100], name[80];
                GetPlayerName(playerid, name, 80);
                format(var, sizeof(var), "%s Diz: %s", name, playerid, text);
                SendClientMessage(i, Branco ,var);
                return true;
            }
        }
    }

    return 0;
}
sу que infelizmente deu erro. error 036: empty statement.
e foi na linha que verifica se os players estгo prуximos ao cara que falou
if(IsPlayerInRangeOfPoint( i , 0.5, x, y, z ));

se alguem puder da uma ajuda ai. !


Re: Sistema aqui OnPlayerText - Sky™ - 11.03.2014

pawn Code:
if(IsPlayerInRangeOfPoint( i , 0.5, x, y, z ));
Condicionais nгo usam ;
tire o ; e seja feliz ^^

pawn Code:
if(IsPlayerInRangeOfPoint( i , 0.5, x, y, z ))



Re: Sistema aqui OnPlayerText - rCr - 11.03.2014

caralho era sу isso ?
vlw bro .-.