[Include] GiftBoxes System
#1

How it works
This include is actually a kind of event with gift boxes who is activate by a function and disable by another. Isn't complicated because i added a description for every function in my code.
Well, about how it works, system is easy: someone start the event and on the map will be placed in different and random places those gift boxes. When a player pick up a gift box will receive a reward who is set by the owner/founder in gamemode.

Functions
pawn Код:
InitiateGifts(); //This function creates giftboxes and resets variables to default.
DestroyGifts(); //This function destroys every giftbox and resets variables to default.
CheckGift(playerid,pickupid); //You must insert this function in your OnPlayerPickUpPickup public from your gamemode.
public PlayerGiftReward(playerid,pickupid); //You must use this public in your gamemode in order to set a bonus for the player to receive when he picks up a giftbox.
Read this (important)
If you will use this include, you have to know few things:
InitiateGifts(); - This function creates giftboxes and will start the event.
DestroyGifts(); - This function destroys all the gift boxes and will stop the event.
CheckGift(playerid,pickupid); - You must insert this function in OnPlayerPickUpPickup public! If you didn't, the player can't take the gift box.
public PlayerGiftReward(playerid,pickupid); - This public will be called every time when a player pick up a gift box. So, you can add a reward.
Look in include: new Float:GiftPos[][] - This array have giftboxes positions. If you want to add more, all you have to do is to edit this array.

And, that's all.

Video
http://*********/vitV80cefnA

Download
http://pastebin.com/F9i2jeyn
Reply


Messages In This Thread
GiftBoxes System - by Mihaitza97 - 24.12.2014, 13:18
Re: GiftBoxes System - by Ryz - 24.12.2014, 13:23
Re: GiftBoxes System - by LivingLikeYouDo - 24.12.2014, 14:04
Re: GiftBoxes System - by TheRaGeLord - 15.01.2015, 07:30

Forum Jump:


Users browsing this thread: 3 Guest(s)