SA-MP Forums Archive
Object when Person died - 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: Object when Person died (/showthread.php?tid=496581)



Object when Person died - Blackazur - 22.02.2014

Hello, how can i make that when a person die that he leave's an object behind him?


Re: Object when Person died - redneckvideogamer - 22.02.2014

Create the object here


AW: Object when Person died - Blackazur - 22.02.2014

Can you give me an short example?


Re: Object when Person died - redneckvideogamer - 22.02.2014

Sure:

pawn Код:
new deathObj[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    deathObject[playerid] = CreateObject...
    return 1;
}
EDIT: Tested it, it should work