SA-MP Forums Archive
OnPlayerDeath. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerDeath. (/showthread.php?tid=415473)



OnPlayerDeath. - audriuxxx - 13.02.2013

Hi,

When this call back is called, can i save player weapons?


Re: OnPlayerDeath. - LarzI - 13.02.2013

Have you tried? If you do, you will find out. However I think you cannot.


Re: OnPlayerDeath. - Da_Noob - 13.02.2013

You can make a system that store the player weapons, and when a player dies, just give them their weapons again.


Re: OnPlayerDeath. - Mmartin - 13.02.2013

Yes.
Quote:

[17:08:03] Player Mmartin died. Weapon data below.
[17:08:03] **DEATH** Slot 0, Weapon 0, Ammo 0.
[17:08:03] **DEATH** Slot 1, Weapon 3, Ammo 10000.
[17:08:03] **DEATH** Slot 2, Weapon 24, Ammo 10000.
[17:08:03] **DEATH** Slot 3, Weapon 25, Ammo 10000.
[17:08:03] **DEATH** Slot 4, Weapon 0, Ammo 0.
[17:08:03] **DEATH** Slot 5, Weapon 0, Ammo 0.
[17:08:03] **DEATH** Slot 6, Weapon 0, Ammo 0.
[17:08:03] **DEATH** Slot 7, Weapon 35, Ammo 10000.
[17:08:03] **DEATH** Slot 8, Weapon 0, Ammo 0.
[17:08:03] **DEATH** Slot 9, Weapon 0, Ammo 0.
[17:08:03] **DEATH** Slot 10, Weapon 0, Ammo 0.
[17:08:03] **DEATH** Slot 11, Weapon 0, Ammo 0.
[17:08:03] **DEATH** Slot 12, Weapon 0, Ammo 0.

Refer to GetPlayerWeaponData and OnPlayerDeath.