[FilterScript] [FS]Weapons&MoneyOnPlayerDeath
#1

Hello today i just Bored and make one simple Filterscript.
i have see the gamerX server when the player Died then The Pickup Droped by player Death on the place..

Feature:
Function OnplayerDeath Only ...
Free Use AS FILTERSCRIPT OR GAMEMODE just copy the code to your gamemode.
.When Then Player Death the weapons droped by player death on the place,..where is
player has died....Going To Pickup it you will get Weapons and money from the pickup

PAWN CODE:
pawn Код:
#include <a_samp>
#define FILTERSCRIPT

#define COLOR_RED 0xAA3333AA

// onplyaerdeath function
new PickupPlayerDeath1;
new PickupPlayerDeath2;
new PickupPlayerDeath3;
//----------------------

public OnFilterScriptInit()
{
    print("\n--------------------------");
    print(" FILTERSCRIPT BY DR.GHOST");
    print("---------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
        new Float:X,Float:Y,Float:Z;
       GetPlayerPos(playerid,X,Y,Z);
        PickupPlayerDeath1 = CreatePickup(1550, 3,X+2,Y,Z);
        PickupPlayerDeath2 = CreatePickup(353, 3,X+4,Y,Z);
    PickupPlayerDeath3 = CreatePickup(337, 3,X+5,Y,Z);
   
    GameTextForPlayer(playerid,"~r~L~b~O~r~L Y~Y~O~b~U ~r~D~b~I~g~E~y~D!!!",5000,5);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/kill", true) == 0)
    {
        SetPlayerHealth(playerid,0.0);
        return 1;
    }
    return 0;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
     // Has testing when player death droped weapons.
    if(pickupid == PickupPlayerDeath1)
    {
    GivePlayerMoney(playerid,15080);
        PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
        DestroyPickup(PickupPlayerDeath1);
        }
        if(pickupid == PickupPlayerDeath2)
    {
       GivePlayerWeapon(playerid,29,9999);
       PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
       DestroyPickup(PickupPlayerDeath2);
       }
       if(pickupid == PickupPlayerDeath3)
    {
    GivePlayerWeapon(playerid,6,9999);
    PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
    DestroyPickup(PickupPlayerDeath3);
        }
    return 1;
}

ScreenShot:


Free to comment it. ..

Known Bugs: Not. have tested it,

DOWNLOAD:
http://up.ht/ganC6B
Reply
#2

....
Reply
#3

Quote:
Originally Posted by Eirikm
Посмотреть сообщение
Nice, always wanted things from gamerx server :P
yes xD .. thanks comment yea
Reply
#4

Good job
Reply
#5

SUGGESTION:

OnTop

pawn Код:
new moneyz;
Under OnPlayerDeath

pawn Код:
moneyz = GetPlayerMoney(playerid);
Under OnPlayerPickUpPickup

Replace

pawn Код:
GivePlayerMoney(playerid,15080);
To

pawn Код:
GivePlayerMoney(playerid,moneyz);
Reply
#6

It's nice but, why not spawning the weapon as pickup that the player had in his hands, with the ammo that's left?
Reply
#7

For that one do this:

OnTop

pawn Код:
new weaponz;
new ammoz;
Under OnPlayerDeath

pawn Код:
weaponz = GetPlayerWeapon(playerid);
ammoz = GetPlayerAmmo(playerid);
Under OnPlayerPickUpPickup

Replace

pawn Код:
GivePlayerWeapon(playerid,29,9999);
with

pawn Код:
GivePlayerWeapon(playerid, weaponz, ammoz);
Reply
#8

Quote:
Originally Posted by BBAT
Посмотреть сообщение
For that one do this:

OnTop

pawn Код:
new weaponz;
new ammoz;
Under OnPlayerDeath

pawn Код:
weaponz = GetPlayerWeapon(playerid);
ammoz = GetPlayerAmmo(playerid);
Under OnPlayerPickUpPickup

Replace

pawn Код:
GivePlayerWeapon(playerid,29,9999);
with

pawn Код:
GivePlayerWeapon(playerid, weaponz, ammoz);
nice! sugguestion thanks all .
Reply
#9

verry simple but funny ^^
Reply
#10

Quote:
Originally Posted by BBAT
Посмотреть сообщение
For that one do this:

OnTop

pawn Код:
new weaponz;
new ammoz;
Under OnPlayerDeath

pawn Код:
weaponz = GetPlayerWeapon(playerid);
ammoz = GetPlayerAmmo(playerid);
Under OnPlayerPickUpPickup

Replace

pawn Код:
GivePlayerWeapon(playerid,29,9999);
with

pawn Код:
GivePlayerWeapon(playerid, weaponz, ammoz);
This is a nice suggestion.

When player dies. Get their pos. Get the weapons. Get the cash. Create a pickup with info from weapons and cash so that you an be accurate in what the other player picks u.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)