14.12.2012, 15:05
Hello guys this is my code for the Health an Armor pickup when a player died.
But i want around it. like the guns.
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;
}