Jump to content

[Include] GiftBoxes System


Young Crooi
 Share

Recommended Posts

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

Code: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://youtu.be/vitV80cefnA

Download

bMjQAWM.png

 
<embed src="http://laradio.ml/player1"width="280" height="480"></embed />

 

 
 
Link to comment
Share on other sites

  • 3 months later...
  • 2 months later...
  • 1 year later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...