[Tutorial] How To Make Pickup Icons and Use Them -
clean180ollie - 30.07.2009
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
and so on
under that Type
(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
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.
Re: [Tutorial] How To Make Pickup Icons and Use Them -
MrPanz - 30.07.2009
Its kinda easy to make these type of pickups, but I give you Respect for havin the patience to make this tutorial.
Re: [Tutorial] How To Make Pickup Icons and Use Them -
clean180ollie - 30.07.2009
Quote:
Originally Posted by MrPanz
Its easy to these type pf pickups, but Respect for havin the patience to make this tutorial.
|
ok.....?
Re: [Tutorial] How To Make Pickup Icons and Use Them -
MrPanz - 30.07.2009
well wut more did u want :/
EDIT : oh.. i fixed the spelling xD
Re: [Tutorial] How To Make Pickup Icons and Use Them -
clean180ollie - 30.07.2009
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.
Re: [Tutorial] How To Make Pickup Icons and Use Them -
Doppeyy - 06.08.2009
nice on dude i thinkt its an excelent tut for newbs
keep it up
Gr Artix
Re: [Tutorial] How To Make Pickup Icons and Use Them -
clean180ollie - 06.08.2009
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
Re: [Tutorial] How To Make Pickup Icons and Use Them -
Doppeyy - 06.08.2009
o bye then xD
Re: [Tutorial] How To Make Pickup Icons and Use Them -
Badger(new) - 19.08.2009
Thanks. I've been having some trouble with pickup types.
Re: [Tutorial] How To Make Pickup Icons and Use Them -
Norn - 19.08.2009
Why is this needed? It says all this on the wiki.