26.09.2013, 06:44
What exactly do you want? heres an example for an armour pick up. (from samp wiki)
I dont know if it works but i tried ! i hope i put you in the right direction.
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;
}