Posts: 196
Threads: 71
Joined: Feb 2013
Reputation:
0
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?
Posts: 1,239
Threads: 16
Joined: Mar 2011
Reputation:
0
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
Posts: 1,177
Threads: 27
Joined: Sep 2011
Reputation:
0
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.
Posts: 3,085
Threads: 37
Joined: Nov 2012
Reputation:
0
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'.
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
It doesn't actually even destroy when it streams out.