OnPlayerWeaponShoot
#1

Hi,


It'is possible to do, i want to return 0; in this function, and i want to setplayerhealth. But problem is, when you shoot to player he have no animation, and he easily can shoot to you, because when there is no stop return 0; you shoot to another person, then he hard to shoot to you. HOw to make, if i return 0; bullet won't make damage, but everythink will be like bullet
Reply
#2

I'm guessing that you want to turn off default GTA SA damages. WIKI says that, if you return 0 it will prevent bullets from damage. Please, try to expand your message, and try to write more clearly to let us understand.
Reply
#3

I want to make bullet effect, blood and so on.. But disable GTA bullet damage, by using by setplayerhealth, and my damages.
Reply
#4

Oh, so you mean custom weapon damages? Fine. Basically, my method is, to set all the player's to the same team (SetPlayerTeam) so they are not able to damage each other. But you can also do "return 0;" to callback OnPlayerWeaponShot, that depends on you.

Either way, when you do that, you can use OnPlayerGiveDamage CALLBACK or OnPlayerWeaponShot with IF STATEMENT, which will check, if player just shot player to use that to create your own custom weapon damages.

There are MANY filterscripts already, that are doing custom weapon damages. Try search, and get your problem sorted, easy job.
Reply
#5

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
Oh, so you mean custom weapon damages? Fine. Basically, my method is, to set all the player's to the same team (SetPlayerTeam) so they are not able to damage each other. But you can also do "return 0;" to callback OnPlayerWeaponShot, that depends on you.

Either way, when you do that, you can use OnPlayerGiveDamage CALLBACK or OnPlayerWeaponShot with IF STATEMENT, which will check, if player just shot player to use that to create your own custom weapon damages.

There are MANY filterscripts already, that are doing custom weapon damages. Try search, and get your problem sorted, easy job.
The SetPlayerTeam method isn't good. If you set all the players team to the same one then all the death reasons will get messed up.
Reply
#6

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
The SetPlayerTeam method isn't good. If you set all the players team to the same one then all the death reasons will get messed up.
I did not really know that, because I don't use that. If you say so, I'll have to edit my gamemode then. Thanks for correcting me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)