Coder Social home page Coder Social logo

samp-weapon-config's People

Contributors

2col avatar abagail avatar adrfranklin avatar alasnkz avatar alilogic avatar bronzal avatar crayder avatar cypka avatar ino42o avatar kaperstone avatar kolor4do avatar mysy00 avatar nexiustailer avatar nickdodd25 avatar omcho420 avatar oscar-broman avatar rt-2 avatar swthorn avatar sysadminjeroen avatar y-less avatar zbyss avatar ziggi avatar zile42o avatar zorono avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

samp-weapon-config's Issues

Performance improvements

Performance is not really an issue, but for high rate damage (fire, carpark, drowning, spraycan, extinguisher), things could be improved.

It's not a matter of server lag, but rather it's client lag. If many players in the same place are on fire or something similar, a lot of packets will be sent back and forth.

  • UpdateHealthBar should be throttled. No more than 5 times / second.
  • Often used switch statements could be better of as array lookups (e.g. IsHighRateWeapon).

Shallow Water - No Damage (Screenshot Included)

Damage is (usually) not taken when falling into water from a high height. Sometimes it does kill me, most of the time the debug messages only show OnPlayerTakeDamage. Falling anywhere on land does call other functions, but in shallow (not too shallow, but shallow enough to call OnPlayerTakeDamager) water nothing else is called. I think it only happens when the damage taken is 165.0 (aka Splat Damage.)

sa-mp-145

Streaming in when exiting (maybe entering) vehicles.

When I exit a vehicle all the dynamic objects around me flash and objects in the distance that should be streamed in are not. This flash causes me to fall through the ground of my maps.

I'm guessing that this has something to do with OnPlayerStateChange because it happens when exiting and sometimes entering vehicles. More specifically I'm guessing it's SKY's functions in WC_SpawnForStreamedIn which is called in OPSC.

EDIT: I was correct before, the cause is SpawnForStreamedIn (pretty sure after a few test attempts). When I comment the following section of OPSC, the bug does not occur.

/*if (newstate == PLAYER_STATE_ONFOOT) {
    if (oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER) {
        new Float:vx, Float:vy, Float:vz;
        GetPlayerVelocity(playerid, vx, vy, vz);

        if (vx*vx + vy*vy + vz*vz <= 0.05) {
            WC_SpawnForStreamedIn(playerid);
        }
    }
}*/

That narrows down to SpawnPlayerForWorld(playerid) because the only other two functions called in that function require players to be online, and I was alone. So this is a SKY bug. I haven't been able to test the other spots SpawnForStreamedIn is called because nobody has been online for me to test the knife stuff on.

EDIT: I made a command to only run SpawnPlayerForWorld, most of the time this bug occurs. Sometimes the bug does not occur. So this is actually a SKY bug.

Custom Damage Types

It will be very nice if there is a function/way to add custom damage types overcoming the complexities.

Deaths in vehicles, bugged.

Plain and simple. Did some testing:

Ended up teleporting to default class spawn with a cigar.

  1. Slain myself in a vehicle (set my own health to -1).
  2. Someone killed me in my car.
  3. Someone killed me in my car, in an interior.

Trying to bypass the Death Animation.

Yo.

I've finally got my GM to the point where I am getting to work on the death system.

I have it all working (well the parts I want to work) but there's an issue with the death animation that I was hoping you could help me fix. (Skip to *TO THE POINT for a step-by-step explanation).

Under OnPlayerDamage, I switch between the players death state (ALIVE, WOUNDED or DEAD).
If the person is alive, i allow the damage to be done. If the damage >= (health+armour), then I set the persons death state to WOUNDED. At this stage, the death animation is played (as they 'die' according to the weapon-config include) but I freeze them in that animation.

When they're WOUNDED and they take x damage (30 for example), then they are set to the DEAD state.

*TO THE POINT
The issue I am having is that the animation (when they are already in the animation) gets played every time they are shot.
This is how it goes right now:
OnPlayerDamage(..) -> ALIVE -> Damage the player.
OnPlayerDamage(..) -> ALIVE -> Damage the player - Animation Plays (is now WOUNDED).
OnPlayerDamage(..) -> WOUNDED -> Return 0 -> Animation Plays (is now DEAD).
OnPlayerDamage(..) -> DEAD -> Return 0 -> Animation Plays (is still DEAD).

This is how I want it to go:
OnPlayerDamage(..) -> ALIVE -> Damage the player.
OnPlayerDamage(..) -> ALIVE -> Damage the player - Animation Plays (is now WOUNDED).
OnPlayerDamage(..) -> WOUNDED -> Return 0 -> Animation does not play (already playing) and is now DEAD.
OnPlayerDamage(..) -> DEAD -> Return 0 -> Animation does not play (already playing) and is still DEAD.

