Hop Command
#4

pawn Код:
//Top of script
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_SUBMISSION)) // change this to what you want
    {
    new Float:x, Float:y, Float:z; new vehicle=GetPlayerVehicleID(playerid);
    if(IsPlayerInAnyVehicle(playerid))
    {
        GetVehicleVelocity(vehicle,x,y,z);
        SetVehicleVelocity(vehicle,x,y,z+2); // change the +2 with the height you want
    }
    else
    {
        GetPlayerVelocity(playerid, x, y, z);
        SetPlayerVelocity(playerid, x, y, z + 2.0); //remove this if you dont want to hop with player
    }
    }
    return 1;
}
Reply


Messages In This Thread
Hop Command - by fiki574 - 23.05.2011, 08:27
Re: Hop Command - by fiki574 - 23.05.2011, 08:46
Re: Hop Command - by fiki574 - 23.05.2011, 10:06
Re: Hop Command - by Wesley221 - 23.05.2011, 10:42
Re: Hop Command - by fiki574 - 23.05.2011, 16:47
Re: Hop Command - by Wesley221 - 23.05.2011, 17:20
Re: Hop Command - by fiki574 - 23.05.2011, 17:44
Re: Hop Command - by Mauzen - 23.05.2011, 17:55
Re: Hop Command - by fiki574 - 23.05.2011, 18:07
Re: Hop Command - by Mauzen - 23.05.2011, 18:11

Forum Jump:


Users browsing this thread: 5 Guest(s)