[Tutorial] How To Make Pickup Icons and Use Them
#1

Things You Will Need:

Pawno
Simple Knowledge
Simple Command Knowledge
SA:MP
and
A Motivation To Script.

Step 1

Go To The Top of Your Script, here you will see your includes
Code:
#include <a_samp>
and so on

under that Type
Code:
new deagle;
(you can change deagle to whatever you want)

Step 2

Make sure you have the x,y,z coordinates for your pickup next
under
Code:
public OnGameModeInit()
and after the {
type this

Code:
deagle = CreatePickup( 1239,1,-384.7508,2206.4153,42.4236 );
Createpickup: Modelid Type x y z

Code:
 Available Pickup Types
 0
The pickup does not display.

 1
Not pickupable, exists all the time.

 2
Pickupable, respawns after some time.

 3
Pickupable, but doesn't respawn.

 4
Disappears shortly after created (perhaps for weapon drops?)

 5
Disappears shortly after created (perhaps for weapon drops?)

 8
Pickupable, but has no effect. Disappears automatically.

 11
Blows up a few seconds after being created (bombs?)

 12
Blows up a few seconds after being created.

 13
Slowly decends to the ground.

 14
Pickupable, but only when in a vehicle. Falls through objects made with CreateObject, etc.

 15
Pickupable, but doesn't respawn.

 19
Pickupable, but has no effect (information icons?)

 22
Pickupable, but doesn't respawn.

 23
Pickupable, but doesn't disappear on pickup.
(im my case it will be called deagle use the name You wrote on (new) on top of your script)

Step 3

Are you catching up?

find
Code:
public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}
once found under the public Onplayerpickuppickup
and under the {
type
Code:
if(pickupid == Deagle)
{
return 1;
}
Now in between
Code:
{
return 1;
Type Your Command, You can find commands here,

https://sampwiki.blast.hk/wiki/Category:Scripting_Functions

So This what I would do for the Deagle

Code:
if(pickupid == Deagle)
{
GivePlayerWeapon(playerid, 24, 500); //Give playerid Deagle with 500 ammo
return 1;
}
Then in Game goto the pickup you created, where your X,y,z spot was supposed to be and goto the pickup and you will get a Deagle with 500 ammo.

Thats it simple and easy.
Reply
#2

Its kinda easy to make these type of pickups, but I give you Respect for havin the patience to make this tutorial.
Reply
#3

Quote:
Originally Posted by MrPanz
Its easy to these type pf pickups, but Respect for havin the patience to make this tutorial.
ok.....?
Reply
#4

well wut more did u want :/

EDIT : oh.. i fixed the spelling xD
Reply
#5

Quote:
Originally Posted by MrPanz
well wut more did u want :/

EDIT : oh.. i fixed the spelling xD
ok I just wanted to help people who don't know $hit about making pickups.
Reply
#6

nice on dude i thinkt its an excelent tut for newbs
keep it up

Gr Artix
Reply
#7

Quote:
Originally Posted by [RiFA
Artix ]
nice on dude i thinkt its an excelent tut for newbs
keep it up

Gr Artix
XD not anymore I quit SA-MP
Reply
#8

o bye then xD
Reply
#9

Thanks. I've been having some trouble with pickup types.
Reply
#10

Why is this needed? It says all this on the wiki.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)