SA-MP Forums Archive
Have a car door stay open? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Have a car door stay open? (/showthread.php?tid=398140)



Have a car door stay open? - Cpt.Falcon - 08.12.2012

Hi everyone.

I am making a script in wich I am trying to open a car door. When I use UpdateVehicleDamageStatus the driver just opens the door and closes it right after. I want it to stay open like this: [ame]http://www.youtube.com/watch?v=i9rblKg2Hik[/ame]

I know this is a cleo script or something but I want do it without mods, just with samp scripting.

Does any of you know how to pull this off?

Thanks in advance!


Re: Have a car door stay open? - Guest9328472398472 - 08.12.2012

Some you use commands (hood and trunk) the doors can be done by default, not sure if there is a command for the doors though. But it's possible to open the trunk and good if you script it right.


Re: Have a car door stay open? - tyler12 - 08.12.2012

Not possible with doors. You can open / close hood / trunk using SetVehicleParamsEx (Doors in there mean's locking them).


Re: Have a car door stay open? - Threshold - 08.12.2012

Try using UpdateVehicleDamageStatus during:
OnPlayerStateChange and,
OnPlayerEnterVehicle

Example:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        //Open Door
    }
    return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(ispassenger == 0)
    {
         //Open driver door
    }
    else if(ispassenger == 1)
    {
        //Open passenger door
    }
    return 1;
}
Sorry I can't do the whole UpdateVehicleDamageStatus, I don't have that much time on my hands.


Re: Have a car door stay open? - Landon - 08.12.2012

I am pretty sure this ain't possible to car doors yet.


Re: Have a car door stay open? - Guest9328472398472 - 08.12.2012

Same here, I only know hoods and trunk are possible. Unless your using some sort of CLEO mod


Re: Have a car door stay open? - Threshold - 08.12.2012

It's not possible to open doors through script?
Read through UpdateVehicleDamageStatus...

https://sampwiki.blast.hk/wiki/UpdateVehicleDamageStatus


Re: Have a car door stay open? - Cpt.Falcon - 08.12.2012

I know about updatevehicledamagestatus and that it allows you to "open" a door but right after close it again. But my problem is that I want it to remain open.