SA-MP Forums Archive
Which Callback concerns JetPack removal - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Which Callback concerns JetPack removal (/showthread.php?tid=255231)



Which Callback concerns JetPack removal - Spectre - 14.05.2011

Just curious if anyone knows which Callback is activated upon Jetpack removal...
The reason I ask is this...

If I acquire and remove a JetPack via the OnPlayerCommandText all goes well...
The Jetpack actually disappears upon removal...

if(strcmp(cmd,"/JET",true)==0){
SetPlayerSpecialAction(playerid,2);
return 1;}

if(strcmp(cmd,"/JETNO",true)==0){
if(GetPlayerSpecialAction(playerid)==2){
new Float:jetx,Float:jety,Float:jetz;
GetPlayerPos(playerid,jetx,jety,jetz);
SetPlayerPos(playerid,jetx,jety,jetz);
SetPlayerSpecialAction(playerid,0);}
return 1;}

Further, I use Incognito's streamer and putting the "JETNO" code in the OnPlayerLeaveDynamicArea works as well...

However, while hitting the regular old assigned Enter/Exit Vehicle key DOES remove the Jetpack, is not satisfactory as it leaves the Jetpack visible and re-accessible...

I have put "checks" in the OnPlayerExitVehicle, OnPlayerSpecialAction, OnPlayerStateChange and OnPlayerUpdate but none of them trigger...
What am I missing?

Can anyone shed some light on this troublesome conundrum?

You can reply to nighthawk231@yahoo.com as well...

Thanx in advance...


Re: Which Callback concerns JetPack removal - LetsOWN[PL] - 14.05.2011

I don't think, that it is possible at all. But maybe.. I don't know, I never needed that.


Re: Which Callback concerns JetPack removal - Spectre - 15.05.2011

Bump and Edit

Well, I have found at least that rather than mucking about with that tedious Get/Set positions that this works just as well...Removes the Jetpack AND destroys it immediately...

if(strcmp(cmd,"/JETNO",true)==0){
if(GetPlayerSpecialAction(playerid)==2){
ClearAnimations(playerid);}
return 1;}

Still, the enter/exit vehicle routine does not...

I'm trying to find a way to block the enter/exit routine from doing anything concerning the Jetpack...