SA-MP Forums Archive
[FilterScript] Head Shot System - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Head Shot System (/showthread.php?tid=637894)



Head Shot System - 2Aternal2 - 23.07.2017

Iam today make HeadShot System To Give All People With Text Message

I hope you have fun with this system


>> Download


Link: https://www.mrkzgulf.com/b7ea9pp9qe0q




Regards, Aternal



Re: Head Shot System - [G]am3r - 23.07.2017

Provide source code, and this isn\'t a filterscript. Making a headshot system is too easy and anyone can make it, there are other tutorials about headshot system and also filterscripts, so why releasing a new one?


Re: Head Shot System - 2Aternal2 - 23.07.2017

But iam old scripter and iam want to help people now


Re: Head Shot System - SilverScripter - 23.07.2017

Remove Post

Because

1>You Are Giving AMX

2> Too Easy Too Make

HeadShot System Too Easy

Code:
public OnPlayerTakeDamage(playerid, playerid2, arg2, arg3, arg4)
{
	if(65535 != playerid2 && arg3 == 34 && arg4 == 9)
	{
		new var0[100], var1[24], var2[24];
		GetPlayerName(playerid, var1, 24);
		GetPlayerName(playerid2, var2, 24);
		format(var0, 100, "[RBot]:%s(%i) was shoot to the head by %s(%i)", var1, playerid, var2, playerid2);
		SendClientMessageToAll(0x00F00FFF, var0);
		GameTextForPlayer(playerid2, "~r~Headshot", 2000, 3);
		PlayerPlaySound(playerid2, 17802, 0.0, 0.0, 0.0);
		GameTextForPlayer(playerid, "~r~Headshot", 2000, 3);
		PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0);
		SetPlayerHealth(playerid, 0.0);
	}
	return 1;
}

public OnPlayerConnect(playerid)
{
	new var0[24], var1[46];
	GetPlayerName(playerid, var0, 24);
	format(var1, 46, "%s has joined the server", var0);
	SendClientMessageToAll(0xAAAAAAAA, var1);
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	new var0[24], var1[63];
	GetPlayerName(playerid, var0, 24);
	switch(reason) {
		case 0:
			format(var1, 63, "%s has left the server. (Lost Connection)", var0);
		case 1:
			format(var1, 63, "%s has left the server. (Leaving)", var0);
		case 2:
			format(var1, 63, "%s has left the server. (Kicked)", var0);
	}
	SendClientMessageToAll(0xAAAAAAAA, var1);
	return 1;
}
Here Is The Code Okay


Re: Head Shot System - [G]am3r - 23.07.2017

Quote:
Originally Posted by 2Aternal2
View Post
But iam old scripter and iam want to help people now
You want to help people? Then make something better which can really help people, this thing can be found easily. And there is also a great tutorial for it too.


Re: Head Shot System - 2Aternal2 - 23.07.2017

Ok Gam3r


Re: Head Shot System - SilverScripter - 23.07.2017

Aternal Can You Please Stop Copying Pasting This Systems From Others FilterScripts


Can\'t You make Your Own


Re: Head Shot System - iLearner - 23.07.2017

The wiki page literally gives you headshot script at OnPlayerTakeDamage page.


Re: Head Shot System - Venom546 - 21.09.2018

Quote:
Originally Posted by SilverScripter
View Post
Remove Post

Because

1>You Are Giving AMX

2> Too Easy Too Make

HeadShot System Too Easy

Code:
public OnPlayerTakeDamage(playerid, playerid2, arg2, arg3, arg4)
{
	if(65535 != playerid2 && arg3 == 34 && arg4 == 9)
	{
		new var0[100], var1[24], var2[24];
		GetPlayerName(playerid, var1, 24);
		GetPlayerName(playerid2, var2, 24);
		format(var0, 100, "[RBot]:%s(%i) was shoot to the head by %s(%i)", var1, playerid, var2, playerid2);
		SendClientMessageToAll(0x00F00FFF, var0);
		GameTextForPlayer(playerid2, "~r~Headshot", 2000, 3);
		PlayerPlaySound(playerid2, 17802, 0.0, 0.0, 0.0);
		GameTextForPlayer(playerid, "~r~Headshot", 2000, 3);
		PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0);
		SetPlayerHealth(playerid, 0.0);
	}
	return 1;
}

