How to kick people from their vehicle when they shoot with Hydra
#1

How to kick people when they shoot with Hydra (rockets), I've tried GetPlayerKeys and OnPlayerKeyStateChange,
still I can press W and Shoot, who can help me?
Reply
#2

Why dont you just do it if the player gets kicked when they kill someone? - If thats availiable anyway

Then you can just do (In OnPlayerDeath) kick(killerid)
Reply
#3

You have to check the keys with '&' instead of '==', then it also returns true, if other keys are pressed.

So to check if someone presses the firekey you can use this:

pawn Код:
if( (newkeys & KEY_FIRE) && !(newkeys & KEY_FIRE) )
(Checks if KEY_FIRE is in newkeys, but not in oldkeys)
Reply
#4

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
You have to check the keys with '&' instead of '==', then it also returns true, if other keys are pressed.

So to check if someone presses the firekey you can use this:

pawn Код:
if( (newkeys & KEY_FIRE) && !(newkeys & KEY_FIRE) )
(Checks if KEY_FIRE is in newkeys, but not in oldkeys)
Ahah, thanks man, gotta check it out later
Reply
#5

Remember to check first if the player is in a hydra
Else it would be a mess
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)