How can i do a limit to shot ?..
#1

How can i make if



PlayerInfo[playerid][WeaponSkills] == 1) Wait 10 seconds before new shot
PlayerInfo[playerid][WeaponSkills] == 2) Wait 7 seconds before new shot
PlayerInfo[playerid][WeaponSkills] == 3) Wait 4 seconds before new shot
PlayerInfo[playerid][WeaponSkills] == 4) Wait 2 seconds before new shot


? ...

I don't want to do with ClearAnimations ... for example i would use that animation for gun reload , but how ? i mean how i can do that animation before the fire shot
Reply
#2

Hmm, you could do something like - When player with a weapon skill of 1 shoot with a gun, set armed weapon to fists for the next 10 seconds(timer) or you could make that he CAN shoot but all his bullets will deal zero damage until the timer is killed
Reply
#3

It's not so efficient to try and block the animation. You can just set the gun damage to 0 if he is not supposed to deal damage. Check out this callback: https://sampwiki.blast.hk/wiki/OnPlayerWeaponShot
Returning 0 in there prevents the bullet from doing damage. Of course, you will need a timer to set players ability to shoot to true or false.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)