Ovo se nalazi na wikipediji.. i ako igraÄ preÄ‘e preko ovog pickupa dobit će 10 000$
new cash;
public OnGameModeInit()
{
cash = CreatePickup(1274, 2, 0.0, 0.0, 9.0);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == cash) GivePlayerMoney(playerid,10000);
return 1;
}
Kreiranje..
Quote
Parameters:
(model, type, Float:X, Float:Y, Float:Z, Virtualworld)
model The model of the pickup.
type The pickup spawn type.
Float:X The X coordinate to create the pickup at.
Float:Y The Y coordinate to create the pickup at.
Float:Z The Z coordinate to create the pickup at.
virtualworld The virtual world ID of the pickup. Use -1 to make the pickup show in all worlds.
Returns The ID of the created pickup, -1 on failure (pickup max limit).
primjer
new pickup; // Create a variable to store the pickup ID in
public OnGameModeInit()
{
pickup = CreatePickup(1242, 2, 1503.3359, 1432.3585, 10.1191, -1);
// Create an armour pickup and store the ID in 'pickup'
return 1;
}
// Later..
DestroyPickup(pickup); // Example of using the pickup ID
Ti ćeš onda koristit non-pickupable tip i koristit
IsPlayerInRangeOfPoint
...
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == tvoj_pickup_id) return SetPlayerPos(playerid, x,y,z);
return 1;
}
...
Tipovi pickupa
Quote
Available Pickup Types
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.
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.
Koristi tip '1' jer je on non-pickupable i neće nestat kad igraÄ preÄ‘e preko njega..