Removing train controls from a player
Hello :)
Is it possible to revoke access to a train, while it's being used? Example: 1. Player pushes E on train controls to drive train. 2. Custom block trigger is enabled for specific player ID. 3. Player is removed from train controls, making the hud for it disappear. 4. Player is blocked from using train controls again for that entity. Any help is greatly appreciated! |
Re: Removing train controls from a player
Try to execute Ham_Use on player. I think this will force the player to release the train. It should be tested.
|
Re: Removing train controls from a player
I think Ham_Use is only for detecting if Use was used.
|
Re: Removing train controls from a player
The most (if not all) of Ham_* can be executed: ExecuteHam/ExecuteHamB
|
Re: Removing train controls from a player
Try with this, should work fine:
PHP Code:
PHP Code:
|
Re: Removing train controls from a player
Thanks! It's pretty close.
I also wanted to remove the controls from the player, so the Vehicle Controls HUD disappears. (Similar to if the player would push E again.) Any idea? |
Re: Removing train controls from a player
Quote:
|
Re: Removing train controls from a player
I've attempted to use ExecuteHam/ExecuteHamB:
Code:
new bool:g_cantUseTrain[ 33 ] = falseMaybe I'm using the function wrong? |
Re: Removing train controls from a player
Sending the Train(0) msg should hide train controls on the player
|
Re: Removing train controls from a player
Yes, it hides the controls while holding down movement keys but the player seems to still be stuck on the controls until pushing E or jumping. Maybe it'd be easier to simulate those keys?
Code:
#include <amxmodx> |
| All times are GMT -4. The time now is 23:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.