09.03.2013, 00:41
So I've added another talent to my code, which is called Suicider. Pretty self explanatory. You spawn, and when you die, you explode. (The explosion lights players in a 6.0 radius on fire.) But when/if they die from the fire, I want the person who created the explosion to receive credit for the kill. In this case, get money and score.
Here's some of my code that I have added.
This is under OnPlayerDeath. Pretty self-explanatory code as well. When you die, you create a explosion at your location.
Now would I define CreateExplosion as a variable?
Something like that? Because I'm totally lost.
Any help is appreciated. Much love.
Here's some of my code that I have added.
pawn Код:
if(PlayerInfo[playerid][pTalent] == 5)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateExplosion(x, y, z, 1, 6.0);
SendClientMessage(playerid, COLOR_BRIGHTRED, "BOOM!!!");
ForceClassSelection(playerid);
SetPlayerHealth(playerid, 0);
}
Now would I define CreateExplosion as a variable?
pawn Код:
new explosion = CreateExplosion
Any help is appreciated. Much love.