SA-MP Forums Archive
Pickups And Checkpoints.. - 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: Pickups And Checkpoints.. (/showthread.php?tid=558463)



Pickups And Checkpoints.. - TheRaGeLord - 17.01.2015

Hello, Today I Wanna Know that Can We Have More Than 1 Pickup Or Checkpoint With the Same Variable?
Example This Code:-
pawn Код:
public OnGameModeInit()
{
    pickup = CreatePickup(1242, 2, 1503.3359, 1432.3585, 10.1191, -1);
    // Create an armour pickup and store the ID in 'pickup'
    return 1;
}
So here He have Make a Pickup 1242 With Pickup variable name.. So Can I Use The Variable name Twice?
Example
pawn Код:
public OnGameModeInit()
{
    pickup = CreatePickup(1242, 2, 1503.3359, 1432.3585, 10.1191, -1);
    pickup= CreatePickup(1242, 2, -1213.21, 123.1313, 134.1412, -1);
   
    return 1;
}



Re: Pickups And Checkpoints.. - HY - 17.01.2015

Not, this can inversate pickups under OnPlayerPickUpPickup();.

But you can do:

pawn Код:
new pickup[100];
And then:

pawn Код:
pickup[0] = CreatePickup(1242, 2, 1503.3359, 1432.3585, 10.1191, -1);
pickup[1] = CreatePickup(1242, 2, -1213.21, 123.1313, 134.1412, -1);



Re: Pickups And Checkpoints.. - TheRaGeLord - 17.01.2015

Well.. Thanx