SA-MP Forums Archive
[searching]Hello im trying to get an deadmatch kicker. - 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: [searching]Hello im trying to get an deadmatch kicker. (/showthread.php?tid=155969)



[searching]Hello im trying to get an deadmatch kicker. - marnickx - 20.06.2010

Hello im searching for a anti deadmatch thing if the kill some one some where that the get kicked then and i already searched for it on the forum but couldent find it if you know one plz give me the link are help me how i make it myself.


Gr marnick


Re: [searching]Hello im trying to get an deadmatch kicker. - ViruZZzZ_ChiLLL - 20.06.2010

Its easy just put this under OnPlayerDeath callback :
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
 Kick(killerid);
 return 1;
}
That will basically kicked all those who DM.


Re: [searching]Hello im trying to get an deadmatch kicker. - marnickx - 20.06.2010

k thnx so even if they are flying in a hydra shoots some one they get kicked and ehm if ya fall death nothing happens?


gr marnick


Re: [searching]Hello im trying to get an deadmatch kicker. - ViruZZzZ_ChiLLL - 20.06.2010

Quote:
Originally Posted by marnickx
k thnx so even if they are flying in a hydra shoots some one they get kicked and ehm if ya fall death nothing happens?


gr marnick
Yes, only those who kills players will get kicked.


Re: [searching]Hello im trying to get an deadmatch kicker. - marnickx - 20.06.2010

ehm this is what i get i just putted in my gm what do i need to add more hehe?

Код:
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(808) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(808) : error 004: function "OnPlayerDeath" is not implemented
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(809) : warning 217: loose indentation
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(810) : error 017: undefined symbol "killerid"
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(815) : warning 225: unreachable code
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(815) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.



Re: [searching]Hello im trying to get an deadmatch kicker. - Sascha - 20.06.2010

try this
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(playerid != killerid){
new pname[MAX_PLAYER_NAME], string[256];
GetPlayerName(killerid, pname, sizeof(pname));
format(string, sizeof(string), "%s was kicked for deathmatching!", pname);
SendClientMessageToAll(YOURCOLOR, string);
Kick(killerid);
}
return 1;
}
Edit: haha just noticed I was to slow...well check if you got "public OnPlayerDeath" twice in your script now



Re: [searching]Hello im trying to get an deadmatch kicker. - marnickx - 20.06.2010

hehe now i have 8 errors xd
Код:
	public OnPlayerDeath(playerid, killerid, reason)
{
 	Kick(killerid);
	return 1;
}
	public OnPlayerDeath(playerid, killerid, reason)
	{
	if(playerid != killerid){
	new pname[MAX_PLAYER_NAME], string[256];
	GetPlayerName(killerid, pname, sizeof(pname));
	format(string, sizeof(string), "%s was kicked for deathmatching!", pname);
	SendClientMessageToAll(COLOR_RED, string);
	Kick(killerid);
}
ehm maybe u can put it in fs?
the errors
Код:
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(821) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(821) : error 004: function "OnPlayerDeath" is not implemented
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(822) : warning 217: loose indentation
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(823) : error 017: undefined symbol "killerid"
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(826) : warning 225: unreachable code
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(826) : warning 217: loose indentation
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(826) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(826) : error 004: function "OnPlayerDeath" is not implemented
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(828) : error 017: undefined symbol "killerid"
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(830) : error 017: undefined symbol "killerid"
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(833) : error 017: undefined symbol "killerid"
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(835) : warning 217: loose indentation
C:\Documents and Settings\Marnick\Bureaublad\samp03asvr_R7_win32\gamemodes\lol.pwn(838) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Errors.



Re: [searching]Hello im trying to get an deadmatch kicker. - Jay. - 20.06.2010

Dude

I'm in a nice mood today so i've made you a Filterscript.

Код:
#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
  print(" DeathMatch Kicker ");
  print(" Made by Xtreme   ");
}

#endif


public OnPlayerDeath(playerid,killerid,reason)
{
  Kick(killerid);
  return 1;
}
EDIT: Just save/complie p
the filterscript, Then put it in your Filterscripts folder, Name in cfg, Join the server..

And tada!

ANyone who kills will be kicked.


Re: [searching]Hello im trying to get an deadmatch kicker. - marnickx - 20.06.2010

that is all i need? hehe thnx man
and owya if i player joins and then i want some text to show i just need to use this?
Код:
public OnPlayerConnect(playerid)
{
  SendClientMessage(playerid, COLOR_YELLOW, "And here the info?");	
  return 1;
}



Re: [searching]Hello im trying to get an deadmatch kicker. - Jay. - 20.06.2010

Quote:
Originally Posted by marnickx
that is all i need? hehe thnx man
I updated my post look up, To see what to do.


And it should work.