[FilterScript] (Useful) DeathBody base code
#1

DeathBody base code

Link: http://pastebin.com/3nZ30PbL

You can create a DeathBody using the function listed down

Note: You need mapandreas plugin (https://sampforum.blast.hk/showthread.php?tid=120013)

pawn Code:
Function CreateDeathBody(Float:X, Float:Y, Float:Z, Expire_Seconds = 60)
         This function create a death body in the x y z position
         you can also add a expire time (default 60 seconds)


Function DeleteDeathBody(DeathBody_ID)
         This function delete a death body by giving a deathbody ID

Function DeleteAllDeathBody()
         This function delete all existing death body

Function FindFreeDeathBody()
         This function find a free death body id from the MAX_DEATH_BODY

Function FindNearDeathBodyID(playerid,Float:Range)
         This function find a near body you can give the range


Function PickupDeathBody(playerid)
         This function pickup a body from the ground

Function DropDeathBody(playerid)
         This function drop a body to the ground
There is some test commands in the script

pawn Code:
/*
        Create a normal death body (60 sec expire)
    */

    if(strcmp(cmdtext,"/TestDeathBody",true) == 0)
    {
        new Float:POS[3];
        GetPlayerPos(playerid,POS[0],POS[1],POS[2]);
        CreateDeathBody(POS[0],POS[1],POS[2]);
        return 1;
    }
    /*
        Create a timed death body (5 sec expire)
    */

    if(strcmp(cmdtext,"/TestDeathBody5",true) == 0)
    {
        new Float:POS[3];
        GetPlayerPos(playerid,POS[0],POS[1],POS[2]);
        CreateDeathBody(POS[0],POS[1],POS[2],5);//Check CreateDeathBody function
        return 1;
    }
    /*
        Pickup the death body from the ground
    */

    if(strcmp(cmdtext,"/pickupbody",true) == 0)
    {
        PickupDeathBody(playerid);
        return 1;
    }
    /*
        Drop the death body in the ground and the timing for exipre will start again
    */

    if(strcmp(cmdtext,"/dropbody",true) == 0)
    {
        DropDeathBody(playerid);
        return 1;
    }





CHANGELOG:
none


For suggestions just post!
Reply
#2

Good but not useful for most people.
Reply
#3

useful for who want do some with death body
Reply
#4

this is cool for roleplay
Reply
#5

Quote:
Originally Posted by iJumbo
View Post
useful for who want do some with death body
Nekro..



Cool! It's very useful for roleplay's serwers!
Reply
#6

heheheh nice idea to make some this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)