[HELP] Height Limit & Remove in-game pickup
#1

How to set a height limit for a certain player, so he could fly higher? How to remove a jetpack pickup, which appears after a player leaves it?
Reply
#2

You can't.
Reply
#3

First impossible. Second you need to use SetPlayerSpecialAction(playerid, 0); while he is still using it. On key change check is his special action 2, if yes set it to 0
Reply
#4

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
First impossible. Second you need to use SetPlayerSpecialAction(playerid, 0); while he is still using it. On key change check is his special action 2, if yes set it to 0
When a player presses F, jetpack pickup appears. I can't SetPlayerAction(playerid, 0) just before he presses F because I don't know when he is going to press the key. If I apply some code after he presses F key, there is no meaning in setting special action to 0, because it's already 0 and it also doesn't help to remove the jetpack pickup. Maybe your technique works and it's me, who don't get the idea. Thanks for further explanation.
Reply
#5

Set a variable which indicates whether the player has a jetpack or not. This variable should be set to false under OnPlayerKeyStateChange when the person presses the F key and when you set it to 0, teleport the player to a random position in the sky and then teleport them back. The pickup should be gone.
Reply
#6

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
Set a variable which indicates whether the player has a jetpack or not. This variable should be set to false under OnPlayerKeyStateChange when the person presses the F key and when you set it to 0, teleport the player to a random position in the sky and then teleport them back. The pickup should be gone.
Changed position as you said, interior, virtual world as well and it did not help. You solution is simply not working at all. Any other suggestions?
Reply
#7

It's not likely possible without having the pickup streamed out (usually by players walking far distances away from it), because the 'Press F to remove jetpack' is hard-coded into GTA itself and therefore is being called before any callbacks like OnPlayerKeyStateChange... You are correct when you say, 'by the time OnPlayerKeyStateChange is even being called, the jetpack is already removed'.
Reply
#8

It doesn't actually even destroy when it streams out.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)