SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 11/06/2012, 01:20 PM   #1
goku114
Big Clucker
 
Join Date: Apr 2012
Posts: 168
Reputation: 9
Default [Ajuda]Comando

pawn Code:
CMD:Reportar(playerid, params[])
{
    new id;
    new texto[128];
    new Str[128];
    new inome[MAX_PLAYER_NAME];
    new nome[MAX_PLAYER_NAME];
    if(sscanf(params,"us",id,texto)) return SendClientMessage(playerid,-1,"USE: /reportar [id] [motivo]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Player não conectado");
    GetPlayerName(id,inome,MAX_PLAYER_NAME);
    GetPlayerName(id,nome,MAX_PLAYER_NAME);
    SendClientMessage(playerid,-1,"Obrigado Por Reportar...");
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerAdmin(i))
        {
            format(Str, sizeof(Str),"AVISO: %s reportou %s motivo: %s",nome,inome,texto);
            SendClientMessage(i, -1,Str);
        }
    }
    return true;
}

o problem e que nao manda para admin,

aqui como seria o meu admin

if(PlayerDados[playerid][Admin] < 0)
goku114 is offline   Reply With Quote
Old 11/06/2012, 01:23 PM   #2
Crueliz0n
Gangsta
 
Crueliz0n's Avatar
 
Join Date: May 2012
Location: Madagascar
Posts: 514
Reputation: 36
Default Re: [Ajuda]Comando

pawn Code:
CMD:Reportar(playerid, params[])
{
    new id;
    new texto[128];
    new Str[128];
    new inome[MAX_PLAYER_NAME];
    new nome[MAX_PLAYER_NAME];
    if(sscanf(params,"us",id,texto)) return SendClientMessage(playerid,-1,"USE: /reportar [id] [motivo]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Player não conectado");
    GetPlayerName(id,inome,MAX_PLAYER_NAME);
    GetPlayerName(id,nome,MAX_PLAYER_NAME);
    SendClientMessage(playerid,-1,"Obrigado Por Reportar...");
    for(new i; i < MAX_PLAYERS; ++i)
    {
        if(PlayerDados[playerid][Admin] > 0)
        {
            format(Str, sizeof(Str),"AVISO: %s reportou %s motivo: %s",nome,inome,texto);
            SendClientMessage(i, -1,Str);
        }
    }
    return true;
}
__________________


Crueliz0n is offline   Reply With Quote
Old 11/06/2012, 01:25 PM   #3
Ades
Gangsta
 
Ades's Avatar
 
Join Date: May 2012
Location: Ji-Parana - RO ,Brazil
Posts: 664
Reputation: 56
Default Re: [Ajuda]Comando

Era so você substituir por sua variável admin ...

Ou seja :

pawn Code:
if(IsPlayerAdmin(i))

por esse :

pawn Code:
if(PlayerDados[playerid][Admin] > 0)
__________________
Voltei do inferno !
Ades is offline   Reply With Quote
Old 11/06/2012, 01:25 PM   #4
goku114
Big Clucker
 
Join Date: Apr 2012
Posts: 168
Reputation: 9
Default Re: [Ajuda]Comando

Quote:
Originally Posted by BlackDonelly View Post
pawn Code:
CMD:Reportar(playerid, params[])
{
    new id;
    new texto[128];
    new Str[128];
    new inome[MAX_PLAYER_NAME];
    new nome[MAX_PLAYER_NAME];
    if(sscanf(params,"us",id,texto)) return SendClientMessage(playerid,-1,"USE: /reportar [id] [motivo]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Player não conectado");
    GetPlayerName(id,inome,MAX_PLAYER_NAME);
    GetPlayerName(id,nome,MAX_PLAYER_NAME);
    SendClientMessage(playerid,-1,"Obrigado Por Reportar...");
    for(new i; i < MAX_PLAYERS; ++i)
    {
        if(PlayerDados[playerid][Admin] > 0)
        {
            format(Str, sizeof(Str),"AVISO: %s reportou %s motivo: %s",nome,inome,texto);
            SendClientMessage(i, -1,Str);
        }
    }
    return true;
}
vlw, tinha tentado assim antes mais dava erro
goku114 is offline   Reply With Quote
Old 11/06/2012, 01:27 PM   #5
Schocc
High-roller
 
Schocc's Avatar
 
Join Date: Mar 2012
Location: Matrix Revolutions Exp:|█
Posts: 1,664
Reputation: 111
Default Re: [Ajuda]Comando

Use assim
pawn Code:
if(PlayerDados[playerid][Admin] >= 1)//Se for adm maior ou igual que level 1 mude aqui para o level desejado
__________________
Programador: iShock
Nivel: ███

#OFF: To pensando em colocar o NGF pra download, e para isso preciso da ajuda de um mapper Professional. envie-me uma PM

Gamemodes em dev.
NGF Oficial
Status: offline
Schocc is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[AJUDA] como fazer /comando id ou /comando texto Twisty_ Português/Portuguese 6 09/03/2012 12:37 AM
[Ajuda] Comando dentro de comando? arakuta Português/Portuguese 9 22/07/2011 08:48 AM
[AJUDA] faser comando /gmx e quando digitar comando errado, surgir messgem ( comando inexistest) SERRA93 Português/Portuguese 5 14/07/2011 09:44 PM
[AJUDA] Tirar o comando de PROCESSADOR para comando normal ! ! ! lucas_mdr1235 Português/Portuguese 5 05/05/2011 06:57 PM
[Ajuda] Comando de /equipar (mesmo comando, um texto para cada org) danqueiroz Português/Portuguese 9 21/04/2010 11:34 PM


All times are GMT. The time now is 06:50 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.