SA-MP Forums Archive
[ajuda] /merendo - 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] /merendo (/showthread.php?tid=288532)



[ajuda] /merendo - Raphael_Lima - 08.10.2011

pawn Код:
if(strcmp(cmd, "/merendo", true) == 0)
       {
        if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
              SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
              //ApplyAnimation(playerid,"FINALE","FIN_Land_Die",4.1,0,1,1,1,1); //animaзгo alternativa
              ResetPlayerWeaponsEx(playerid);
              SendClientMessage(playerid, COLOR_LIGHTRED, "   Vocк se Rendeu e jб estб Desarmado. Portanto, se for vнtima de Abusers tire print (F8) e denuncie!!!");
              return 1;
              }
         }
Bom pessoal o que eu to tetando fazer й o seguinte quando o player usa o /merendo ele ser algemado, so que seguinte ele so pode usar isso se ele tiver com nivel de procura ou seja if(WantedPoints[suspect] < 1), ate agora eu nao conseguir apenas conseguir coloca que quando ele usa o /merendo ele ter as armas retiradas.
quem poder me ajudar agradeзo


Re: ajuda /merendo - Bruno Pereira - 08.10.2011

PHP код:
if(strcmp(cmd"/merendo"true) == 0)
       {
new 
LevelProcurado GetPlayerWantedLevel(playerid);
if(
LevelProcurado <= 0)// Se o level de procurado dele for MENOR OU IGUAL a 0 returna essa mensagem \/
return SendClientMessage(playerid, -1"Vocк nгo estб procurado");
        if(
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
              
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
              
//ApplyAnimation(playerid,"FINALE","FIN_Land_Die",4.1,0,1,1,1,1); //animaзгo alternativa
              
ResetPlayerWeaponsEx(playerid);
              
SendClientMessage(playeridCOLOR_LIGHTRED"   Vocк se Rendeu e jб estб Desarmado. Portanto, se for vнtima de Abusers tire print (F8) e denuncie!!!");
              return 
1;
              }
         } 



Re: ajuda /merendo - Raphael_Lima - 08.10.2011

Muito obrigado Bruno deu certo.
eu queria que assim que usar se o comando /merendo, ele seja algemado.
falta so isso para concluir


Re: ajuda /merendo - Bruno Pereira - 08.10.2011

Coloca no comando:

TogglePlayerControllable(playerid, 0);

Assim congela o player ! Use 1 para descongelar e 0 pra congelar!


Re: ajuda /merendo - Raphael_Lima - 08.10.2011

ja fiz isso antes, so que problema й que ele perde o anime. quando congela


Re: ajuda /merendo - Vai_Besta - 08.10.2011

Tente congelar e dps aplicar o anim


Re: ajuda /merendo - Raphael_Lima - 08.10.2011

desse jeito, ja tentei ele congela ae vem o anime, ae aperta F e sai do anime e nao fica mais congelado


Re: ajuda /merendo - Lуs - 08.10.2011

pawn Код:
new Rendido[MAX_PLAYERS];

if(strcmp(cmd, "/merendo", true) == 0)
{
    new LevelProcurado = GetPlayerWantedLevel(playerid);
    if(LevelProcurado <= 0) return SendClientMessage(playerid, -1, "Vocк nгo estб procurado");
    if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
        //ApplyAnimation(playerid,"FINALE","FIN_Land_Die",4.1,0,1,1,1,1); //animaзгo alternativa
        ResetPlayerWeaponsEx(playerid);
        SetTimerEx("MeRendo", 1000, 0, "i", playerid);
        Rendido[playerid] = 1;
        SendClientMessage(playerid, COLOR_LIGHTRED, "   Vocк se Rendeu e jб estб Desarmado. Portanto, se for vнtima de Abusers tire print (F8) e denuncie!!!");
        return 1;
    }
}

forward MeRendo(playerid)
public MeRendo(playerid)
{
    TogglePlayerControllable(playerid, 0);
    return 1;
}
Na key de sair da animaзгo, use:

pawn Код:
if(Rendido[playerid] == 1) return 0;