[HELP] - Making RP Death
#1

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.
Reply
#2

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.
Reply
#3

Already tried this it doesn't work for me.
Reply
#4

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.
Reply
#5

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.
Reply
#6

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)"
Reply
#7

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 )
Reply
#8

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
Reply
#9

Nevermind fixed it my self.
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)