SA-MP Forums Archive
[HELP] - Making RP Death - 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: [HELP] - Making RP Death (/showthread.php?tid=566152)



[HELP] - Making RP Death - ThePeaceMakeR - 03.03.2015

I have been trying to do this for like the last week or so. I make it fully working but it doesn't work in game. So I am looking for a new approach. At this point I am okay with downloading a script done already. So basically what I want to do is, when a player is shot or damaged to a certain extent ( lets say they get shot now they are at 30 hp) they will fall on the floor and perform an animation ( crack or parachute something that looks real ) and now they lie there till killed or revived. My rp has been released and I need this quick but its hard for me to make. So I am looking to you guys to help me do it.


Re : [HELP] - Making RP Death - Golimad - 03.03.2015

This is actually easy to make.
You only need these callbacks / functions :
ApplyAnimation(playerid, "PED", "BIKE_fall_off", 4.0, 0, 1, 1, 0, 0, 1);
OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) ( if amount > 30 .... )
TogglePlayerControllable(playerid, 0) https://sampwiki.blast.hk/wiki/TogglePlayerControllable
clearanimations ( after revived. )
TogglePlayerControllable(playerid, 1) to let them play again.

You just need to look, all these are available in the samp wiki.


Re: [HELP] - Making RP Death - ThePeaceMakeR - 04.03.2015

Already tried this it doesn't work for me.


Re: [HELP] - Making RP Death - IzadorO - 04.03.2015

If you want to make an exceptional death system, then do what Golimad has stated, with the addition of 'Create3DTextLabel'. Attach a 3DTextLabel to the body of the dead person, in which will state that they are certainly dead. You will also need to script in a timer in which states the time that the player in death mode will be able to /accept death, or whatever you are planning on doing. It is not that hard if you research it all.


Re : Re: [HELP] - Making RP Death - Golimad - 04.03.2015

Quote:
Originally Posted by ThePeaceMakeR
Посмотреть сообщение
Already tried this it doesn't work for me.
Why don't you show us some part of the code, this section of forums isn't made to script for you. Its made to help you fix bugs issues you got in your code. So show us where the compilation / error is so we can fix it.


Re: [HELP] - Making RP Death - ThePeaceMakeR - 04.03.2015

I am not saying I need you to script for me I already have an rp server fully scripted, all I need to know is why it says, "error 025: function heading differs from prototype" on this line, "public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)"


Re : [HELP] - Making RP Death - Golimad - 04.03.2015

Whatever, trying to help here and you still acting like a dumb person. How can we know where the hell is the error if you don't show us what you have written ? Cba.
Read http://forum.sa-mp.com/announcement.php?f=12 ( read Scripting Help )


Re: [HELP] - Making RP Death - ThePeaceMakeR - 04.03.2015

public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
new Float:health;
GetPlayerHealth(playerid,health);
if (health < 10.0)
{
SetPlayerDrunkLevel(playerid, 5000);
ApplyAnimation(playerid, "PED", "Sweet_injuredloop", 4.1, 1, 1, 1, 1, 1, 1);
}
return 1;
}
That is everything and it ways the error on the first line aka line 22


Re: [HELP] - Making RP Death - ThePeaceMakeR - 04.03.2015

Nevermind fixed it my self.


Re: [HELP] - Making RP Death - CrazyRussainHacker - 04.03.2015

If you can script this and then send me the script please i`m new to scripting i know how to edit stuff not to script