SA-MP Forums Archive
[FilterScript] My 1st 2 Script Fightstyle and Anti-Spawn Kill - 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] My 1st 2 Script Fightstyle and Anti-Spawn Kill (/showthread.php?tid=470465)



My 1st 2 Script Fightstyle and Anti-Spawn Kill - Meow22 - 18.10.2013

Hello Everyone whois seeing this topic,

This is my 1st FS

Anti-Spawn Kill

Fightstyle

Anti-Spawn Kill


if u want to change the timer of anti-spawn kill

and if u want Player to not have any kinda weapon

if(GetPlayerWeapon(playerid) == 42) ResetPlayerWeapons(playerid);

Just Write any idea and when player will spawn that weapon id it will disappear

I have added some ids

Code:
  if(GetPlayerWeapon(playerid) == 38) ResetPlayerWeapons(playerid); //Minigun
    if(GetPlayerWeapon(playerid) == 9) ResetPlayerWeapons(playerid);  //Chainsaw
    if(GetPlayerWeapon(playerid) == 18) ResetPlayerWeapons(playerid); //Molotov Cocktail
    if(GetPlayerWeapon(playerid) == 35) ResetPlayerWeapons(playerid); //RPG
    if(GetPlayerWeapon(playerid) == 36) ResetPlayerWeapons(playerid); //HS Rocket
    if(GetPlayerWeapon(playerid) == 37) ResetPlayerWeapons(playerid); //Flamethrower
    if(GetPlayerWeapon(playerid) == 42) ResetPlayerWeapons(playerid); //Fire Extinguisher
pawn Code:
#define PROTECTIONTIME 5000
Just Change the number to any second u want Ex:

10000
12000
13000

pawn Code:
//By Meow22

#include <a_samp>

#define COLOR_GREEN 0x00FF00

#define PROTECTIONTIME 5000

forward AntiSpawnkill(playerid);
public OnFilterScriptInit()
{
    print("\n-------------------------------------------");
    print("    * Spawn Protection Created By Meow22 *   ");
    print("--------------------------------------\n-----");
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerHealth(playerid, 10000.0);
    new str[128];
    format(str, sizeof(str), "You are Protected for %d 5 Seconds)", PROTECTIONTIME);
    SendClientMessage(playerid, COLOR_GREEN, str);
    SetTimerEx("AntiSpawnkill",PROTECTIONTIME*1000,0,"d",playerid);
    return 1;
}

public AntiSpawnkill(playerid)
{
    SetPlayerHealth(playerid, 100.0);
    return 1;
}

public OnPlayerUpdate(playerid)
{
    if(GetPlayerWeapon(playerid) == 38) ResetPlayerWeapons(playerid);
    if(GetPlayerWeapon(playerid) == 9) ResetPlayerWeapons(playerid);
    if(GetPlayerWeapon(playerid) == 18) ResetPlayerWeapons(playerid);
    if(GetPlayerWeapon(playerid) == 35) ResetPlayerWeapons(playerid);
    if(GetPlayerWeapon(playerid) == 36) ResetPlayerWeapons(playerid);
    if(GetPlayerWeapon(playerid) == 37) ResetPlayerWeapons(playerid);
    if(GetPlayerWeapon(playerid) == 42) ResetPlayerWeapons(playerid);
    return 1;
}
Fight Style


pawn Code:
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Made By Meow22");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

if (strcmp("/fightstyle", cmdtext, true, 11) == 0)
    {
        ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "What Fight Style you Want Choose it!", "Normal\nBoxing\nKungfu\nKneeHead\nGrabKick\nElbow", "Change", "Cancel");
        return 1;
    }


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
    {
    switch(dialogid)
   
        case 3:
            {
            switch(listitem)
            {
                case 0:
                {
                    SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
                    SendClientMessage(playerid, 0x00FF00, "You have changed your fighting style to the Normal fight style!");
                }
                case 1:
                {
                    SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
                    SendClientMessage(playerid, 0x00FF00, "You have changed your fighting style to the Boxing fight style!");
                }
                case 2:
                {
                    SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
                    SendClientMessage(playerid, 0x00FF00, "You have changed your fighting style to the Kungfu fight style!");
                }
                case 3:
                {
                    SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
                    SendClientMessage(playerid, 0x00FF00, "You have changed your fighting style to the KneeHead fight style!");
                }
                case 4:
                {
                    SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
                    SendClientMessage(playerid, 0x00FF00, "You have changed your fighting style to the GrabKick fight style!");
                }
                case 5:
                {
                    SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
                    SendClientMessage(playerid, 0x00FF00, "You have changed your fighting style to the Elbow fight style!");
                }
            }
            }
        }
    }

            return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif
Anti-Spawn Kill Download!
FightStyle Download!


Re: My 1st 2 Script Fightstyle and Anti-Spawn Kill - qazwsx - 18.10.2013

Nice Filterscript, anw there is a bit mistake:

pawn Code:
#define PROTECTIONTIME 5
if it is on second, it should be 5000 not 5.

On Topic:Good job (Y)


Re: My 1st 2 Script Fightstyle and Anti-Spawn Kill - Pottus - 18.10.2013

This is a lousy way to do it why not set their VW after X seconds instead that is how a real man does spawn protection.


Re: My 1st 2 Script Fightstyle and Anti-Spawn Kill - Meow22 - 18.10.2013

Quote:
Originally Posted by qazwsx
View Post
Nice Filterscript, anw there is a bit mistake:

pawn Code:
#define PROTECTIONTIME 5
if it is on second, it should be 5000 not 5.

On Topic:Good job (Y)
Well thanks for taking out the bug I will fix it now


Re: My 1st 2 Script Fightstyle and Anti-Spawn Kill - Jankingston - 18.10.2013

good, keep it up


Re: My 1st 2 Script Fightstyle and Anti-Spawn Kill - Meow22 - 18.10.2013

Quote:
Originally Posted by Jankingston
View Post
good, keep it up
Thanks


Re: My 1st 2 Script Fightstyle and Anti-Spawn Kill - Nofear192 - 18.10.2013

Nice job as ur 1st fs keep igt up


Re: My 1st 2 Script Fightstyle and Anti-Spawn Kill - TheChimpJr - 18.10.2013

Not bad mate.


Re: My 1st 2 Script Fightstyle and Anti-Spawn Kill - Meow22 - 19.10.2013

Quote:
Originally Posted by Nofear192
View Post
Nice job as ur 1st fs keep igt up
Quote:
Originally Posted by TheChimpJr
View Post
Not bad mate.
Thank You


Re: My 1st 2 Script Fightstyle and Anti-Spawn Kill - Xtream - 19.10.2013

Nice Job I like it!