SA-MP Forums Archive
[Ajuda] colocar comando em dialog - 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] colocar comando em dialog (/showthread.php?tid=622753)



colocar comando em dialog - didimk157 - 26.11.2016

PHP код:
 dcmd_trazertodos(playerid, params[])
{
    
#pragma unused params
    
if(Player[playerid][pAdmin] >= 5 || Player[playerid][pFrente] >= 1)
    {
        new 
Float:X,Float:Y,Float:Z;
        
GetPlayerPos(playerid,X,Y,Z);
        for(new 
i = 0; i < MAX_PLAYERS; i ++)
        {
            if(
IsPlayerConnected(i))
            {
                if(
Player[playerid][pFaccoes] == Player[i][pFaccoes])
                {
                    new 
String[256];
                    
SetPlayerPos(i, X+1, Y+1, Z);
                    
format(String, sizeof(String), "O {FF0000}%s:{FFFFD2} Trouxe Todos da Facзгo ! ", getPName(playerid));
                    
SendClientMessage(i, COR_INFO, String);
                }
            }
        }
    }
    else
    {
        if(
Player[playerid][pAdmin] < 5) return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo tem permissгo para usar este comando!");
        if(
Player[playerid][pFrente] < 1) return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo tem permissгo para usar este comando!");
    }
    return 
1;
} 
tipo o frente fulano esta chamando para guerra aceita ser puxado sim ou nгo