[Include] !PP! - Player Pickups
#1

!PP!
Player Pickups
Introduction

I guess I don't need to explain what pickups are. This include lets you to create pickups visible and pickupable by only selected players. Very useful for making gifts or prizes for special players.

Functions

Код:
CreatePlayerPickup(playerid, modelid, Float:x, Float:y, Float:z, Float:range);
playerid - playerid to create pickup
modelid - object model, that is displayed as pickup
x, y, z - pickup coordinates
range - distance, from where player can pick up pickup(If you use larger modelid, you have to make bigger range)
returns pickupid, or -1 on failure

Код:
DestroyPlayerPickup(playerid, pickupid);
playerid - playerid to destroy pickup
pickupid - pickupid to destroy pickup
returns 1 on success, 0 on failure

Код:
IsPlayerPickupCreated(playerid, pickupid);
playerid - playerid to check if pickup is created
pickupid - pickupid to check if pickup is created
returns 1 if pickup is created, 0 if it isn't.

Код:
OnPlayerPickUpPlayerPickup(playerid, pickupid)
playerid - playerid, who picked a pickup
pickupid - pickupid, which was picked up

Download

Pastebin

Notes

Pickups are pickupable only one time - after player picks it, you have to create another, if you want player to pick up it again. Player pickups are smaller than original pickups:

This include uses OnPlayerUpdate, to check if player is in pickup territory(if you're not using Streamer plugin by Incognito), or uses dynamic areas to check it(if you're using Streamer plugin). If you're using Streamer plugin, you should include this include after Streamer plugin.

Bugs

No bugs found yet. If you found any, report them to me, or write it in comments.

If you have any suggestions, how to upgrade this include, write them in comments.
Reply
#2

Awesome
Reply
#3

Nice, I can actually see where this could come in handy..

e.g - CnR servers, TDM, etc.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)