I tried fixing it on my end but everything I tried failed. I thought returning 0 in OnPlayerDamage would fix it (by never entering OnPlayerDamageDone) but it didn't.

Would be great to have a configuration setting like AllowDeathAnimationToReplay(bool:value) that would not re-apply the death animation if the death animation is already playing.

(Not sure if this makes sense so please let me know if that's the case :D)

Thanks.

Support for YSF

There's a bug if you use weapon - config together with YSF. People are not able to damage anyone anymore.

Hope it will be supported soon

Rocket Launcher and Heatseeker (others untested)

When hitting somebody with a missile, they can take a missile straight to the face and only lose ~5 to 7 health. Didn't realize until some random guy came in my server and hit me it the face with a missile.

GetPlayerPos problem for AFK players

I noticed that if i kill a player who is AFK, his coordinates are the same with the old ones after his respawn. Can this be fixed somehow?
I think it can be done by saveing the position of the player after OnPlayerSpawn and hook GetPlayerPos to return these values.
Thanks!

Death Skipping sometimes hangs

I seemed to have found a weird issue where i return 0 under OnPlayerDamage, basically a god mode, and i blow up in a vehicle and weapon config respawns you/skips death like its suppose to.

But sometimes it hangs. The user will stay frozen. And sometimes the user gets put into class selection. The class selection one seems less common than the frozen user one.

This is the debug output.

[15:25:06] Vehicle id: 904 died from playerid: 0
[15:25:07] (wc) OnPlayerDeath(0 died by 255 from 65535)
[15:25:07] [death] nickd25 died 255
[15:25:07] (wc:0) OnPlayerTakeDamage(0 took 3.300000 from 65535 by 54 on bodypart 3)
[15:25:07] (wc:0) Requested class: 309
[15:25:07] (wc:0) Skipping death - class selection skipped
[15:25:07] (wc:0) Death skipped

And that's it. I can however trigger this debug code, which is death skipping being finished.

[15:25:11] (wc:0) Death skip end

I can trigger this by playing an animation from my animation browser, or simply spawning a vehicle.

I have not tested this on a blank mode/server yet, only have on my server. But the only time this seems to happen is when a user blows up in a vehicle when god mode is enabled/returning 0 under onplayerdamage

EDIT: This happened when returning 1 like normal.

I have had the issue again with the user going to class selection. I even got the debug lines.

[Wed Jan 04 05:23:53 PM] (wc) OnPlayerDeath(0 died by 255 from 65535)
[Wed Jan 04 05:23:53 PM] (wc) OnPlayerDamageDone(65535 did 99.000000 to 0 with 51 on bodypart 0)
[Wed Jan 04 05:23:53 PM] [Death] Playerid 0 killed by 65535 reason 51
[Wed Jan 04 05:23:53 PM] 14[DEATH]02[0] 07nickd25 died.
[Wed Jan 04 05:23:53 PM] [death] nickd25 died 255
[Wed Jan 04 05:23:53 PM] Vehicle died id: 969
[Wed Jan 04 05:23:56 PM] (wc:0) Requested class: 310
[Wed Jan 04 05:23:56 PM] (wc:0) True death class selection

Damage problem

Sometimes with a car the include is bugging or even when 2 players are killing the same guy,,

The guy who is dying "spams" deaths take a look on debug

[03/01/2017 02:17:31] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 3) [03/01/2017 02:17:31] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 3) [03/01/2017 02:17:31] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 3) [03/01/2017 02:17:31] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 3) [03/01/2017 02:17:31] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 3) [03/01/2017 02:17:31] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 9) [03/01/2017 02:17:32] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 9) [03/01/2017 02:17:32] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 9) [03/01/2017 02:17:32] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 6) [03/01/2017 02:17:32] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 6) [03/01/2017 02:17:32] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 4) [03/01/2017 02:17:32] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 4) [03/01/2017 02:17:32] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 4) [03/01/2017 02:17:32] {48FFEC}Olรก [ITF]((DI3GO))[FL] seu vip expira em {FF0000}19 Dias, 2 Horas, 13 Minutos e 56 Segundos! [03/01/2017 02:17:32] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 7) [03/01/2017 02:17:33] Dialog_OnDialogResponse called: 1 8439 0 -1 [03/01/2017 02:17:34] (wc:0) OnPlayerGiveDamage(0 gave 39.600002 to 3 using 27 on bodypart 3) [03/01/2017 02:17:34] (wc:3) OnPlayerTakeDamage(3 took 29.700000 from 0 by 27 on bodypart 3) [03/01/2017 02:17:35] (wc:0) OnPlayerGiveDamage(0 gave 9.900000 to 3 using 27 on bodypart 8) [03/01/2017 02:17:35] (wc:3) OnPlayerTakeDamage(3 took 39.600002 from 0 by 27 on bodypart 8) [03/01/2017 02:17:35] [H2B]ColoradO 2 voltou do esc [03/01/2017 02:17:36] (wc:0) OnPlayerGiveDamage(0 gave 4.950000 to 3 using 27 on bodypart 6) [03/01/2017 02:17:38] (wc:0) OnPlayerGiveDamage(0 gave 34.650001 to 3 using 27 on bodypart 9) [03/01/2017 02:17:38] (wc:3) OnPlayerTakeDamage(3 took 29.700000 from 0 by 27 on bodypart 9) [03/01/2017 02:17:40] (wc:0) OnPlayerGiveDamage(0 gave 14.850000 to 3 using 27 on bodypart 9) [03/01/2017 02:17:40] (wc:0) OnPlayerGiveDamage(0 gave 19.800001 to 3 using 27 on bodypart 6) [03/01/2017 02:17:40] (wc:3) OnPlayerTakeDamage(3 took 19.800001 from 0 by 27 on bodypart 9) [03/01/2017 02:17:40] (wc:0) OnPlayerGiveDamage(0 gave 34.650001 to 3 using 27 on bodypart 9) [03/01/2017 02:17:41] (wc:3) OnPlayerTakeDamage(3 took 34.650001 from 0 by 27 on bodypart 9) [03/01/2017 02:17:42] (wc:0) OnPlayerGiveDamage(0 gave 24.750001 to 3 using 27 on bodypart 5) [03/01/2017 02:17:43] (wc:3) OnPlayerTakeDamage(3 took 29.700000 from 0 by 27 on bodypart 5) [03/01/2017 02:17:43] (wc:0) OnPlayerGiveDamage(0 gave 14.850000 to 3 using 27 on bodypart 5) [03/01/2017 02:17:43] (wc:3) OnPlayerTakeDamage(3 took 34.650001 from 0 by 27 on bodypart 9) [03/01/2017 02:17:43] (wc:0) OnPlayerGiveDamage(0 gave 24.750001 to 3 using 27 on bodypart 3) [03/01/2017 02:17:43] (wc:3) OnPlayerTakeDamage(3 took 24.750001 from 0 by 27 on bodypart 9) [03/01/2017 02:17:43] (wc:0) OnPlayerGiveDamage(0 gave 29.700000 to 3 using 27 on bodypart 9) [03/01/2017 02:17:44] (wc:3) OnPlayerTakeDamage(3 took 24.750001 from 0 by 27 on bodypart 5) [03/01/2017 02:17:44] (wc:0) OnPlayerGiveDamage(0 gave 14.850000 to 3 using 27 on bodypart 5) [03/01/2017 02:17:44] (wc:3) OnPlayerTakeDamage(3 took 19.800001 from 0 by 27 on bodypart 5) [03/01/2017 02:17:44] (wc:0) OnPlayerGiveDamage(0 gave 24.750001 to 3 using 27 on bodypart 5) [03/01/2017 02:17:44] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:44] (wc:3) OnPlayerTakeDamage(3 took 29.700000 from 0 by 27 on bodypart 5) [03/01/2017 02:17:44] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:44] (wc:0) OnPlayerGiveDamage(0 gave 14.850000 to 3 using 27 on bodypart 9) [03/01/2017 02:17:44] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:44] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:45] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:45] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:45] (wc:3) OnPlayerTakeDamage(3 took 24.750001 from 0 by 27 on bodypart 9) [03/01/2017 02:17:45] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:45] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:45] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:45] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:45] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:45] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:45] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:45] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:45] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:45] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:45] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 4) [03/01/2017 02:17:46] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 4) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 6) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 6) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 6) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:46] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:46] [H2B]ColoradO 2 entrou de esc [03/01/2017 02:17:46] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 6) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 4) [03/01/2017 02:17:46] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 6) [03/01/2017 02:17:46] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 6) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 4) [03/01/2017 02:17:46] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 6) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:46] (wc:1) OnPlayerTakeDamage(1 took 6.600000 from 3 by 32 on bodypart 6) [03/01/2017 02:17:46] (wc:3) OnPlayerGiveDamage(3 gave 6.600000 to 1 using 32 on bodypart 6) [03/01/2017 02:17:46] (wc:1) OnPlayerTakeDamage(1 took 6.600000 from 3 by 32 on bodypart 6) [03/01/2017 02:17:46] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:46] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:46] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:46] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:46] (wc:0) OnPlayerGiveDamage(0 gave 24.750001 to 3 using 27 on bodypart 9) [03/01/2017 02:17:46] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 4) [03/01/2017 02:17:46] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:46] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 4) [03/01/2017 02:17:47] (wc:3) OnPlayerTakeDamage(3 took 24.750001 from 0 by 27 on bodypart 3) [03/01/2017 02:17:47] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:47] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 4) [03/01/2017 02:17:47] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 4) [03/01/2017 02:17:47] (wc:0) OnPlayerGiveDamage(0 gave 9.900000 to 3 using 27 on bodypart 6) [03/01/2017 02:17:47] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:47] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 4) [03/01/2017 02:17:47] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:47] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 4) [03/01/2017 02:17:47] (wc:3) OnPlayerTakeDamage(3 took 34.650001 from 0 by 27 on bodypart 9) [03/01/2017 02:17:47] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:47] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:47] (wc:0) OnPlayerGiveDamage(0 gave 29.700000 to 3 using 27 on bodypart 3) [03/01/2017 02:17:47] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:47] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:47] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:47] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:47] (wc:3) OnPlayerTakeDamage(3 took 24.750001 from 0 by 27 on bodypart 5) [03/01/2017 02:17:47] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:47] (wc:0) OnPlayerGiveDamage(0 gave 29.700000 to 3 using 27 on bodypart 9) [03/01/2017 02:17:47] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:48] (wc:3) OnPlayerTakeDamage(3 took 24.750001 from 0 by 27 on bodypart 5) [03/01/2017 02:17:48] (wc:0) OnPlayerGiveDamage(0 gave 39.600002 to 3 using 27 on bodypart 3) [03/01/2017 02:17:48] (wc:3) OnPlayerTakeDamage(3 took 34.650001 from 0 by 27 on bodypart 3) [03/01/2017 02:17:49] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:49] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:49] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:49] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:49] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:49] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:49] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:49] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:49] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 3) [03/01/2017 02:17:49] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 3) [03/01/2017 02:17:49] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:49] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 4) [03/01/2017 02:17:50] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:50] (wc:1) OnPlayerGiveDamage(1 gave 8.250000 to 0 using 29 on bodypart 4) [03/01/2017 02:17:50] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 3) [03/01/2017 02:17:50] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 4) [03/01/2017 02:17:50] (wc:0) OnPlayerTakeDamage(0 took 8.250000 from 1 by 29 on bodypart 4) [03/01/2017 02:17:50] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 3) [03/01/2017 02:17:50] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 3) [03/01/2017 02:17:50] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 3) [03/01/2017 02:17:50] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 3) [03/01/2017 02:17:50] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 3) [03/01/2017 02:17:50] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 3) [03/01/2017 02:17:50] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 3) [03/01/2017 02:17:50] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 6) [03/01/2017 02:17:50] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 6) [03/01/2017 02:17:50] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 6) [03/01/2017 02:17:51] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 6) [03/01/2017 02:17:51] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 6) [03/01/2017 02:17:51] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 9) [03/01/2017 02:17:51] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 3) [03/01/2017 02:17:51] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 3) [03/01/2017 02:17:51] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:51] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:51] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:51] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 4) [03/01/2017 02:17:51] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 4) [03/01/2017 02:17:51] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 4) [03/01/2017 02:17:52] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 9) [03/01/2017 02:17:52] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 9) [03/01/2017 02:17:52] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:52] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:52] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:52] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:52] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 4) [03/01/2017 02:17:52] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 4) [03/01/2017 02:17:53] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 6) [03/01/2017 02:17:53] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 9) [03/01/2017 02:17:53] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:53] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:53] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:53] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:53] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:53] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 4) [03/01/2017 02:17:53] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 4) [03/01/2017 02:17:53] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 4) [03/01/2017 02:17:54] OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 4) [03/01/2017 02:17:54] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 9) [03/01/2017 02:17:54] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 9) [03/01/2017 02:17:54] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:54] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:54] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:54] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:54] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 4) [03/01/2017 02:17:54] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 4) [03/01/2017 02:17:54] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 4) [03/01/2017 02:17:55] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 9) [03/01/2017 02:17:55] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 9) [03/01/2017 02:17:55] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:55] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:55] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5) [03/01/2017 02:17:55] (wc:0) OnPlayerGiveDamage(0 gave 6.600000 to 3 using 32 on bodypart 5)

