Block KEY_FIRE - 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: Block KEY_FIRE (
/showthread.php?tid=346223)
Block KEY_FIRE -
ThomasTailor93 - 27.05.2012
Hello,
I want to ask, if there is a possibility to black KEY_FIRE. We tried some ways but it doesn't work. We need to block it, because we want to block the water of a fire truck. I hope, anyone can help.
Regards, ThomasTailor93
Re: Block KEY_FIRE -
MP2 - 27.05.2012
I believe this will work:
pawn Код:
public OnPlayerUpdate(playerid)
{
new model == GetVehicleModel(GetPlayerVehicleID(playerid));
new keys, leftright, updown;
GetPlayerKeys(playerid, keys, leftright, updown);
if(model == FIRETRUCK_MODEL && keys & KEY_FIRE) return 0; // Prevent updates
return 1;
}
But the player will be de-synced while holding KEY_FIRE.