Posts: 4
Threads: 1
Joined: Aug 2007
Reputation:
0
Can some one make a OnPlayerHit Callback with the parameters playerid, newhealth, oldhealth, shooterid
Like: OnPlayerHit(playerid, newhealth, oldhealth, shooterid);
And Can some one tell me How to make Plugins?
Posts: 1,501
Threads: 19
Joined: Nov 2007
Reputation:
0
Your expecting somebody to tell you in like one sentence how to make all this. OnPlayerHit isnt possible. There was a callback OnPlayerGetShot but it didnt work.
Posts: 4
Threads: 1
Joined: Aug 2007
Reputation:
0
Well i thought maby someone made a tutorial how to make callbacks and that i couldn't find so they could link me the site
and about the OnPlayerGetShot Too bad ! time for an other try !
Posts: 2,856
Threads: 6
Joined: Jun 2007
Reputation:
0
how backwards already said, the callback dont work
you just can make something like OnPlayerLostHealth but how it says everytime you lose health not only shots/fights
Posts: 4
Threads: 1
Joined: Aug 2007
Reputation:
0
i meant i maby i can try to make an other one and maby it works !
Everything is posible
And i already got a OnPlayerLoseHealth
Posts: 988
Threads: 9
Joined: Jul 2006
Reputation:
0
If we cound get the pitch of the player's view, or better, the aiming vector of the player, then it could be possible...
But actually you could check,
if player1 is looking at player2 (+/- 5°) and is at a small distance from player2 and if he is firing a weapon then
OnPlayerGetHit(player2) would be called
...but it won't work really nicely because you can't calculate aiming vector of a player, only x and y axis...mean player1 could look at player2, move his mouse to look in the air, fire, and OnPlayerGetHit(player2) will still be called.
Posts: 441
Threads: 11
Joined: Jul 2006
Reputation:
0
With a plugin you could get exactly where a player is pointing and firing their weapon. Then you record when they fire there weapon and if within a second the player they're aiming at loses health. TBH you could actually make it quite accurate if you knew what you were doing (aslong as players aren't all grouped together).