Kill (suicide)
#1

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

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

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

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

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

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

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
        }
    } /* ---- */
   
    ....
    ....
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)