05.08.2011, 09:37
So if you are wanting to make a pickup you are at the right place.
So lets get started
At the top of your script your going to want to add something like this.
Look for
and put this underneath it.
Okay, so when you have that find this is your script.
now you want to create the pickup.
The Model and Type will be further down the page.
If you have done it right it should be looking a bit like this.
(I have added my own things to the pickup)
Now you have created your pickup.
Model & Type here. [If you already know this skip down to the next step]
Here are some Model IDS.
Type is the pickup spawn type
Here are some pickup types
Training your Pickup
Make a new line and add this
Now under that add this
Now when the player picks up the Pickup it will say hello
you can add what ever you want to it for eg you could change it to teleport the player when they get the pickup.
Hope this helped
So lets get started
At the top of your script your going to want to add something like this.
Look for
Quote:
#include <a_samp> |
Quote:
new mypickup; |
Quote:
public OnGameModeInit() |
Quote:
mypickup = CreatePickup(model, type, Float:X, Float:Y, Float:Z, Virtualworld); |
If you have done it right it should be looking a bit like this.
(I have added my own things to the pickup)
Quote:
public OnGameModeInit() { mypickup = CreatePickup(1239, 1, 1864.2164,-2513.4922,13.5469, -1); //Virtual World (-1) is all worlds return 1; } |
Model & Type here. [If you already know this skip down to the next step]
Here are some Model IDS.
Quote:
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 Doggs rhyme book |
Here are some pickup types
Quote:
0 The pickup does not display. 1 Not pickupable, exists all the time. (Suitable for completely scripted pickups using OnPlayerPickUpPickup) 2 Pickupable, respawns after some time. 3 Pickupable, respawns after death 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, respawns after death 19 Pickupable, but has no effect (information icons?) 22 Pickupable, respawns after death. 23 Pickupable, but doesn't disappear on pickup. |
Make a new line and add this
Quote:
public OnPlayerPickUpPickup(playerid, pickupid) |
Quote:
if(pickupid == mypickup) GameTextForPlayer(playerid, "~B~Hello!!!", 5000,5); |
you can add what ever you want to it for eg you could change it to teleport the player when they get the pickup.
Hope this helped