[AJUDA] Ao carregar na tecla
#1

Eu ao carregar na tecla do segundo rato, ele voa e morre.

Alguйm me pode ajudar??

Dou ++rep
Reply
#2

kkkkkkkkkkkkkkkkkk
Reply
#3

Quote:
Originally Posted by delete
Посмотреть сообщение
kkkkkkkkkkkkkkkkkk
?
Reply
#4

Explique melhor...
Reply
#5

Й simples, eu estou normalmente...

Posso carregar no Caps Lock, DEL, Segunda tecla do Mouse e ele voa e morre
Reply
#6

Isso acontece quando voce esta dentro de um interior?
Reply
#7

Poste seu OnPlayerKeyStateChange
Reply
#8

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    #define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
    if((PRESSED(KEY_UP) || PRESSED(KEY_DOWN) || PRESSED(KEY_LEFT) || PRESSED(KEY_RIGHT) && !(IsPlayerInAnyVehicle(playerid))))
    {
        new Float:x; new Float:y; new Float:z;
        GetPlayerVelocity(playerid, x, y, z);
        SetPlayerVelocity(playerid, x+7.5, y+7.5, z+7.5);
    }
    if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && gSpectateID[playerid] != INVALID_PLAYER_ID)
    {
        if(newkeys == KEY_JUMP)
        {
            AdvanceSpectate(playerid);
        }
        else if(newkeys == KEY_SPRINT)
        {
            ReverseSpectate(playerid);
        }
    }
    if((newkeys == KEY_FUMARBEBER))
    {
        if(IsSmoking[playerid] > 0)
        {
            IsSmoking[playerid] -= 1;
            Fumar(playerid);
        }
        if(IsDrinking[playerid] > 0)
        {
            IsDrinking[playerid] -= 1;
            Beber(playerid);
        }
    }
else if((newkeys == KEY_SPRINT))
{
    OnPlayerCommandText(playerid,"/entrar");
    OnPlayerCommandText(playerid,"/sair");
    }
    if((newkeys == KEY_MOTOR) && (IsPlayerInAnyVehicle(playerid)))
        {
            if(EngineStatus[GetPlayerVehicleID(playerid)] == 0)
            {
                    OnPlayerCommandText(playerid,"/motor");
            }
        }

else if((newkeys == KEY_SECONDARY_ATTACK))
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        if(EngineStatus[GetPlayerVehicleID(playerid)] == 0)
        {
            SetTimerEx("mala2", 3*1000, false, "i", playerid);
            RemovePlayerFromVehicle(playerid);
            TogglePlayerControllable(playerid, 1);
            new radares2 = radares[playerid];
            KillTimer(radares2);
            if(IsABike(GetPlayerVehicleID(playerid)))
            {
                if(PlayerInfo[playerid][pSeatBelt] == 1)
                {
                    PlayerInfo[playerid][pSeatBelt] = 0;
                    PlayerActionMessage(playerid,15.0,"tira o capacete e pendura no espelho.");
                }
                return 1;
            }
            else if(IsPlayerInAnyVehicle(playerid) == 1)
            {
                if(PlayerInfo[playerid][pSeatBelt] == 1)
                {
                    PlayerInfo[playerid][pSeatBelt] = 0;
                    PlayerActionMessage(playerid,15.0,"tira o cinto de seguranзa.");
                }
                return true;
            }
        }
    }
    //else if (PlayerInfo[playerid][pBebidaAlcolica] = 1){ PlayerInfo[playerid][pBebidaAlcolica] = 0; }
}
else if((newkeys == KEY_SECONDARY_ATTACK))
{
        if (PlayerToPoint(2.0, playerid,361.6392,159.5206,1008.3828) || PlayerToPoint(2.0, playerid,374.8132,188.2278,1008.3893))
        {
        /*
        new Float:x,Float:y,Float:z;
        GetPlayerPos(playerid, x, y, z);
        SetPlayerPos(playerid, x, y, z);*/

        TogglePlayerControllable(playerid, 0);
        TogglePlayerControllable(playerid, 1);
        }
}
Reply
#9

Tente tirar isto
pawn Код:
if((PRESSED(KEY_UP) || PRESSED(KEY_DOWN) || PRESSED(KEY_LEFT) || PRESSED(KEY_RIGHT) && !(IsPlayerInAnyVehicle(playerid))))
    {
        new Float:x; new Float:y; new Float:z;
        GetPlayerVelocity(playerid, x, y, z);
        SetPlayerVelocity(playerid, x+7.5, y+7.5, z+7.5);
    }
Reply
#10

retira isto.
pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
    if((PRESSED(KEY_UP) || PRESSED(KEY_DOWN) || PRESSED(KEY_LEFT) || PRESSED(KEY_RIGHT) && !(IsPlayerInAnyVehicle(playerid))))
    {
        new Float:x; new Float:y; new Float:z;
        GetPlayerVelocity(playerid, x, y, z);
        SetPlayerVelocity(playerid, x+7.5, y+7.5, z+7.5);
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)