[FilterScript] Singleplayer Collectibles
#1





Information

This filterscript allows players to collect oysters and horseshoes just like in singleplayer. Players can track and reset their progress using /collectibles menu.

Since oyster and horseshoe positions are taken from GTA files, I'm pretty sure every collectible is added by default.

And this script is not limited to just oysters and horseshoes, you can create your own types of collectibles such as briefcases. (tutorial below)

Config

#define COLLECTIBLE_REWARD - Amount of money given on collecting a collectible. (Default: 250)
#define COMPLETION_REWARD - Amount of money given on collecting every collectible of one type. (Default: 15000)

Adding New Collectibles

You can add more collectible types if you want to, just follow these steps:

Step 1) Add your type to the types array

Code:
new
	CollectibleTypes[][E_COLLECTIBLE_TYPE] = {
	        {"Oyster", 953},    // index 0
		{"Horseshoe", 954},  // index 1
		{"Briefcase", 1210} // index 2 - new type
	};
Step 2) Create a reference

Code:
enum    _:E_COLLECTIBLE_TYPE_REF
{
	TYPE_OYSTER,    // reference to CollectibleTypes index 0
	TYPE_HORSESHOE, // reference to CollectibleTypes index 1
	TYPE_BRIEFCASE // reference to CollectibleTypes index 2 - new type
}
Step 3) Add locations to the CollectibleData array

New collectibles always must be added to the end!

Code:
new
	CollectibleData[][E_COLLECTIBLE] = {
	        {TYPE_HORSESHOE, 1224.0, 2617.0, 11.0},
		...
		{TYPE_HORSESHOE, 1526.22, 751.0, 29.04},
		{TYPE_OYSTER, 979.0, -2210.0, -3.0},
		...
		{TYPE_OYSTER, 2179.0, 235.0, -5.0},
		{TYPE_BRIEFCASE, 123.4, 567.8, 1.618} // new briefcase collectible
	};
And that's pretty much it, you just created a Briefcase collectible type with 1 collectible in the GTA world.

Credits

Slice for SQLite Improved
Yashas for Improved ZCMD
****** & Misiur for YSI.

Notes

* Don't forget to create a directory named collectibles on your scriptfiles. (If you're not using SQLite version.)

Downloads

Reply


Messages In This Thread
Singleplayer Collectibles - by rootcause - 31.08.2016, 07:44
Re: Singleplayer Collectibles - by Max_Andolini - 31.08.2016, 07:47
Re: Singleplayer Collectibles - by tysanio - 31.08.2016, 14:05
Respuesta: Singleplayer Collectibles - by Whyd - 31.08.2016, 14:33
Re: Singleplayer Collectibles - by Hunud - 31.08.2016, 16:29
Re: Singleplayer Collectibles - by Florin48 - 31.08.2016, 17:33
Re: Singleplayer Collectibles - by BMiller - 01.09.2016, 12:28
Re: Singleplayer Collectibles - by Dice_ - 01.09.2016, 22:12
Re: Singleplayer Collectibles - by oMa37 - 01.09.2016, 22:38
Re: Singleplayer Collectibles - by SickAttack - 01.09.2016, 22:57

Forum Jump:


Users browsing this thread: 2 Guest(s)