Instant kill with baseball bat?
#1

Hey guys.

Is it possible to make a instant kill when
the killer uses a baseball bat in the player's back?

Greetz
Reply
#2

You can make it so every weapon is a 1 hit/shot kill by using instagib 1 in the server.cfg. But no, not just for 1 weapon and you can't detect what part.
Reply
#3

Quote:
Originally Posted by BP13
Посмотреть сообщение
You can make it so every weapon is a 1 hit/shot kill by using instagib 1 in the server.cfg. But no, not just for 1 weapon and you can't detect what part.
Yes you can, with some effort of course. This include, it's possible in this situation. http://forum.sa-mp.com/showthread.ph...erBehindPlayer. The code would be something like this.

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
     if(newkeys & KEY_FIRE) {
          if(GetPlayerWeapon(playerid) == 5) {
              for(new i = 0; i < GetMaxPlayers(); i++ ) {
                    if(!IsPlayerConnected(i)) continue;
                    if(IsPlayerBehindPlayer(playerid, i, 1.0)) {
                         SetPlayerHealth(i, 0);
                    }
              }
          }
     }
     return 1;
}
Reply
#4

wow thank you for that calton i was wondering how to 1 hit with knife

is it very accurate?
Reply
#5

Shows what I know..
Reply
#6

Quote:
Originally Posted by Kar
Посмотреть сообщение
wow thank you for that calton i was wondering how to 1 hit with knife

is it very accurate?
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
     if(newkeys & KEY_FIRE) {
          if(GetPlayerWeapon(playerid) == 4) {
              for(new i = 0; i < GetMaxPlayers(); i++ ) {
                    if(!IsPlayerConnected(i)) continue;
                    if(IsPlayerBehindPlayer(playerid, i, 1.0)) {
                         SetPlayerHealth(i, 0);
                    }
              }
          }
     }
     return 1;
}
Reply
#7

no it isn't if you were to stand back to back and swing, they would die.
Reply
#8

Quote:
Originally Posted by Daren_Jacobson
Посмотреть сообщение
no it isn't if you were to stand back to back and swing, they would die.
That was the whole point, read the topic posts.
Reply
#9

Back to back ... not you hitting his back ... grab a baseball bat, grab someone in your house and stand with your back touching their's, now swing the bat, bet you didn't hit them, with this script they would have died.
Reply
#10

Quote:
Originally Posted by BP13
Посмотреть сообщение
Shows what I know..
Quote:
Originally Posted by Daren_Jacobson
Посмотреть сообщение
Back to back ... not you hitting his back ... grab a baseball bat, grab someone in your house and stand with your back touching their's, now swing the bat, bet you didn't hit them, with this script they would have died.
1.0 to 0.4
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)