Jump to content

Locking and unlocking doors


Recommended Posts

hi pls i cleaned up this NATIVE for lock/unlock doors:

 

static void SetStateOfClosestDoorOfType(u32 DoorModel, f32 x, f32 y, f32 z, i32 unknownTrue, f32 unknown0) { NativeInvoke::Invoke<NATIVE_SET_STATE_OF_CLOSEST_DOOR_OF_TYPE, ScriptVoid>(DoorModel, x, y, z, unknownTrue, unknown0); }

 

Now, problem is, how to use it. Do you have some idea ? What with DoorModel ? What with X, Y, Z ?

Link to comment
https://gtaforums.com/topic/462185-locking-and-unlocking-doors/
Share on other sites

oh thanks but i have still problem, my script wont lock prison doors

my code:

 

f32 x,y,z;    GetCharCoordinates(GetPlayerPed(), &x,&y,&z);           SetStateOfClosestDoorOfType(0x2639ABCC, x, y, z, 0, 0.0f);

 

probably, i dont have valid HashModel

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.