[very useful suggestion] OnPlayerDamagePlayer callback. -
Whizion - 05.12.2010
OnPlayerDamagePlayer(playerid, targetid, hpdamage, armordamage)
^> This is the most useful & most needy callback ever.
With this callback health/armor hacks would FINALLY dissapear.
Think about SA:MP finally rid of those hacks, it would be so much better.
The code for this already exists the only thing that has to be done is to make this callback.
So please SA:MP team add it, make it as a gift for us scripters for Christmas.
Re: [very useful suggestion] OnPlayerDamagePlayer callback. -
Stefan_Toretto - 05.12.2010
Quote:
Originally Posted by Whizion
The code for this already exists the only thing that has to be done is to make this callback.
|
You did it?
Re: [very useful suggestion] OnPlayerDamagePlayer callback. -
gimini - 05.12.2010
This callback is my dream from sa-mp 0.2
Re: [very useful suggestion] OnPlayerDamagePlayer callback. -
The_Gangstas - 05.12.2010
this has already been made.
Re: [very useful suggestion] OnPlayerDamagePlayer callback. -
Whizion - 05.12.2010
Quote:
Originally Posted by Stefan_Toretto
You did it?
|
No, the SA:MP team did it.
How else do we shoot each other in SA:MP?
Quote:
Originally Posted by The_Gangstas
this has already been made.
|
It was done by camera vector functions, which isn't so accurate.
Re : [very useful suggestion] OnPlayerDamagePlayer callback. -
Peppe95 - 06.12.2010
OnPlayerDamagePlayer(playerid, targetid, hpdamage, armordamage, bodypart)
or
OnPlayerDamagePlayer(playerid, targetid, bodypart)
Re: [very useful suggestion] OnPlayerDamagePlayer callback. -
cessil - 06.12.2010
I think you're forgetting that bullets aren't server side
Re: [very useful suggestion] OnPlayerDamagePlayer callback. -
Joe Staff - 06.12.2010
Quote:
Originally Posted by Whizion
No, the SA:MP team did it.
How else do we shoot each other in SA:MP?
|
That's not true, how it works is the server only knows that a player is shooting and is looking in a direction, this information is then given to players. So that player B sees player A shooting and happens to get hit by the bullets. Then Player A tells the server how much health he has. That's all that is happening.
What should be done is a callback that tells the server when a player is hurt and by who, not neccesarily a player damaging another.
OnPlayerDamage(playerid,assailant)
Re: [very useful suggestion] OnPlayerDamagePlayer callback. -
wups - 06.12.2010
Well OnPlayerDeath works, so bullets must be server side.
Re: [very useful suggestion] OnPlayerDamagePlayer callback. -
TheXIII - 06.12.2010
Quote:
Originally Posted by SilentHuntR
That's not true, how it works is the server only knows that a player is shooting and is looking in a direction, this information is then given to players. So that player B sees player A shooting and happens to get hit by the bullets. Then Player A tells the server how much health he has. That's all that is happening.
What should be done is a callback that tells the server when a player is hurt and by who, not neccesarily a player damaging another.
OnPlayerDamage(playerid,assailant)
|
Well, actually what the client "knows" can be transfered to the server. That's what this mod does. If your game engine "knows" you got hit, lowers your health, applies animation etc. then this call can be hooked by SA-MP client, and client transfers that knowledge to server. It would probably be kind of easy* to hook thing like what caused how much damage. Might be harder to get the players ID who caused it though. Still it would be useful either ways.
*by "easy" I mean it shouldn't be much harder than hooking anything else SA-MP has already done. Not saying its easy, so everyone could do it. it's probably still a lot of work.
Also, I don't understand why this thread is under 0.3C category?
0.3C is under RC, or "Release Candidate" status. Which by definition means that the probably won't be any added functionality, only insect control. (finding&destroying bugs)
It really should be added under "Suggestions For Future Sa:MP Versions."