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

Incredible, you are amazing
Reply
#3

that is cool
Reply
#4

Another amazing job!
Reply
#5

OMFG! You are god,amazing work

+REP
Reply
#6

Nice man!
Reply
#7

Yeah, nice one uncle.
Reply
#8

Your releases is the best so far,imo.
Reply
#9

Quote:
Originally Posted by rootcause
View Post
Since oyster and horseshoe positions are taken from GTA files, I'm pretty sure every collectible is added by default
Is it possible to get the hidden packages positions? And where?
Reply
#10

Quote:
Originally Posted by oMa37
View Post
Is it possible to get the hidden packages positions? And where?
pawn Code:
new
    CollectibleData[][E_COLLECTIBLE] = {
    //  {type, pos x, pos y, pos z}
        {TYPE_HORSESHOE, 1224.0, 2617.0, 11.0},
        {TYPE_HORSESHOE, 2323.0, 1284.0, 97.0},
        {TYPE_HORSESHOE, 2035.0, 2305.0, 18.0},
        {TYPE_HORSESHOE, 2491.0, 2263.0, 15.0},
        {TYPE_HORSESHOE, 1433.0, 2796.0, 20.0},
        {TYPE_HORSESHOE, 2071.0, 712.0, 11.0},
        {TYPE_HORSESHOE, 2239.0, 1839.0, 18.0},
        {TYPE_HORSESHOE, 2583.0, 2387.0, 16.0},
        {TYPE_HORSESHOE, 2864.0, 857.0, 13.0},
        {TYPE_HORSESHOE, 2612.0, 2200.0, -1.0},
        {TYPE_HORSESHOE, 2274.0, 1507.0, 24.0},
        {TYPE_HORSESHOE, 2184.0, 2529.0, 11.0},
        {TYPE_HORSESHOE, 1863.0, 2314.0, 15.0},
        {TYPE_HORSESHOE, 2054.0, 2434.0, 166.0},
        {TYPE_HORSESHOE, 1603.0, 1435.0, 11.0},
        {TYPE_HORSESHOE, 1362.92, 1015.24, 11.0},
        {TYPE_HORSESHOE, 2058.7, 2159.1, 16.0},
        {TYPE_HORSESHOE, 2003.0, 1672.0, 12.0},
        {TYPE_HORSESHOE, 2238.0, 1135.0, 49.0},
        {TYPE_HORSESHOE, 1934.06, 988.79, 22.0},
        {TYPE_HORSESHOE, 1768.0, 2847.0, 9.0},
        {TYPE_HORSESHOE, 1084.0, 1076.0, 11.0},
        {TYPE_HORSESHOE, 2879.0, 2522.0, 11.0},
        {TYPE_HORSESHOE, 2371.0, 2009.0, 15.0},
        {TYPE_HORSESHOE, 1521.0, 1690.0, 10.6},
        {TYPE_HORSESHOE, 2417.0, 1281.0, 21.0},
        {TYPE_HORSESHOE, 1376.0, 2304.0, 15.0},
        {TYPE_HORSESHOE, 1393.0, 1832.0, 12.34},
        {TYPE_HORSESHOE, 984.0, 2563.0, 12.0},
        {TYPE_HORSESHOE, 1767.0, 601.0, 13.0},
        {TYPE_HORSESHOE, 2108.0, 1003.0, 46.0},
        {TYPE_HORSESHOE, 2705.98, 1862.52, 24.41},
        {TYPE_HORSESHOE, 2493.0, 922.0, 16.0},
        {TYPE_HORSESHOE, 1881.0, 2846.0, 11.0},
        {TYPE_HORSESHOE, 2020.0, 2352.0, 11.0},
        {TYPE_HORSESHOE, 1680.3, 2226.86, 16.11},
        {TYPE_HORSESHOE, 1462.0, 936.0, 10.0},
        {TYPE_HORSESHOE, 2125.5, 789.23, 11.45},
        {TYPE_HORSESHOE, 2588.0, 1902.0, 15.0},
        {TYPE_HORSESHOE, 919.0, 2070.0, 11.0},
        {TYPE_HORSESHOE, 2173.0, 2465.0, 11.0},
        {TYPE_HORSESHOE, 2031.25, 2207.33, 11.0},
        {TYPE_HORSESHOE, 2509.0, 1144.0, 19.0},
        {TYPE_HORSESHOE, 2215.0, 1968.0, 11.0},
        {TYPE_HORSESHOE, 2626.0, 2841.0, 11.0},
        {TYPE_HORSESHOE, 2440.08, 2161.07, 20.0},
        {TYPE_HORSESHOE, 1582.0, 2401.0, 19.0},
        {TYPE_HORSESHOE, 2077.0, 1912.0, 14.0},
        {TYPE_HORSESHOE, 970.0, 1787.0, 11.0},
        {TYPE_HORSESHOE, 1526.22, 751.0, 29.04},
        {TYPE_OYSTER, 979.0, -2210.0, -3.0},
        {TYPE_OYSTER, 2750.0, -2584.0, -5.0},
        {TYPE_OYSTER, 1279.0, -806.0, 85.0},
        {TYPE_OYSTER, 2945.13, -2051.93, -3.0},
        {TYPE_OYSTER, 67.0, -1018.0, -5.0},
        {TYPE_OYSTER, 2327.0, -2662.0, -5.0},
        {TYPE_OYSTER, 2621.0, -2506.0, -5.0},
        {TYPE_OYSTER, 1249.0, -2687.0, -1.0},
        {TYPE_OYSTER, 725.0, -1849.0, -5.0},
        {TYPE_OYSTER, 723.0, -1586.0, -3.0},
        {TYPE_OYSTER, 155.0, -1975.0, -8.0},
        {TYPE_OYSTER, 1968.0, -1203.0, 17.0},
        {TYPE_OYSTER, -2657.0, 1564.0, -6.0},
        {TYPE_OYSTER, -1252.0, 501.0, -8.0},
        {TYPE_OYSTER, -1625.0, 4.0, -10.0},
        {TYPE_OYSTER, -1484.0, 1489.0, -10.0},
        {TYPE_OYSTER, -2505.406, 1543.724, -22.5553},
        {TYPE_OYSTER, -2727.0, -469.0, -5.0},
        {TYPE_OYSTER, -1266.0, 966.0, -10.0},
        {TYPE_OYSTER, -1013.0, 478.0, -7.0},
        {TYPE_OYSTER, -1364.0, 390.0, -5.0},
        {TYPE_OYSTER, 2578.0, 2382.0, 16.0},
        {TYPE_OYSTER, 2090.0, 1898.0, 8.0},
        {TYPE_OYSTER, 2130.0, 1152.0, 7.0},
        {TYPE_OYSTER, 2013.0, 1670.0, 7.0},
        {TYPE_OYSTER, 2531.0, 1569.0, 9.0},
        {TYPE_OYSTER, 2998.0, 2998.0, -10.0},
        {TYPE_OYSTER, -832.0, 925.0, -2.0},
        {TYPE_OYSTER, 486.0, -253.0, -4.0},
        {TYPE_OYSTER, -90.0, -910.0, -5.0},
        {TYPE_OYSTER, 26.43, -1320.94, -10.04},
        {TYPE_OYSTER, -207.0, -1682.0, -8.0},
        {TYPE_OYSTER, -1672.0, -1641.0, -2.0},
        {TYPE_OYSTER, -1175.0, -2639.0, -2.5},
        {TYPE_OYSTER, -1097.0, -2858.0, -8.0},
        {TYPE_OYSTER, -2889.0, -1042.0, -9.0},
        {TYPE_OYSTER, -659.0, 874.0, -2.0},
        {TYPE_OYSTER, -955.0, 2628.0, 35.0},
        {TYPE_OYSTER, -1066.0, 2197.0, 32.0},
        {TYPE_OYSTER, 40.0, -531.0, -8.0},
        {TYPE_OYSTER, -765.0, 247.0, -8.0},
        {TYPE_OYSTER, 2098.0, -108.0, -2.0},
        {TYPE_OYSTER, 2767.0, 470.0, -8.0},
        {TYPE_OYSTER, -783.0, 2116.0, 35.0},
        {TYPE_OYSTER, -821.0, 1374.0, -8.0},
        {TYPE_OYSTER, -2110.5, 2329.72, -7.5},
        {TYPE_OYSTER, -1538.0, 1708.0, -3.27},
        {TYPE_OYSTER, -2685.0, 2153.0, -5.0},
        {TYPE_OYSTER, 796.0, 2939.0, -5.0},
        {TYPE_OYSTER, 2179.0, 235.0, -5.0}
    };
---------------------------------------------------------------------------

Look nice, good job!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)