SA-MP Forums Archive
[Tutorial] [TUT]How to make Pickups. - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] [TUT]How to make Pickups. (/showthread.php?tid=155067)

Pages: 1 2


[TUT]How to make Pickups. - Ehab_Isaac101 - 16.06.2010


Hello! My name is Ehab Isaac. I REALLY THANK God! Because now I know how to make pickups And i'm very happy !! Here is a Tutorial how to make a pickup =)

First of all Go to Pawno!
Open a new project

Add :

new ls; // You need that "ls" to definite the pickup name.

Under #include <a_samp>

Like this

Код:
 #include <a_samp>

new ls;
Now Under : public OnGameModeInit()
write or copy this :

Код:
ls = CreatePickup(model, type, Float:X, Float:Y, Float:Z, Virtualworld);
// you can notice ls = ( so you can name it whatever you want, but be sure u named the new NAMEANYTHING; )

For Example : ls = CreatePickup(1239, 1, 704.4722, -442.9513, 16.3359, -1);
Model, Type, X, Y, Z, Virtual world.

Similar Work :

Код:
public OnGameModeInit()
{
	ls = CreatePickup(1239, 1, 704.4722, -442.9513, 16.3359, -1);
	return 1;
}
After doing this Move to :
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
Write this under public OnPlayerPickUpPickup(playerid, pickupid) :

if(pickupid == ls) SetPlayerPos(playerid,X,Y,Z); // SetPlayerPos means to Teleport a player when he go through the pickup. You can put SetPlayerHealth(playerid, Health Ammount);

// As you see up there " if(pickupid == ls) <--- ls. it's a very important.


Now Let me show you what model, type, X, Y, Z and VirtualWorld means :


1) model : The model of the pickup.

2) type : The pickup spawn type.

3) Float:X : The X coordinate to create the pickup at.

4) Float:Y : The Y coordinate to create the pickup at.

5) Float:Z : The Z coordinate to create the pickup at.

6) virtualworld : The virtual world ID of the pickup. Use -1 to make the pickup show in all worlds. * I always use -1. -1 = Appears in every world.



ALSO Here is some Models for the Pickup you want to make :

Код:
1210 - Briefcase
1212 - Money
1239 - Information
1240 - Heart
1241 - Adrenaline pill
1242 - Armor
1247 - Bribe
1248 - Gta 3 logo
1252 - Grey bomb
1253 - Photo Op
1254 - rampage (single skull)
1313 - two player rampage (skulls)
1272 - blue house
1273 - green house
1274 - dollar
1275 - blue t-shirt
1276 - tiki 
1277 - save disk
1279 - drug bundle
1313 - 2 skulls icon
1314 - 2 player
1316 - Corona (textures missing)
1317 - Checkpoint (textures missing)
1318 - White arrow (pointing down)
1559 - Interior enter/exit diamond
1582 - Pizza Box
2894 - Madd Dogg's rhyme book
Here is also a good and helpful FS i made for you to make the thing easier.

Download from here :


http://www.solidfiles.com/d/b1d3/

I Wish you understood

- Ehab Isaac


Re: [TUT]How to make Pickups. - v0nz - 16.06.2010

Quote:
Originally Posted by ·!¦[·MaykoX·
¦!· ]
Not useful
Yea, its pretty much a wiki entry thats already there.


Re: [TUT]How to make Pickups. - Zh3r0 - 16.06.2010

Quote:
Originally Posted by ·!¦[·MaykoX·
¦!· ]
Not useful
For totally newbies/begginers it's just great!


Re: [TUT]How to make Pickups. - Ehab_Isaac101 - 16.06.2010

Quote:
Originally Posted by ·!¦[·MaykoX·
¦!· ]
Not useful
. Okay, I'm sure it's useful :P


Re: [TUT]How to make Pickups. - Ehab_Isaac101 - 16.06.2010

Quote:
Originally Posted by Zh3r0►
Quote:
Originally Posted by ·!¦[·MaykoX·
¦!· ]
Not useful
For totally newbies/begginers it's just great!
Yeah, I thought it was helpful . And thanks For the reply and clear it up for them! I still a begginer and newbie at this ..


Re: [TUT]How to make Pickups. - Zh3r0 - 16.06.2010

Quote:
Originally Posted by Ehab_Isaac101
Quote:
Originally Posted by Zh3r0►
Quote:
Originally Posted by ·!¦[·MaykoX·
¦!· ]
Not useful
For totally newbies/begginers it's just great!
Yeah, I thought it was helpful . And thanks For the reply and clear it up for them! I still a begginer and newbie at this ..
Admiting that you are a begginrer , makes me think you didn't even read the rules....Don't double post.


Re: [TUT]How to make Pickups. - Ehab_Isaac101 - 16.06.2010

Okay, Sorry.


Re: [TUT]How to make Pickups. - Aleron - 16.06.2010

basic kind of scripting..good job for a beginner..

don't dissapoint yourself..you have done great this far..we all started from this kind of stuff..i am sure that in a year you will be awesome in scripting but you have to practise a lot.


Re: [TUT]How to make Pickups. - Ehab_Isaac101 - 16.06.2010

Quote:
Originally Posted by Zаўk™
basic kind of scripting..good job for a beginner..

don't dissapoint yourself..you have done great this far..we all started from this kind of stuff..i am sure that in a year you will be awesome in scripting but you have to practise a lot.
Thank you Zack for this cheerful reply! And yeah. I am trying now to make my own Rank system...


Re: [TUT]How to make Pickups. - Ehab_Isaac101 - 17.06.2010

Anybody found this helpful?


Re: [TUT]How to make Pickups. - Ehab_Isaac101 - 17.06.2010

Anybody found this helpful ?


Re: [TUT]How to make Pickups. - Zh3r0 - 17.06.2010

DON'T TRIPLE POST!!
Learn basic forum rules dude?


Re: [TUT]How to make Pickups. - ViruZZzZ_ChiLLL - 17.06.2010

lol, please don't triple/double post

anyways, Nice! This tut will be good for beginners :P


Re: [TUT]How to make Pickups. - omfggus - 17.06.2010

Nice TUT, newbies will learn how to Create Pickups now


Re: [TUT]How to make Pickups. - Ehab_Isaac101 - 17.06.2010

Quote:
Originally Posted by ViruZZzZ_ChiLLL
lol, please don't triple/double post

anyways, Nice! This tut will be good for beginners :P
Okay (:, and thanks ^^.. That's why i am trying to keep it on the main page to be useful for beginners


Re: [TUT]How to make Pickups. - Ehab_Isaac101 - 17.06.2010

Quote:
Originally Posted by omfggus
Nice TUT, newbies will learn how to Create Pickups now
Thanks, And yeah ^^


Re: [TUT]How to make Pickups. - pryor94 - 15.08.2010

can you give some more info on type
CreatePickup(model, whats this for? and how to i use?type, Float:X, Float:Y, Float:Z, Virtualworld);


Re: [TUT]How to make Pickups. - Ehab1911 - 19.11.2010

CreatePickup = It's a function or something
Model = the Model, It's the Icon style, there is an " i " there are many models..
Float X,Y and Z are the coords, you can get them by going into any server, by typing /save at the place you want the pickup to be at
Virtual world = is the world that you play in, in San Andreas, they call it Interior. Interior number 0, is the main one .


- Ehab Isaac.


Re: [TUT]How to make Pickups. - Leeroy. - 19.11.2010

Pretty useless tutorial because copy pasting from wiki won't make you a good tutorial writer.


Re: [TUT]How to make Pickups. - olabv - 14.12.2010

nice tut m8