if x do nothing
#1

Question, how can I make if something is true it will do nothing?

I want to make a vehicle lock and I want that if he tries to enter a locked vehicle it will do nothing? Do ClearAnimations work, like to stop him from entering the vehicle.
Reply
#2

Show code
Reply
#3

Quote:
Originally Posted by AndreiWow
Посмотреть сообщение
Question, how can I make if something is true it will do nothing?

I want to make a vehicle lock and I want that if he tries to enter a locked vehicle it will do nothing? Do ClearAnimations work, like to stop him from entering the vehicle.
Clearing one's animation is enough
Reply
#4

Quote:
Originally Posted by kelvinis
Посмотреть сообщение
Show code
I didn't make it yet, I just asked if I can use clearplayeranimations to stop a player from entering a vehicle, I want to make a lock system and I am not sure how to stop the player from entering the vehicle if it is locked, what method to use not how to script it.
Reply
#5

Add like on player enter vehicle check if it's locked something similar..
PS:you can use playerstate method too and after your code to remove player use
PHP код:
RemovePlayerFromVehicle(playerid); 
Reply
#6

Use this callback: https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle
If the vehicleid is locked, use https://sampwiki.blast.hk/wiki/ClearAnimations
Reply
#7

Why not use SetVehicleParamsEx and actually lock the vehicle's door?
Reply
#8

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
Why not use SetVehicleParamsEx and actually lock the vehicle's door?
Oh damn... totally forgot about that, thanks alot.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)