GMX = Instant Client Crash

I'm pretty sure this would be caused by RemoveBuildingForPlayer being repeated when OnPlayerConnect is called on the same player that was already connected. The 'building' (vending machines in our case) can't be removed twice.

Runtime errors

Hi,

After spawn i have some runtime errors

[31/08/2015 20:21:04] SetPlayerHealth (playerid = 0 health = 8000100.00000, result = 1);
[31/08/2015 20:21:04] SetPlayerArmour (playerid = 0 armour = 0.00000, result = 1);
[31/08/2015 20:21:25] SetPlayerHealth (playerid = 0 health = 8000100.00000, result = 1);
[31/08/2015 20:21:25] SetPlayerArmour (playerid = 0 armour = 0.00000, result = 1);
[31/08/2015 20:21:26] [debug] Run time error 4: "Array index out of bounds"
[31/08/2015 20:21:26] [debug] AMX backtrace:
[31/08/2015 20:21:26] [debug] #0 0017ac60 in public WC_OnPlayerDamage (&playerid=@0406a08c 0, &Float:amount=@0406a090 1.91351, &issuerid=@0406a094 65535, &weapon=@0406a098 54, &bodypart=@0406a09c 3) at D:\PAWN\VillageLife\gamemodes\VillageLife/Player/Death.pwn:22
[31/08/2015 20:21:26] [debug] #1 000b5be0 in public OnPlayerDamage (&playerid=@0406a08c 0, &Float:amount=@0406a090 1.91351, &issuerid=@0406a094 65535, &weapon=@0406a098 54, &bodypart=@0406a09c 3) at D:\PAWN\Pawno Patched\include\weapon-config.inc:4940
[31/08/2015 20:21:26] [debug] #2 000ae430 in InflictDamage (playerid=0, Float:amount=1.91351, issuerid=65535, weaponid=54, bodypart=3) at D:\PAWN\Pawno Patched\include\weapon-config.inc:4126
[31/08/2015 20:21:26] [debug] #3 000a33c8 in public ac_OnPlayerUpdate (playerid=0) at D:\PAWN\Pawno Patched\include\weapon-config.inc:2578
[31/08/2015 20:21:26] [debug] #4 00083214 in ?? (playerid=0, ... <1073741822 arguments>) at D:\PAWN\VillageLife\gamemodes\VillageLife/AntiCheat/AC.pwn:3336
[31/08/2015 20:21:26] [debug] #5 00019e84 in public FIXES_OnPlayerUpdate (... <1 argument>) at D:\PAWN\Pawno Patched\include\YSI\..\YSI_Players\..\YSI_Data\..\YSI_Coding\..\YSI_Internal\y_cgen.inc:31
[31/08/2015 20:21:26] [debug] #6 000086f8 in public OnPlayerUpdate (playerid=0) at D:\PAWN\Pawno Patched\include\fixes.inc:4657

