Weapon system - 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: Weapon system (
/showthread.php?tid=497126)
Weapon system -
Noliax8 - 25.02.2014
Hi,
I have need help for weapon system, I hope you help me
It's possible do not active the fire ?
It's possible to detect when player loses a weapon (more munition),
for give this weapon with 99999 ammos and if player have 99999 ammo,
it's not possible to active the fire.
It's possible ?
I've try to freeze player, tp player at 0.05 x,y different, ClearAnimations(), nothing works..
Have you a idea ?
Sorry for my english, i'm french..
Thanks
Re: Weapon system -
Noliax8 - 26.02.2014
You have any idea please ?
Respuesta: Weapon system -
CuervO - 26.02.2014
You can restrict the weapon damages by many ways actually,
You can either return 0 at onplayerweaponshot (which will only work on weapons that are shot, of course), Set the players team to an equal team so they don't damage theyselves then process the damage at OnPlayerTakeDamage, you can also disable the damage by the previous way and do a completely scriptsided damage.
As for the player losing ammo, yes you can, either by a timer or OnPlayerUpdate (more accurate).
Re : Weapon system -
Noliax8 - 26.02.2014
Hello,
Thanks you for this responses, except i not want disable the damage, but disable shooting.
Respuesta: Weapon system -
CuervO - 26.02.2014
I see.
Due to sync issues you will not be able to freeze the player and unfreeze him back, players will still see him as he shot (even though that in his screen he didn't). Teleporting the player to his own position might work but I believe you will still have such sync issues.
There is no reliable way to prevent a player from shooting from the perspective of all clients.
Re : Weapon system -
Noliax8 - 27.02.2014
Ok...
The only way it's freeze player and unfreeze when stop player to aim weapon ?
Re : Weapon system -
Noliax8 - 01.03.2014
Quote:
Originally Posted by Noliax8
Ok...
The only way it's freeze player and unfreeze when stop player to aim weapon ?
|
No idea ?