Prevent hydra from shooting missiles - 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: Prevent hydra from shooting missiles (
/showthread.php?tid=159335)
Prevent hydra from shooting missiles -
aNdReSk - 13.07.2010
Hey,
I have a code that destroys the hydra on player press KEY_FIRE
But it doesnt identify Control Key!
I checked the list and I cant tell which one is it :S
is there another way to do this.. because Im guessing players could change they keys to fire the hydra :O and DM when is not needed
Re: Prevent hydra from shooting missiles -
DJDhan - 13.07.2010
There is no effective way to stop a player from using that function of the hydra. If you block one key, he can map that function to another key.
But yes, some new don't know how they can bypass this.
You can use
OnPlayerKeyStateChange to stop him from using a key.
The list of keys that can be detected are found at the wiki
here.
Re: Prevent hydra from shooting missiles -
aNdReSk - 13.07.2010
do u happen to know what control key is named?
Re: Prevent hydra from shooting missiles -
CuervO - 13.07.2010
GetPlayerKeys Combined with
GetVehicleModel
I.E
pawn Код:
if((newkeys & KEY_ACTION) && (GetVehicleModel(GetPlayerVehicleID(playerid) == 520)))
{
...
}
return 1;