Death System
#1

Hey I need help i am trying to make a death system like when you die your body is left behind but since your actual character cant be left behind i wanna make a dead tied up cop left behind instead I can make all the commands and stuff I just need help to make a cop appear after you die. I also want the words to appear like whos body it is and how long ago they died and what weapon was used basically i want something like this
Reply
#2

OnPlayerDeath
Create3DTextlabel
CreateObject
Gettime();

this are the functions you are going to need.
if you just look up these functions on ****** and on the wiki, i'm pretty sure you can come very far
Reply
#3

pawn Код:
/*ontop */
new Object[MAX_PLAYERS];
new label[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
new Float:x,Float:y,Float:z,string[256],Name[MAX_PLAYER_NAME];
GetPlayerPos(playerid, x,y,z);
GetPlayerName(playerid, Name,sizeof(Name));
format(string, sizeof(string),"Body of %s",Name);
label[playerid] = Create3DTextLabel(string, 0xFF0000FF,x,y,z+3,40.0,0,0);
Object[playerid] = CreateObject(3907, x,y,z+1, 0.0, 0.0, 0.0,100.0);
SetTimer("DestroyObject",5000,0);
return 1;
}
forward DestroyObject(playerid);
public DestroyObject(playerid)
{
DestroyObject(object[playerid]);
Delete3DTextLabel(label[playerid]);
return 1;
}
Hope it will work
Reply
#4

thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)