Posts: 1,349
Threads: 194
Joined: Jan 2014
Reputation:
0
How Can I add reasons for death in onplayerdeath my owner reason
Posts: 1,349
Threads: 194
Joined: Jan 2014
Reputation:
0
i mean how can i add my own reasons for death
Posts: 1,349
Threads: 194
Joined: Jan 2014
Reputation:
0
i mean i can add more reasons like aliens
Posts: 450
Threads: 10
Joined: May 2014
Reputation:
0
Just specify a weapon for aliens and then try the above code.Just replace the Grenade/weapon of your choice by aliens in this text "Death Reason: Killed by a Grenade"
Posts: 3,085
Threads: 37
Joined: Nov 2012
Reputation:
0
You can add your own reasons, but they must be through player variables. For example, lets say someone takes damage from falling into a pit of 'lava' that you have created, you must have something like PlayerFallenIntoLava[playerid] = true. Then in OnPlayerDeath, check if that variable is true, then the reason can be "Lava".
That's just an example. I've seen a CnR with that exact kind of system. There are hundreds of ways to die, all created, not native to samp. (Obviously, this doesn't actually 'add' a 'reason' to OnPlayerDeath.