Unreturned death, from InflictDamage

I think PlayerDeath was never called from InflictDamage. Here is the debug:

image

So all the stuff in PlayerDeath that was needed was never called.

I'm not sure if it's needed, just reporting in case it is...

Original damage sound possible?

Hello,
We all know that the damage sound used by this plugin is not exactly the same than in the real game.
Is there a way we can change this, honestly you reproduced all the anims and it is really really great work.
It is almost perfect in fact, the only thing that I find annoying is that last little bit, the damage sound, otherwise everything is almost like real.
Do you think there is a way to put the real sound, is it just because you haven't found them yet? Or is it known to be impossible to find those sounds?

Thank you,
rt-2

Add a callback for vending machines

Something like this:

public OnPlayerUseVendingMachine(playerid) {
    if (GetPlayerMoney(playerid) > 0) {
        GivePlayerMoney(playerid, -1);

        return 1;
    }

    return 0;
}

weapon-config crash

[debug] Accessing element at index 65535 past array upper bound 999
[debug] AMX backtrace:
[07:56:02] [debug] #0 000342b0 in AddRejectedHit (playerid=65535, damagedid=2, reason=19, weapon=49, i1=1111883777, i2=0, i3=0) at C:\pawno\include\weapon-config.inc:5308
[debug] #1 00024624 in public OnPlayerTakeDamage (playerid=2, issuerid=65535, Float:amount=49.50000, weaponid=49, bodypart=3) at C:\pawno\include\weapon-config.inc:3373
[debug]

