pickup stand up armor and money.
#1

Hello guys this is my code for the Health an Armor pickup when a player died.
pawn Код:
#include <a_samp>
new Health;
new Armor;

public OnPlayerDeath(playerid, killerid, reason)
{
                new Float:x,Float:y,Float:z;
                GetPlayerPos(playerid,x,y,z);
                Health = CreatePickup(1240,4,x,y,z,0);
                GetPlayerPos(playerid,x,y,z);
                Armor = CreatePickup(1242,4,x,y,z,0);
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == Health) SetPlayerHealth(playerid,100), DestroyPickup(Health);
    if(pickupid == Armor) SetPlayerArmour(playerid,100), DestroyPickup(Armor);
    return 1;
}
But i want around it. like the guns.
Reply
#2

pawn Код:
new Float:x,Float:y,Float:z;
                GetPlayerPos(playerid,x,y,z);
                Health = CreatePickup(1240,4,x+2,y,z,0);
                GetPlayerPos(playerid,x,y,z);
                Armor = CreatePickup(1242,4,x-2,y,z,0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)