[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
#2

Awesome work!
Reply
#3

Definitely not cool. Should be dynamic. There is no function to create a gift box.

Nothing else to say.
Reply
#4

Nice Work
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)