09.05.2015, 04:13
alguem me ajuda modifica o botao de mirar pelo de atirar
Sim que apenas no botao de atirar para chutar
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);
}
}
}
}