Help with weapon ..
#1

How can I detect if player has shooted other player with some gun, let's say silenced pistol ?
Reply
#2

I'm sorry for double post but i need help with this asap ^ ! =/
Reply
#3

I guess this means nothing to you people!?
Reply
#4

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
I guess this means nothing to you people!?
Next time post something usefull instead of posting link to forum rules to get post count +1.
Reply
#5

Quote:
Originally Posted by Matej_
Посмотреть сообщение
Next time post something usefull instead of posting link to forum rules to get post count +1.
I'm sure the SA-MP administration would think that's useful, as all you do is lie and whine about your problems. Not to mention you never follow the rules.
Reply
#6

something like getplayerweapondata? dont ask me for a example, im on my phone xd
Reply
#7

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
something like getplayerweapondata? dont ask me for a example, im on my phone xd
No, that literally gets a players weapon data going slot by slot. I don't know how helpful this is, but I would at least read through the "tutorial". It just gives code on how to check if a player is shooting an NPC, but you could probably change it up a little. Good luck!
Reply
#8

Edit: Nevermind, I misread
Reply
#9

Quote:
Originally Posted by Matej_
Посмотреть сообщение
Next time post something usefull instead of posting link to forum rules to get post count +1.
This is one of the most useful links you will ever be sent when you are having problems with scripting, so don't dare say it is useless.

Also, use a function (there are a few here) that detects the aiming position of the player, and use GetPlayerWeapon to see if their weapon ID equals that of which you are checking for.
Reply
#10

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
No, that literally gets a players weapon data going slot by slot. I don't know how helpful this is, but I would at least read through the "tutorial". It just gives code on how to check if a player is shooting an NPC, but you could probably change it up a little. Good luck!
No offense but your comments aren't exactly smart either.

You could detect both if someone is KILLED by Silenced Pistol, or if they are SHOT with it.

The first is easy - Check the reason of the players death, if it is by Silenced Pistol, execute code. Alternatively, you could GetPlayerWeaponData for the pistol slot of the killer and see if it's Silenced Pistol.

For the last method, to detect merely when someone shoots, you'll need some advanced code. It's not impossible, but I can tell you it's a pain in the ass. But try searching for some of the head-shot detecting scripts, you might be able to learn something from those.

Good luck.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)