[FilterScript] RP Tazer System
#1

RP Taser System


Infos:
This is my second FS, more better than the first.
You need to turn on the taSer, with the command "/taseron", if the Taser is on, if you have fists you can use the tazer.
Who get hit by the Taser get freeze for 20 seconds and get the Crack anim.

How this works:
OnPlayerUpdate: With OnPlayerUpdate I do the Auto-Unequip when you switch with guns, for example: If you switch fists to Deagle, the taser will not show.

OnPlayerGiveDamage: With OnPlayerGiveDamage I do the taser system, the freeze and other.

Timers: I use the timers for the unfreeze and others.

Thanks to:
Norn' for GetDistanceBetweenPlayers and GetClosestPlayer.

Important:
This works ONLY for 0.3d, cuz this uses OnPlayerGiveDamage.
You can use this FS, but please, dont say this is your.

Video:
[ame]http://www.youtube.com/watch?v=lRrso4uMIBs[/ame]

Download:

Pastebin
(Just open a new Pawno script, delete all and copy and paste it.)

REP+ for the work?

Bugs? Any idea? Tell me in topic, I will script/fix in next versions!
Reply
#2

warning 235: public function lacks forward declaration (symbol "OnPlayerGiveDamage")
Reply
#3

Quote:
Originally Posted by BigBaws
View Post
warning 235: public function lacks forward declaration (symbol "OnPlayerGiveDamage")
You probably dont have last includes.

I dont have this problems.
Reply
#4

Nice , useful.
Reply
#5

Quote:
Originally Posted by BigBaws
View Post
warning 235: public function lacks forward declaration (symbol "OnPlayerGiveDamage")
Its working with SAMP 0.3d, anyway nice filterscript man, 3rep4u.
Reply
#6

Quote:
Originally Posted by WoodPecker
View Post
Its working with SAMP 0.3d, anyway nice filterscript man, 3rep4u.
Thanks
Reply
#7

Am.. it wouldn't work too? (check OnPlayerGiveDamage)

pawn Code:
#include <a_samp>

new TazerAcceso[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    TazerAcceso[playerid] = 0;
    return true;
}

public OnPlayerDisconnect(playerid, reason)
{
    TazerAcceso[playerid] = 0;
    return true;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    TazerAcceso[playerid] = 0;
    return true;
}

public OnPlayerUpdate(playerid)
{
    if(TazerAcceso[playerid])
    {
        if(GetPlayerWeapon(playerid) == 0)
        {
            SetPlayerAttachedObject(playerid, 7, 18642, 6, 0.06, 0.01, 0.08, 180.0, 0.0, 0.0);
            return true;
        }
       
        if(GetPlayerWeapon(playerid) != 0)
        {
            RemovePlayerAttachedObject(playerid, 7);
            return true;
        }
    }
    return true;
}

public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
    if(TazerAcceso[playerid])
    {
        if(GetPlayerWeapon(playerid) == 0)
        {
            ApplyAnimation(playerid, "KNIFE", "knife_3", 4.0, 0, 1, 1, 1, 1000);
            SetTimerEx("TimerClear", 2000, false, "d", playerid);
            if(IsPlayerConnected(damagedid))
            {
                new Float:health;
                GetPlayerHealth(damagedid, health);
                SetPlayerHealth(damagedid, health - 5.0);
                SetTimerEx("TimerFall", 300, false, "d", damagedid);
                TogglePlayerControllable(damagedid, 0);
                SetTimerEx("Untaze", 20000, false, "i", damagedid);
            }
        }
    }
    return true;
}

forward Untaze(playerid);
public Untaze(playerid)
{
    SendClientMessage(playerid, -1, "[Info:] You are not more Tased");
    TogglePlayerControllable(playerid, 1);
    return 1;
}

forward TimeClear(playerid);
public TimeClear(playerid)
{
    ClearAnimations(playerid);
}

forward TimerFall(playerid);
public TimerFall(playerid)
{
    ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
    SetTimerEx("TimerClear",19700,false,"d",playerid);
}

forward TimerCrack(playerid);
public TimerCrack(playerid)
{
    ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
    SetTimerEx("TimeClear",19700,false,"d",playerid);
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/taser", cmdtext, true, 5) == 0)
    {
        if(TazerAcceso[playerid])
        {
            TazerAcceso[playerid] = 0;
            RemovePlayerAttachedObject(playerid, 7);
            SendClientMessage(playerid,-1,"[Info:] You turn off your taser, for turn on type /tazeron .");
            SendClientMessage(playerid,-1,"[Info:] You turned off your taser! Remember to turn on it.");
        }
       
        else
        {
            TazerAcceso[playerid] = 1;
            SetPlayerAttachedObject(playerid, 7, 18642, 6, 0.06, 0.01, 0.08, 180.0, 0.0, 0.0);
            SendClientMessage(playerid,-1,"[Info:] Type /taser again to turn it off.");
            SendClientMessage(playerid,-1,"[Info:] The taser will auto-equip when you select the fists.");
            SendClientMessage(playerid,-1,"[Info:] For use the taser, you just need to punch with who you want use it.");
        }
        return true;
    }
    return false;
}
Reply
#8

https://sampforum.blast.hk/showthread.php?tid=314279

You criticized my tazer system but did exactly the same thing as me.

Mean.
Reply
#9

nicй
Reply
#10

Non Male Luca (Not Bad Luca)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)