One shot one kill by sniper.
#1

So yea, I wanted to make the sniper kills someone from 1 shot.

Can anyone help me?
Reply
#2

have you ever tried to read wiki from sa-mp?
Reply
#3

Here you go, but you could have easily figured this out yourself If you would have searched..
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(weaponid == 34)
    {
        SetPlayerHealth(playerid, 0.0);
    }
    return 1;
}
Reply
#4

Thank you guys.
Reply
#5

Quote:
Originally Posted by Schneider
Посмотреть сообщение
Here you go, but you could have easily figured this out yourself If you would have searched..
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(weaponid == 34)
    {
        SetPlayerHealth(playerid, 0.0);
    }
    return 1;
}
I'd recommend peforming IsPlayerConnected checks, aswell as making sure playerid, and issuerid are different. Some SA:MP functions crash if a bad player ID is given, which can cause a server crash, thus causing an exploit within your server. Just a FYI thing, though, SetPlayerHealth shouldn't crash to my knowledge if an invalid player ID is passed through.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)