SetTimer With PickUp
#2

What exactly do you want? heres an example for an armour pick up. (from samp wiki)

pawn Код:
new armour; // Create a variable to store the pickup ID in

forward armour();

public OnGameModeInit()
{
    SetTimer("armour", 1000, false); // Set a timer of 1000 miliseconds (1 second)
    armour = CreatePickup(1242, 2, 1503.3359, 1432.3585, 10.1191, -1);// Create an armour pickup and store the ID in 'pickup'
    return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == armour)
    {
        SetPlayerArmour(playerid, 100);
        DestroyPickup(pickup);
        KillTimer(armour[playerid]);
    }
    return 1;
}
I dont know if it works but i tried ! i hope i put you in the right direction.
Reply


Messages In This Thread
SetTimer With PickUp - by BoU3A - 26.09.2013, 04:01
Re: SetTimer With PickUp - by Voxel - 26.09.2013, 06:44
Re: SetTimer With PickUp - by Konstantinos - 26.09.2013, 10:03

Forum Jump:


Users browsing this thread: 1 Guest(s)