SA-MP Forums Archive
[FilterScript] Simple Anti-Spawnkill for 10 seconds - 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] Simple Anti-Spawnkill for 10 seconds (/showthread.php?tid=186644)



Simple Anti-Spawnkill for 10 seconds - Mean - 30.10.2010

This is just a simple filterscript since I saw many people don't know how to make Anti-Spawnkill



DOWNLOAD: http://www.zshare.net/download/8214801937408666/


Use it wisely


Re: Simple Anti-Spawnkill for 10 seconds - Lorenc_ - 30.10.2010

Nice filterscript altho i think viruzzzz_chill made something like this (forgot howto spell his name xD)


Re: Simple Anti-Spawnkill for 10 seconds - Mean - 30.10.2010

Didn't see
Anyways thanks
It has 27 lines xD


Re: Simple Anti-Spawnkill for 10 seconds - rbN. - 30.10.2010

pawn Код:
#include <a_samp>
forward AntiSpawnkill(playerid);
public OnFilterScriptInit() { print("\n--------------------------------------"), print("* Anti-Spawnkill by Mean loaded"), print("--------------------------------------\n"); return 1;}
public OnPlayerSpawn(playerid) { SetPlayerHealth(playerid, 10000.0), SendClientMessage(playerid, 0xFF0000AA, "You have 10 seconds of Anti-Spawnkill protection"), SetPlayerChatBubble(playerid, "Anti-Spawnkill protected player", 0xFF0000AA, 100.0, 10000),SetTimerEx("AntiSpawnkill",10000,0,"d",playerid);}
public AntiSpawnkill(playerid) { SetPlayerHealth(playerid, 100.0), SendClientMessage(playerid, 0xFF0000AA, "Anti-Spawnkill protection over, you are on your own now");}
5 lines now :P

(was bored)

maybe an suggestion:

pawn Код:
#include <a_samp>

#define PROTECTIONTIME 10 //Inseconds

forward AntiSpawnkill(playerid);
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("* Anti-Spawnkill by Mean loaded");
    print("--------------------------------------\n");
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerHealth(playerid, 10000.0);
    new str[128];
    format(str, sizeof(str), "You can't be killed for %d second(s) (spawn protection)", PROTECTIONTIME);
    SendClientMessage(playerid, 0xFF0000AA, str);
    SetPlayerChatBubble(playerid, "Anti-Spawnkill protected player", 0xFF0000AA, 100.0, 10000);
    SetTimerEx("AntiSpawnkill",PROTECTIONTIME*1000,0,"d",playerid);
    return 1;
}

public AntiSpawnkill(playerid)
{
    SetPlayerHealth(playerid, 100.0);
    SendClientMessage(playerid, 0xFF0000AA, "Anti-Spawnkill protection over, you are on your own now");
    return 1;
}
Just that you can change the anti spawn kill time


Re: Simple Anti-Spawnkill for 10 seconds - edijs21 - 30.10.2010

great fs,i will use it


Re: Simple Anti-Spawnkill for 10 seconds - willsuckformoney - 30.10.2010

Nice a friend needs this.


Re: Simple Anti-Spawnkill for 10 seconds - Mean - 30.10.2010

Quote:
Originally Posted by edijs21
Посмотреть сообщение
great fs,i will use it
Quote:
Originally Posted by willsuckformoney
Посмотреть сообщение
Nice a friend needs this.
Thanks


Re: Simple Anti-Spawnkill for 10 seconds - OleKristian95 - 16.04.2011

Quote:
Originally Posted by RobinOwnz
Посмотреть сообщение
pawn Код:
#include <a_samp>
forward AntiSpawnkill(playerid);
public OnFilterScriptInit() { print("\n--------------------------------------"), print("* Anti-Spawnkill by Mean loaded"), print("--------------------------------------\n"); return 1;}
public OnPlayerSpawn(playerid) { SetPlayerHealth(playerid, 10000.0), SendClientMessage(playerid, 0xFF0000AA, "You have 10 seconds of Anti-Spawnkill protection"), SetPlayerChatBubble(playerid, "Anti-Spawnkill protected player", 0xFF0000AA, 100.0, 10000),SetTimerEx("AntiSpawnkill",10000,0,"d",playerid);}
public AntiSpawnkill(playerid) { SetPlayerHealth(playerid, 100.0), SendClientMessage(playerid, 0xFF0000AA, "Anti-Spawnkill protection over, you are on your own now");}
5 lines now :P

(was bored)

maybe an suggestion:

pawn Код:
#include <a_samp>

#define PROTECTIONTIME 10 //Inseconds

forward AntiSpawnkill(playerid);
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("* Anti-Spawnkill by Mean loaded");
    print("--------------------------------------\n");
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerHealth(playerid, 10000.0);
    new str[128];
    format(str, sizeof(str), "You can't be killed for %d second(s) (spawn protection)", PROTECTIONTIME);
    SendClientMessage(playerid, 0xFF0000AA, str);
    SetPlayerChatBubble(playerid, "Anti-Spawnkill protected player", 0xFF0000AA, 100.0, 10000);
    SetTimerEx("AntiSpawnkill",PROTECTIONTIME*1000,0,"d",playerid);
    return 1;
}

public AntiSpawnkill(playerid)
{
    SetPlayerHealth(playerid, 100.0);
    SendClientMessage(playerid, 0xFF0000AA, "Anti-Spawnkill protection over, you are on your own now");
    return 1;
}
Just that you can change the anti spawn kill time
Will the protected player be able to shoot the other players around?


Re: Simple Anti-Spawnkill for 10 seconds - Mark™ - 16.04.2011

No nobody can cuz all players will have unlimited health for 10 secs ! ! !


Re: Simple Anti-Spawnkill for 10 seconds - XxDarkRenderxX - 28.05.2011

thanks gonna use for my server