SA-MP Forums Archive
[FilterScript] Flower Death - 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] Flower Death (/showthread.php?tid=474856)



Flower Death - Pottus - 10.11.2013

Just a stupid idea I did for the hell of it. When a player dies flowers will spawn and rise out of the ground of their death spot in a few seconds.

pawn Код:
#include <a_samp>

#define         MAX_FLOWERS         50
#define         FLOWER_OBJECT       325
#define         RAISE_DELAY         3000
#define         CLEAR_TIME          5000

new Flowers[MAX_FLOWERS] = { -1, ... };


public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Flower death by [uL]Pottus");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    for(new i = 0; i < MAX_FLOWERS; i++)
    {
        if(Flowers[i] != -1) DestroyObject(Flowers[i]);
    }
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    SetTimerEx("RaiseFlowers", RAISE_DELAY, false, "fff", x, y, z);
    return 1;
}

forward RaiseFlowers(Float:x, Float:y, Float:z);
public RaiseFlowers(Float:x, Float:y, Float:z)
{
    for(new i = 0; i < MAX_FLOWERS; i++)
    {
        if(Flowers[i] == -1)
        {
            Flowers[i] = CreateObject(FLOWER_OBJECT, x, y, z-1.5, 0.0, 0.0, 0.0, 300.0);
            MoveObject(Flowers[i], x, y, z-1.0, 0.5);
            SetTimerEx("ClearFlowers", CLEAR_TIME, false, "i", i);
            return 1;
        }
    }
    return 0;
}

forward ClearFlowers(id);
public ClearFlowers(id)
{
    DestroyObject(Flowers[id]);
    Flowers[id] = -1;
    return 1;
}



Re: Flower Death - Sublime - 10.11.2013

you are so kind arent you


Re: Flower Death - Pottus - 10.11.2013

Quote:
Originally Posted by Sublime
Посмотреть сообщение
you are so kind arent you
Well it's certainly more kind hearted than the shit script.

https://sampforum.blast.hk/showthread.php?tid=417899
[ame]http://www.youtube.com/watch?v=6bs3f6ofMAI[/ame]


Re: Flower Death - MohanedZzZ - 10.11.2013

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
Nice work bro


Re: Flower Death - CyNiC - 10.11.2013

Comic scripts, these things are cool.


Re: Flower Death - Salim_Karaja - 10.11.2013

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
what is this object used when player get killed ?
this huge blood spray ..
sorry for bad english


Re: Flower Death - Jankingston - 10.11.2013

Nyc!!! +rep


Re: Flower Death - Pottus - 10.11.2013

Quote:
Originally Posted by Salim_Karaja
Посмотреть сообщение
what is this object used when player get killed ?
this huge blood spray ..
sorry for bad english
18668


Re: Flower Death - xF4Life - 10.11.2013

the shit one is better than this to me, nice


Re: Flower Death - PT - 10.11.2013

LOL, crazy,, but nice idea

+rep