public OnPlayerConnect(playerid)
{
	new var0[24], var1[46];
	GetPlayerName(playerid, var0, 24);
	format(var1, 46, "%s has joined the server", var0);
	SendClientMessageToAll(0xAAAAAAAA, var1);
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	new var0[24], var1[63];
	GetPlayerName(playerid, var0, 24);
	switch(reason) {
		case 0:
			format(var1, 63, "%s has left the server. (Lost Connection)", var0);
		case 1:
			format(var1, 63, "%s has left the server. (Leaving)", var0);
		case 2:
			format(var1, 63, "%s has left the server. (Kicked)", var0);
	}
	SendClientMessageToAll(0xAAAAAAAA, var1);
	return 1;
}
Here Is The Code Okay
boi i use ur code and see which error i got

Code:
E:\My Servers\AW\gamemodes\AW.pwn(9933) : error 025: function heading differs from prototype
i use this code for it
Code:
public OnPlayerTakeDamage(playerid, arg2, arg3, arg4, issuerid, Float: amount, weaponid)
{
   if(65535 != issuerid && arg3 == 34 && arg4 == 9)
	{
		new var0[100], var1[24], var2[24];
		GetPlayerName(playerid, var1, 24);
		GetPlayerName(issuerid, var2, 24);
		format(var0, 100, "[RBot]:%s(%i) was shoot to the head by %s(%i)", var1, playerid, var2, issuerid);
		SendClientMessageToAll(0x00F00FFF, var0);
		GameTextForPlayer(issuerid, "~r~Headshot", 2000, 3);
		PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0);
		GameTextForPlayer(playerid, "~r~Headshot", 2000, 3);
		PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0);
		SetPlayerHealth(playerid, 0.0);
	}
now tell me what should i do


Re: Head Shot System - Lokii - 21.09.2018

Quote:
Originally Posted by Venom546
View Post
boi i use ur code and see which error i got

Code:
E:\My Servers\AW\gamemodes\AW.pwn(9933) : error 025: function heading differs from prototype
i use this code for it
Code:
public OnPlayerTakeDamage(playerid, arg2, arg3, arg4, issuerid, Float: amount, weaponid)
{
   if(65535 != issuerid && arg3 == 34 && arg4 == 9)
	{
		new var0[100], var1[24], var2[24];
		GetPlayerName(playerid, var1, 24);
		GetPlayerName(issuerid, var2, 24);
		format(var0, 100, "[RBot]:%s(%i) was shoot to the head by %s(%i)", var1, playerid, var2, issuerid);
		SendClientMessageToAll(0x00F00FFF, var0);
		GameTextForPlayer(issuerid, "~r~Headshot", 2000, 3);
		PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0);
		GameTextForPlayer(playerid, "~r~Headshot", 2000, 3);
		PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0);
		SetPlayerHealth(playerid, 0.0);
	}
now tell me what should i do
You could just make it yourself

PHP Code:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart)
{
    if(
issuerid != 0xFFFF && GetPlayerWeapon(issuerid) > 21 && bodypart == 9)
    {
        
SetPlayerHealth(playerid0.0);
    }
    return 
0;




Re: Head Shot System - Mazio - 22.09.2018

You can see this for better code : https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage

And for those who would like to see the tutorial, here is it : https://sampforum.blast.hk/showthread.php?tid=626185


Next time, try uploading your stuff on GitHub with source code.


Re: Head Shot System - OKStyle - 16.12.2018

Quote:
Originally Posted by Lokii
View Post
You could just make it yourself

PHP Code:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart)
{
    if(
issuerid != 0xFFFF && GetPlayerWeapon(issuerid) > 21 && bodypart == 9)
    {
        
SetPlayerHealth(playerid0.0);
    }
    return 
0;

GetPlayerWeapon(issuerid) != weaponid


Re: Head Shot System - Wherethescripters - 13.01.2019

Too easy to make....