blocking weapon switch reload - 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: blocking weapon switch reload (
/showthread.php?tid=255569)
blocking weapon switch reload -
xDeadlyBoy - 16.05.2011
when i'm swithcing weapons they are auto reloading... how can i block it?
Re: blocking weapon switch reload -
Raimis_R - 16.05.2011
I think you can't.
Re: blocking weapon switch reload -
xDeadlyBoy - 16.05.2011
i'm sure i can. i just don't know how. but i saw servers that did it.
Re: blocking weapon switch reload -
Mauzen - 16.05.2011
You would have to rewrite the ammo system. Just give the player one full clip at once, store the real total ammo in a variable. Everytime the player reloads (make a callback with GetPlayerWeaponState) give him a full clip, and decrease the ammo variable. You could use e.g. a TextDraw to show the ammo left.
Cant think of another way to do this atm.
Re: blocking weapon switch reload -
xDeadlyBoy - 16.05.2011
ok, ill check it out
edit: SetPlayerAmmo doesn't work...
Re: blocking weapon switch reload -
xDeadlyBoy - 16.05.2011
i don't really remember (i searched in the internet tab)...
are you sure that there is no way to do that?
Re: blocking weapon switch reload -
Sasino97 - 16.05.2011
Use wacko's callback "OnPlayerWeaponChange(playerid, newweapon, oldweapon)" and save it as
Mauzen said...