[Ajuda] Modificar o botao
#1

alguem me ajuda modifica o botao de mirar pelo de atirar

pawn Код:
public iHazardKeys()
{
    new Float:angle, Float:x, Float:y, Float:z;
    for(new playerid = 0; playerid < GetMaxPlayers(); playerid++)
    {
        GetPlayerKeys(playerid, keys, updown, leftright);
        GetObjectPos(BolaDeFutebol, x, y, z);
        GetPlayerFacingAngle(playerid, angle);
        if(keys == KEY_HANDBRAKE && PlayerJogando[playerid] == 1)
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.7, x,y,z))
            {
                GetPlayerPos(playerid, x, y, z);
                GetXYInFrontOfPlayer(playerid, x, y, 7.0);
                MoveObject(BolaDeFutebol, x, y, 10.3156, 10.0);
                ApplyAnimation(playerid, #FIGHT_D, #FightD_1, 4.1, 0, 1, 1, 0, 0);
            }
        }
        else if(keys == KEY_HANDBRAKE + KEY_SPRINT && PlayerJogando[playerid] == 1)
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.7, x,y,z))
            {
                GetPlayerPos(playerid, x, y, z);
                GetXYInFrontOfPlayer(playerid, x, y, 7.0);
                MoveObject(BolaDeFutebol, x, y, 10.3156, 10.0);
                ApplyAnimation(playerid, #FIGHT_D, #FightD_1, 4.1, 0, 1, 1, 0, 0);
            }
        }
    }
}
Sim que apenas no botao de atirar para chutar
Reply
#2

https://sampwiki.blast.hk/wiki/Keys
Reply
#3

Й sу modificar a KEY_HANDBRAKE pela KEY_FIRE

PHP код:
public iHazardKeys()
{
    new 
Float:angleFloat:xFloat:yFloat:z;
    for(new 
playerid 0playerid GetMaxPlayers(); playerid++)
    {
        
GetPlayerKeys(playeridkeysupdownleftright);
        
GetObjectPos(BolaDeFutebolxyz);
        
GetPlayerFacingAngle(playeridangle);
        if(
keys == KEY_FIRE && PlayerJogando[playerid] == 1)
        {
            if(
IsPlayerInRangeOfPoint(playerid1.7x,y,z))
            {
                
GetPlayerPos(playeridxyz);
                
GetXYInFrontOfPlayer(playeridxy7.0);
                
MoveObject(BolaDeFutebolxy10.315610.0);
                
ApplyAnimation(playerid#FIGHT_D, #FightD_1, 4.1, 0, 1, 1, 0, 0);
            
}
        }
        else if(
keys == KEY_FIRE KEY_SPRINT && PlayerJogando[playerid] == 1)
        {
            if(
IsPlayerInRangeOfPoint(playerid1.7x,y,z))
            {
                
GetPlayerPos(playeridxyz);
                
GetXYInFrontOfPlayer(playeridxy7.0);
                
MoveObject(BolaDeFutebolxy10.315610.0);
                
ApplyAnimation(playerid#FIGHT_D, #FightD_1, 4.1, 0, 1, 1, 0, 0);
            
}
        }
    }

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)