While you are in vehicle and falling and try to get out the player receives damage

I noticed while you are in a vehicle (tested only on nrg) and falling and you will try to get out the player will receive damage.

Video: https://www.youtube.com/watch?v=Ub0uJlVBkt0
Info: A friend of mine recorded me while he was spectating me, this way the camera is so close to vehicle (the spec system is a little fk)

Info to reproduce: While falling the vehicle pitch must be something like this https://dl.dropboxusercontent.com/u/51829909/dfdfdf.png (i love paint ๐Ÿ˜„)
The amount of damage you will receive is related to velocity (the higher it is the damage will be even greater)

Increase player damage

Hi,

I think this sounds nice. Something like SetPlayerWeaponDamage or IncreaseWeaponDamage
What you think? I should look on it when I wil have time.

Cheers

Player killed on <= 0.0 damage

This may be somewhat of a non-issue, but I'm posting it here anyways for discussion purposes.

https://github.com/oscar-broman/samp-weapon-config/blob/3acad301fe85bed5479111fe49d7b6191b696eab/weapon-config.inc#L4640..L4642

https://github.com/oscar-broman/samp-weapon-config/blob/3acad301fe85bed5479111fe49d7b6191b696eab/weapon-config.inc#L4646..L4648

Whenever you inflict 0.0 or less damage to someone, the player dies.

