SA-MP Forums Archive
Kill (suicide) - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Kill (suicide) (/showthread.php?tid=108992)



Kill (suicide) - SureShot - 17.11.2009

Hello, I dont know why o.o, but how I can do that if a player shoots at me and I write the command to kill, i'm the murder(suicide) and not the player who shoots on me?

_______________________________
You shoot on me (-x Health) -> I write /kill -> The shooter is the murder -.-


Re: Kill (suicide) - Abernethy - 17.11.2009

Erm.
I think if somebody shoots me, & you die of an invalid reason this occurs.
This is going off experience, not any actually known knowledge. Please, if i'm wrong, somebody correct me.

By the way, this isn't a scripting issue.


Re: Kill (suicide) - virspector - 17.11.2009

Quote:
Originally Posted by Aber
Erm.
I think if somebody shoots me, & you die of an invalid reason this occurs.
This is going off experience, not any actually known knowledge. Please, if i'm wrong, somebody correct me.

By the way, this isn't a scripting issue.
Yep, u right. This is SA:MP Bug


Re: Kill (suicide) - SureShot - 17.11.2009

well. i must not delete the command, befor a player abuse it`?


Re: Kill (suicide) - retart441 - 17.11.2009

Quote:
Originally Posted by SureShot
well. i must not delete the command, befor a player abuse it`?
wtf are you talking about?


Re: Kill (suicide) - SureShot - 18.11.2009

yeah, because i makes a TDM Server, and if a player shoot on a teammate than the other write the kill command. Shooter = Murder -.-


Re: Kill (suicide) - pen_theGun - 18.11.2009

pawn Код:
//global var
new killtyper=0; //somewhere top in your script

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmd, "/kill", true) == 0)
        return killtyper=playerid+1, SetPlayerHealth(playerid, 0), 1;
   
}

public OnPlayerDeath(playerid, killerid, reason)
{
    if( killtyper ) /* ++++ */ /*put this under OnPlayerDeath*/
    {
        if( killtyper == playerid+1)
        {
            killtyper=0, killerid = INVALID_PLAYER_ID;
            //reason=random(2)?(14):(46); // optional
        }
    } /* ---- */
   
    ....
    ....
}