SA-MP Forums Archive
[Pedido] Comando /addwanted [id] [Stars] - 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: [Pedido] Comando /addwanted [id] [Stars] (/showthread.php?tid=493788)



Comando /addwanted [id] [Stars] - MorreJaa - 09.02.2014

boas ando a procura de um comando que alguem escreve:

/wanted [id] [star] (ou seja)

/wanted 1 6 (o policial adiciona 6 estrelas ao id 1 para ele ficar procurado) alguem me arranja? +1 obrigado desde jб


Re: Comando /addwanted [id] [Stars] - Gii - 09.02.2014

pawn Код:
CMD:addwanted(playerid, params[]) {

    static
        id,
        nivel
    ;
   
    if (sscanf(params, "ui", id, nivel))
        return SendClientMessage(playerid, -1, "Use /addwanted [id/nome] [nнvel de procura]");
       
    if (!IsPlayerConnected(id))
        return SendClientMessage(playerid, -1, "Jogador offline!");
       
    if ( nivel < 1 || nivel > 6 )
        return SendClientMessage(playerid, -1, "Nнvel invбlido!");
       
    SetPlayerWantedLevel(id, (GetPlayerWantedLevel(id) + nivel) );
   
    static
        nome[24],
        str[67]
    ;

    GetPlayerName(id, nome, 24);

    format (str, 67, "Vocк adicionou %d nнveis de procura em %s!", nivel, nome);
    SendClientMessage(playerid, -1, str);
   
    GetPlayerName(playerid, nome, 24);

    format (str, 67, "%s lhe atribuiu %d nнveis de procura!", nome, nivel);
    SendClientMessage(id, -1, str);

    return 1;
}
Quote:
Originally Posted by Bruno13
Посмотреть сообщение
pawn Код:
return SendClientMessage(playerid, -1, "Use /addwanted [id/nome] [nнvel de procura]");
Estava faltando um "t" em "Client"...



Re: Comando /addwanted [id] [Stars] - MorreJaa - 09.02.2014

obrigado +1


Re: Comando /addwanted [id] [Stars] - Bruno13 - 09.02.2014

Quote:
Originally Posted by MorreJaa
Посмотреть сообщение
obrigado +1
pawn Код:
return SendClientMessage(playerid, -1, "Use /addwanted [id/nome] [nнvel de procura]");
Estava faltando um "t" em "Client"...