SA-MP Forums Archive
[Include] aPickups v1.0 [08 Jule 2010] - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] aPickups v1.0 [08 Jule 2010] (/showthread.php?tid=157965)



aPickups v1.0 [08 Jule 2010] - Riaz - 08.07.2010

Yo People. That's is my new work - Alone Weapon Pickups.

What it can do?

It can create weapon/health/armour/money pickup with custom ammo/hp/ap/money value.

Also, you can destroy it after some time or respawn it after pickuping!

FUNCTIONS (2):

aPickups_Create creates a pickup.

Code:
Parameters: weaponid, ammo, Float:x, Float:y, Float:z, respawn_dealy, destroy_time, world
weaponid|The weaponid of weapon (in this include 19 is money, 20 is health, 21 is armour).
ammo|The ammo/hp/ap/money of weaponid.
Float:x|The coordinate-x of pickup position.
Float:y|The coordinate-y of pickup position.
Float:z|The coordinate-z of pickup position.
respawn_dealy|The time in seconds after which pickup is respawn after pickup.
destroy_time|The time in seconds after which pickup will be destroyed.(It's working only if respawn_dealy equals zero)
world|The virtual world, which pickup is creating.

This function returns id of created pickup.

public OnGameModeInit()
{
aPickups_Create(20, 50, 1956.3783, 1343.1572, 15.3746, 10, 0, 0); //We create health pickup with 50 HP and he allways will be respawn after 10 seconds
}

-----

aPickups_Destroy destroys a pickup.

Code:
Parameters: dropid
dropid|The ID of pickup.

This function doesn't return values.

//end

Download:
Pastebin - http://pastebin.com/pTyewFW2

WARNING:
Put in OnPlayerPickUpPickup this line:
aPickups_OnPlayerPickUpPickup(playerid, pickupid);

Enjoy


Re: aPickups v1.0 [08 Jule 2010] - Hiddos - 08.07.2010

Looks nice, +1


Re: aPickups v1.0 [08 Jule 2010] - Den_Deluxe - 08.07.2010

cool +1!!


Re: aPickups v1.0 [08 Jule 2010] - Riaz - 08.07.2010

Thanks guys


Re: aPickups v1.0 [08 Jule 2010] - nuriel8833 - 08.07.2010

Thank you!


Re: aPickups v1.0 [08 Jule 2010] - Riaz - 08.07.2010

Any other comments?


Re: aPickups v1.0 [08 Jule 2010] - xomka - 09.07.2010

nice inc
is this similar to MTA's pickup creating?


Re: aPickups v1.0 [08 Jule 2010] - Riaz - 09.07.2010

Yep, but i create this inc for drops first time .


Re: aPickups v1.0 [08 Jule 2010] - MWF2 - 09.07.2010

Can you show me how to use it, since your Wiki page doesn't work?


Re: aPickups v1.0 [08 Jule 2010] - Riaz - 09.07.2010

Dugi deleted wiki page :\

Quote:

(Deletion log); 16:01 . . Dugi (Talk | contribs) (deleted "APickups")




Re: aPickups v1.0 [08 Jule 2010] - MWF2 - 10.07.2010

Thanks for typing it here.


Re: aPickups v1.0 [08 Jule 2010] - MWF2 - 11.07.2010

Doesn't work.


Re: aPickups v1.0 [08 Jule 2010] - Riaz - 11.07.2010

It's works for me fine. Maybe you forget put into callback OnPlayerPickUpPickup aPickups_OnPlayerPickUpPickup(playerid, pickupid).?