SA-MP Forums Archive
Instant kill with baseball bat? - 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: Instant kill with baseball bat? (/showthread.php?tid=165368)



Instant kill with baseball bat? - Shadow_Gengar - 04.08.2010

Hey guys.

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

Greetz


Re: Instant kill with baseball bat? - BP13 - 04.08.2010

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.


Re: Instant kill with baseball bat? - Carlton - 04.08.2010

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;
}



Re: Instant kill with baseball bat? - Kar - 04.08.2010

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

is it very accurate?


Re: Instant kill with baseball bat? - BP13 - 04.08.2010

Shows what I know..


Re: Instant kill with baseball bat? - Carlton - 04.08.2010

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;
}



Re: Instant kill with baseball bat? - Daren_Jacobson - 04.08.2010

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


Re: Instant kill with baseball bat? - Carlton - 04.08.2010

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.


Re: Instant kill with baseball bat? - Daren_Jacobson - 04.08.2010

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.


Re: Instant kill with baseball bat? - Kar - 04.08.2010

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