[Question] stop vehicle
#10

Quote:
Originally Posted by HellSphinX
Посмотреть сообщение
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(PRESSED(KEY_CROUCH))
    {
        if(IsPlayerInAnyVehicle(playerid)) // checks if playrid in a vehicle
        {
            new
                Float:x,
                Float:y,
                Float:z,
                playerveh = GetPlayerVehicleID(playerid); // gets the id of the player's vehicle and store it into playerveh so we can use it in Get/SetVehiclePos
                GetVehiclePos(playerveh, x, y, z);
                SetVehiclePos(playerveh, x, y, z + 2.0);
        }
    }
    return 1;
}

Edit:



No, the vehicle won't go forward actually it will stop (That's tested).
It's strange, why are you setting vehicle pos? if you want to stop the vehicle you could just stop the engine... SetVehicleParamsForPlayer.

-FalconX
Reply


Messages In This Thread
topic can delete - by mickos - 09.06.2012, 08:58
Re: [Question] stop vehicle - by [KHK]Khalid - 09.06.2012, 09:00
Re: [Question] stop vehicle - by mickos - 09.06.2012, 09:02
Re: [Question] stop vehicle - by [KHK]Khalid - 09.06.2012, 09:08
topic can delete - by mickos - 09.06.2012, 09:37
Re: [Question] stop vehicle - by [KHK]Khalid - 09.06.2012, 09:47
topic can delete - by mickos - 09.06.2012, 09:55
Re: [Question] stop vehicle - by BlackBank - 09.06.2012, 10:05
Re: [Question] stop vehicle - by [KHK]Khalid - 09.06.2012, 10:05
Re: [Question] stop vehicle - by FalconX - 09.06.2012, 10:13

Forum Jump:


Users browsing this thread: 5 Guest(s)