Custom Weapons
#1

I've been looking for tutorials or anything even semi-related to allow me to process how to create these. I'm not looking for the custom object weapons. I am more or less wanting to be able to hold a desert eagle but with the weapon name of a Glock with a custom ID. Yet. If I were to use the regular desert eagle, it'd give me different damage values than the Glock would.

Example:
https://www.youtube.com/watch?v=K8iMnHZs8aw
Reply
#2

It'll be done on OnPlayerTakeDamage. What they are doing is using the Deagle as a weapon, and modifying the damage taken in the callback.

There's a limited amount of examples because no-one has shown how it's done, but on the Wiki there's a couple of examples of a debug (Displays what damage was done by the actual gun), and a headshot system , but another decent example of using the callback itself is https://sampforum.blast.hk/showthread.php?tid=462189 which shows just a couple more options in this.


Though they aren't directly what you're wanting, they are still something to read up on to get into the callback itself.
Reply
#3

I've got a body damages system already with custom damages for the default weapons. I'm more or less trying to find out how the scripter made it so there were two seperate weapons but used the default desert eagle model. Like, two desert eagles with different names that do different amounts of damages.
Reply
#4

He simply made the names of them... He has a custom deagle model on his client.

The script will simply check that if the person was shot by a deagle, or dies by a deagle (Via OnPlayerTakeDamage and OnPlayerDeath respectively), that it SAYS he was killed by whatever gun was equiped via the menu at the time.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)