SA-MP Forums Archive
Bug Armour Regen Non Effecr if Pickup - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Bug Armour Regen Non Effecr if Pickup (/showthread.php?tid=533568)



Bug Armour Regen Non Effecr if Pickup - FloxX - 25.08.2014

Bug Armour Regen Non Effecr if Pickup

new pickup_Armour;

public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup_Armour)
{
new Float:armour;
GetPlayerArmour(playerid, armour);
SetPlayerArmour(playerid, armour+10);
}
return 1;
}

public OnGameModeInit()
{
pickup_Armour = CreatePickup(1242, 1, 2029.88, 794.09, 10.82);
pickup_Armour = CreatePickup(1242, 1, 2597.20, 740.88, 10.82);
pickup_Armour = CreatePickup(1242, 1, 2238.34, 2449.39, 10.76);
pickup_Armour = CreatePickup(1242, 1, 2256.92, 1805.22, 10.82);
pickup_Armour = CreatePickup(1242, 1, 1766.59, 2823.77, 8.33);
pickup_Armour = CreatePickup(1242, 1, 1586.06, 1798.54, 10.82);
pickup_Armour = CreatePickup(1242, 1, 674.16, 1707.22, 7.1;
pickup_Armour = CreatePickup(1242, 1, -157.20, 1129.86, 19.74);
pickup_Armour = CreatePickup(1242, 1, -852.24, 1549.75, 23.42);
pickup_Armour = CreatePickup(1242, 1, -1476.76, 2642.98, 58.7;
pickup_Armour = CreatePickup(1242, 1, -244.90, 2689.48, 62.6;
pickup_Armour = CreatePickup(1242, 1, -417.82, 2246.17, 42.42);

When I Pickup Armour I haven't get armour Why ?o.O Please Help Me Pliss


Re: Bug Armour Regen Non Effecr if Pickup - JaKe Elite - 25.08.2014

First of all... You are only using one variable for 10 pickups.
The script code you posted will only work for the last pick up you made which is

pawn Код:
pickup_Armour = CreatePickup(1242, 1, -417.82, 2246.17, 42.42);
Here's the thing you need to do, Make more variables for your checkpoint,
Assign them to each of your pickup. Then detect if the player got in the pickup.