[AJUDA] Apertar F ao entrar
#1

Pessoal eu to com um problema no meu sistema de Apertar F para Equipar/Entrar, as vezes quando eu aperto enter em um carro, aparece que pegou o Crachб e o Uniforme no armбrio, como eu resolvo?
Sistema Inteiro:

pawn Код:
//Forward para verificar F
forward VerificarF(playerid);
public VerificarF(playerid)
{
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) //F de Policiais
    {
        if(PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
        {
            OnPlayerCommandText(playerid, "/batercartao");
            //Create3DTextLabel("Aperte 'F' para Bater Cartгo", COLOR_LIGHTBLUE, 254.5738,77.0317,1003.6406, 10, 0, 0);
        }
        else { return 1; }
    }

    if(PlayerToPoint(1.0, playerid, 361.9731,172.3335,1008.3828)) //Prefeitura
    {
        OnPlayerCommandText(playerid, "/menuempregos");
    }
   
    if(PlayerToPoint(1.0, playerid, 361.7670,174.3943,1008.3893))
    {
        OnPlayerCommandText(playerid, "/adqlicencas");
    }
   
    if(EstanoATM(playerid)) //ATM
    {
        ShowPlayerDialog(playerid, DIALOG_ATM, DIALOG_STYLE_LIST, "Caixa Eletrфnico / 24/7", "Depositar\nSacar\nVerificar Saldo\nTransferir\nRoubar", "OK", "Sair");
    }
    return 1;
}

//OnPlayerKeyStateChange
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) //Enter/F
    {
        OnPlayerCommandText(playerid, "/entrar");
        OnPlayerCommandText(playerid, "/sair");
        CheckForWalkingTeleport(playerid);
        VerificarF(playerid);
    }
Reply
#2

Remova
pawn Код:
PlayerInfo[playerid][pLocal] != 255
e tente !
Reply
#3

pawn Код:
if(PlayerToPoint(1.0, playerid, 361.7670,174.3943,1008.3893))
    {
        IsPlayerInRangeOfPoint(playerid, COORDENADAS DO LOCAL DAS LICENCAS);
        OnPlayerCommandText(playerid, "/adqlicencas");
    }
Se colocar IsPlayerInRangeOfPoint serб que nгo dб certo?Ah, sei lб, se nгo der,nгo sei o que pode ser.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)