Is it possible?
#1

to limit hydra missiles to 1 missile per 1 second?
Reply
#2

I don't think so. Why do you wanna do that anyway?
Reply
#3

Players are spamming hydra missles , which is kinda unfair
Reply
#4

if a player spams missiles (presses key_fire more than once per second), then freeze him for 2 seconds: this way players will get it smashed into their brain: spam==pain;
pawn Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys){
    if (!(oldkeys & KEY_ACTION) && (newkeys & KEY_ACTION))
    {
        new Tick=GetTickCount();
        if(Tick-GetPVarInt(playerid,"LastMissileMS")<1000)
        {
            SetPVarInt(playerid,"LsstMissileMS",Tick+1000);
            TogglePlayerControllable(playerid,0);
            GameTextForPlayer(playerid,"dont spam",500,5);
        }
        else
        {
            SetPVarInt(playerid,"LastMissileMS",Tick);
            TogglePlayerControllable(playerid,1);
            GameTextForPlayer(playerid,"be careful",500,5);
        }
//your stuff
}
...quickly smashed this together, tested, and it kindof works:
i figured out a bug or glitch, where the key_action (rocket on hydra, shown as "key secondary fire" in options) gets recognized in a different way when a player got frozen inside a vehicle, its like on foot controls then. the thing you will need to add, is a check for the normal key_fire key (punch on foot) aswell, to unfreeze a player (togglecontrollable 1 then)...
@edited a bit, accidently swapped key_action with key_fire hehe
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)