Need help with SetPlayerSpecialAction - 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)
+--- Thread: Need help with SetPlayerSpecialAction (
/showthread.php?tid=604378)
Need help with SetPlayerSpecialAction -
danielpalade - 03.04.2016
I have made the command /jetpack which spawns a jetpack using SetPlayerSpecialAction.
Now how can I make it so when you exit the jetpack, it despawns it?
Re: Need help with SetPlayerSpecialAction -
DTV - 04.04.2016
I don't believe this is possible.
Re: Need help with SetPlayerSpecialAction -
itsCody - 04.04.2016
I don't think you can but I'm sure clearing their animations should despawn it?
Re: Need help with SetPlayerSpecialAction -
danielpalade - 04.04.2016
Quote:
Originally Posted by itsCody
I don't think you can but I'm sure clearing their animations should despawn it?
|
I've tried. It doesn't.
Re: Need help with SetPlayerSpecialAction -
introzen - 04.04.2016
PHP код:
new jetpack[MAX_PLAYERS];
CMD:jetpack(playerid, params[]){
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
jetpack[playerid] = 1;
}
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_SECONDARY_ATTACK) && jetpack[playerid] == 1) {
SetPlayerSpecialAction(playerid, 0);
jetpack[playerid] = 0;
}
return 1;
}