I am fairly certain that this is not a bug, but those who are inexperienced with the weapon-config code might think that this is a bug or that the include is bugged.

I'm even going to use this to make an easy instakill weapon.

Hooking OnGiveDamage with y_hooks

Is this possible? I gave it a go but the hooked callback wasn't called.

For the time being I'm using ALS, but it would be great if I could use y_hooks instead.

OPD, amount (I think it's something to do with amount) bug.

When using the following code, I sometimes die from falling short distances. Some other times I survive the very long falls.

public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart)
{
    if (weapon == WEAPON_COLLISION && amount < 7.5) // Ignore low fall damage
        return 0;
    return 1;
}

SetCustomFallDamage Parachute Bug

The player loses his health almost 90 per cent on respawn after dying using his parachute, when SetCustomFallDamage is set to false. All other things works fine when it is set to true. This same situation is applicable for this (#17) bug too.
sa-mp-032
sa-mp-033
sa-mp-034

Health, armor, vehicle & wpns going crazy (sync issue)

Hi,
I am having a problem in my server and I am almost sure it is originating from this include.
First of all, I described the issue very well here: rt-2/SA-ARP#4
I have concluded that most of the time (or always) it happens when player1 is in a vehicle.
And it seems like the player2 need to be teleported near player1(in a vehicle). Then if player1 is not moving, it could go crazy, also, sometimes when the player is not moving for a couple of seconds, it also can start happening for nearby players. Player1 does not see his health/armor moving, only the streamed players around.
Instantly if player1 start moving it will stop and return to normal instantly for everyone.
Also, I have found out that while moving the forklift's fork, it also happens, here is a video I recorded to demonstrate: https://www.youtube.com/watch?v=a6Ful1b-kJc
I am not able to "create" this problem on demand, other than moving the forklift's fork.
This issue seem to have something to do with UpdatePlayer or OnPlayerStreamIn, since it happens mostly(but not always) when a player get streamed near another player AND it always stop immediately when the bugged player start moving, but I have no ideas really.

Thank you,
rt-2

Blood

0.3.7 RC2 Object ID: 19836

Attach that to the player if he died from bullets, vehicle collision, explosions, and other blood causing death when he is for sure on the ground.

Cannot read from file: "weapon-config"

Hey.

Whenever I compile my "fresh" gamemode I get this.

\gamemodes\bare.pwn(4) : fatal error 100: cannot read from file: "weapon-config"
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.

You recommended me that I update my include files, which ones do I need to update specificly?

Edit: If someone thats reading this has a working setup, I would greatly appreciate if they could upload/send me the includes for 0.3.7 or something! :p

Banks

Support for player god

  1. Add support for player god.
    Ie, disable all player damage and get/set health.
TogglePlayerWeaponDamage(playerid,toggle);
IsTogglePlayerWeaponDamage(playerid);
  1. Update player loop:
for(new i = 0; i < MAX_PLAYERS; i++){ //bad

for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++){ //good

stock IsPlayerSpawned crash, changed to Public works

I got "runtime error 11: devided by zero" in OnPlayerWeaponShot, unless I change the IsPlayerSpawned stock function into a forwarded public function.

Now everything works fine,, weird.
Thought I'd let you guys know...

Thank you,
rt-2

More weapon slots

This is something I thought of and mostly wrote years ago, but never released and subsequently lost. I realised that it was quite simple to bypass the weapon slot limit in the same way as I do classes in y_classes - just have three.

Say player is holding a weapon in slot 7, you give them another weapon from (say) slots 6 and 8 (in reality, fists and camera, or other mostly non-deadly weapons will be best). When you detect that they switched to the weapon in slot 6, you know that they changed weapons down, and you can give and arm the correct weapon. If they switch to the weapon in slot 8, they changed up, and again you give them the new weapon accordingly. That next weapon could be a different slot 7 weapon, or any other weapon at all. Just make sure that the sentinel weapons are also updated if required (e.g. giving them an actual slot 6 weapon will prevent the use of slot 6 for detecting a change).

You could get very clever and make those sentinel weapons ones they actually own, or make it so that instead of cycling through all weapons in one slot before moving on to the next slot, you cycle through one of each entirely before moving on to the next ones - would be harder to code, but would lead to less flickering.

issuerid can't damage playerid if his weapon skill is under 200.

This is an odd bug.

So I was testing some new code with someone, and noticed that the deagle did not do any damage on his side when he shot me.

I have looked everywhere in the code, and commented out a lot of stuff, when he said something along "what if it has to do with weapon skill?", I thought that it wouldn't work, but I was desperate to try to fix this bug.

I tested it out and whenever I set his weapon skill to max, he could do damage to me.
I tested it some more and determined that any weapon skill below 200 can't damage with the deagle.

The issue is reproduceable on my normal server, so it isn't only confined to a specific revision or the debug server.

I do not have any functions to get the weapon skill level of a certain player, I only set it to a specific amount according to their score or admin level.

If I fucked up, please do say so.

SetPlayerHealth Issue

Good evening,

I just set up this include and SKY plugin; Everything is working except one thing: a god cmd i had on my gamemode. This command uses to set the player health to a big amount and a timer refull the health if it decreased

CMD:god(playerid, params[])
{
    if(PlayerInfo[playerid][Level] < 7) return SendClientMessage(playerid, red, "You are not allowed to use this command");
    if(PlayerInfo[playerid][God] == 0)
	{
        PlayerInfo[playerid][God] = 1;
   	    SetPlayerHealth(playerid,100000);
		GivePlayerWeapon(playerid,16,50000); GivePlayerWeapon(playerid,26,50000);
        SendClientMessage(playerid,green,"GodMode ON.");
    }
	else
	{
	    PlayerInfo[playerid][God] = 0;
	    SendClientMessage(playerid,red,"GodMode OFF.");
        SetPlayerHealth(playerid, 100);
	}
	return 1;
}

function GodUpdate()
{
	foreach(new i : Player) if(PlayerInfo[i][God] == 1) SetPlayerHealth(i,100000), RepairVehicle(GetPlayerVehicleID(i)), SetVehicleHealth(GetPlayerVehicleID(i),1000000.0);
	return 1;
}

From now, when I try this: It is like if I did nothing, not increasing the health, like if i have 100 HP

Have you any ideas about what could be the problem

Thanks

[Weapon IDs] Run time error 4: "Array index out of bounds"

cc: @oscar-broman

I have recently ran my gamemode in debug mode and got some stacktraces, most of them were due to my own fault but I have seen some that appear to directly trace back to weapon-config.

[06:06:48] [debug] Run time error 4: "Array index out of bounds"
[06:06:48] [debug]  Accessing element at index 48 past array upper bound 46
[06:06:48] [debug] AMX backtrace:
[06:06:48] [debug] #0 00347668 in public WC_OnPlayerDamage (&playerid=@0x005f326c, &Float:amount=@0x005f3270, &issuerid=@0x005f3274, &weapon=@0x005f3278, &bodypart=@0x005f327c) at SFCRRPG.pwn:2715
[06:06:48] [debug] #1 0003986c in public OnPlayerDamage (&playerid=@0x005f326c, &Float:amount=@0x005f3270, &issuerid=@0x005f3274, &weapon=@0x005f3278, &bodypart=@0x005f327c) at C:\Users\Jeroen\Documents\git\SONA\sona-cnr\pawno\include\weapon-config\weapon-config.inc:5448
[06:06:48] [debug] #2 000315b8 in InflictDamage (playerid=6, Float:amount=2.64000, issuerid=4, weaponid=48, bodypart=27, bool:ignore_armour=false) at C:\Users\Jeroen\Documents\git\SONA\sona-cnr\pawno\include\weapon-config\weapon-config.inc:4608
[06:06:48] [debug] #3 0002754c in public OnPlayerGiveDamage (playerid=4, damagedid=6, Float:amount=2.64000, weaponid=48, bodypart=27) at C:\Users\Jeroen\Documents\git\SONA\sona-cnr\pawno\include\weapon-config\weapon-config.inc:3219
[06:06:48] [debug] Run time error 4: "Array index out of bounds"
[06:06:48] [debug]  Accessing element at index 48 past array upper bound 46
[06:06:48] [debug] AMX backtrace:
[06:06:48] [debug] #0 00347668 in public WC_OnPlayerDamage (&playerid=@0x005f326c, &Float:amount=@0x005f3270, &issuerid=@0x005f3274, &weapon=@0x005f3278, &bodypart=@0x005f327c) at SFCRRPG.pwn:2715
[06:06:48] [debug] #1 0003986c in public OnPlayerDamage (&playerid=@0x005f326c, &Float:amount=@0x005f3270, &issuerid=@0x005f3274, &weapon=@0x005f3278, &bodypart=@0x005f327c) at C:\Users\Jeroen\Documents\git\SONA\sona-cnr\pawno\include\weapon-config\weapon-config.inc:5448
[06:06:48] [debug] #2 000315b8 in InflictDamage (playerid=6, Float:amount=2.64000, issuerid=4, weaponid=48, bodypart=27, bool:ignore_armour=false) at C:\Users\Jeroen\Documents\git\SONA\sona-cnr\pawno\include\weapon-config\weapon-config.inc:4608
[06:06:48] [debug] #3 0002754c in public OnPlayerGiveDamage (playerid=4, damagedid=6, Float:amount=2.64000, weaponid=48, bodypart=27) at C:\Users\Jeroen\Documents\git\SONA\sona-cnr\pawno\include\weapon-config\weapon-config.inc:3219
[06:06:49] [debug] Run time error 4: "Array index out of bounds"
[06:06:49] [debug]  Accessing element at index 48 past array upper bound 46
[06:06:49] [debug] AMX backtrace:
[06:06:49] [debug] #0 00347668 in public WC_OnPlayerDamage (&playerid=@0x005f326c, &Float:amount=@0x005f3270, &issuerid=@0x005f3274, &weapon=@0x005f3278, &bodypart=@0x005f327c) at SFCRRPG.pwn:2715
[06:06:49] [debug] #1 0003986c in public OnPlayerDamage (&playerid=@0x005f326c, &Float:amount=@0x005f3270, &issuerid=@0x005f3274, &weapon=@0x005f3278, &bodypart=@0x005f327c) at C:\Users\Jeroen\Documents\git\SONA\sona-cnr\pawno\include\weapon-config\weapon-config.inc:5448
[06:06:49] [debug] #2 000315b8 in InflictDamage (playerid=6, Float:amount=2.64000, issuerid=4, weaponid=48, bodypart=27, bool:ignore_armour=false) at C:\Users\Jeroen\Documents\git\SONA\sona-cnr\pawno\include\weapon-config\weapon-config.inc:4608
[06:06:49] [debug] #3 0002754c in public OnPlayerGiveDamage (playerid=4, damagedid=6, Float:amount=2.64000, weaponid=48, bodypart=27) at C:\Users\Jeroen\Documents\git\SONA\sona-cnr\pawno\include\weapon-config\weapon-config.inc:3219

Prevent hacked weapons

hook GivePlayerWeapon and reject damage if it's a hacked weapon. (inf ammo hacks with non-hacked weapons can be monitored with lagcomp on as well)

Preventing the spawn after the Death Animation finishes.

I think it would be awesome to have the option to completely prevent the spawning of players when their death animation finishes (from OnPlayerPrepareDeath).

I'd love to be able to simply apply the death animation for as long as the 'respawn_time' parameter specifies with -1 being forever.

So basically, being able to prevent OnPlayerDeath.

Example One:
If a player falls to his death from the sky, I'd like to be able to play the animation as usual but instead of the player playing the animation and then despawning, I could let him lay on the ground.

This would be great as well (same thing as above but when the deaths occur inside vehicles):
Example:
If a group of people are in a vehicle and it explodes due to collision/weapon damage, then I could allow them to all play the death animation and then make them all lay where the car exploded in the animation without having to use SetPlayerPos after OnPlayerDeath and OnPlayerSpawn.

Also see: http://forum.sa-mp.com/showpost.php?p=3405048&postcount=91.

It always feels like I explain these sort of things horribly, let me know if I did and I'll try clear it up more :D

No health lost when falling off a bike.

I tried ramming walls with an NRG in your server at about 150km/h. My character fell of the bike and made some ouch noises but didn't lose health at all.

Bugs and suggestions

Hey, great plugin - well done! First and foremost, testing on latest 0.3x.

Bugs

  1. Class selection fails unless it's death by a car or something client-side.
  2. Fall damage is just not as accurate as before?
  3. Is the death world thing necessary? It seems to inflict bugs than anything else.

Suggestion

  1. Allow users to easily disable portions of the code with using #define instead of using functions (Toggle{function}(bool: value)

    Should stop compiling unnecessary code that is already disabled by the server. Example:

    #define TOGGLE_DAMAGE_FEED (true)
    
    #if TOGGLE_DAMAGE_FEED == true
    ... operations ...
    #endif
    
  2. Make an addition to this by introducing maybe another optional feature which enables users to access weapon data (GetWeaponDamageFromDistance, GetWeaponDamage, GetWeapon blah blah.)

  3. When the include is stable, it might be great if this was merged altogether with the SKY plugin. (As that plugin really has only things relevant to this include.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.