SA-MP Forums Archive
[Ajuda] Repetiзгo de mensagens - 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] Repetiзгo de mensagens (/showthread.php?tid=370418)



Repetiзгo de mensagens - Gabriel Santana - 20.08.2012

Vejam a imagem, explica tudo.


Um erro. Na primeira frase й "Quando estou sozinho e coloco o comando '/coletet' ..."

Cуdigo do comando:

pawn Код:
CMD:coletet(playerid)
{
    new Float:X, Float:Y, Float:Z;
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, VERMELHO, "ERRO: Vocк nгo й um adiministrador para usar esse comando.");
    GetPlayerPos(playerid, X, Y, Z);
    for(new x = 0; x < MAX_PLAYERS; x++) {
    if(IsPlayerInRangeOfPoint(x, 50.0, X, Y, Z))
{
    SetPlayerArmour(x, 100);
    new nome[MAX_PLAYER_NAME], stringnome[300];
    GetPlayerName(playerid, nome, sizeof(nome));
    format(stringnome, sizeof(stringnome), "AdmCMD: O jogador %s deu colete a todos perto dele.",nome);
    SendClientMessageToAll(ROXOCLARO, stringnome);
}
}
    return 1;
}



Re: Repetiзгo de mensagens - leonardo1434 - 20.08.2012

pawn Код:
CMD:coletet(playerid)
{
    new Float:X, Float:Y, Float:Z;
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, VERMELHO, "ERRO: Vocк nгo й um adiministrador para usar esse comando.");
    GetPlayerPos(playerid, X, Y, Z);
    for(new x = 0; x < MAX_PLAYERS; x++) {
        if(IsPlayerInRangeOfPoint(x, 50.0, X, Y, Z)) {
            SetPlayerArmour(x, 100);
            new nome[MAX_PLAYER_NAME], stringnome[80];
            GetPlayerName(playerid, nome, sizeof(nome));
            format(stringnome, sizeof(stringnome), "AdmCMD: O jogador %s deu colete a todos perto dele.",nome);
            SendClientMessage(x,ROXOCLARO, stringnome);
        }
    }
    return 1;
}



Re: Repetiзгo de mensagens - Gabriel Santana - 20.08.2012

Vlw.