[Include] Mining Framework
#1

SA-MP Mining

Dynamic Mining System Framework.

Current Version

v0.2 R1

Script is still under development.

How To Install

Put mine.inc and MINE folder in pawno > includes or use sampctl.

Example:

sampctl package install medzvel/samp-mining


After that do this in your gamemode.

Код:

#include <mine>

Functions

Functions to use this library.

Код:

forward CreateGoldStone(Float:x, Float:y, Float:z, name = 2);
forward CreateNormalStone(Float:x, Float:y, Float:z, name = 1);
forward CreateDiamondStone(Float:x, Float:y, Float:z, name = 3);
forward DebugStone(stone);
forward SetStoneName(class, name[]);
forward GetStoneDefaultName(class, out[], length = sizeof(out));
forward GetStoneName(class, out[], length = sizeof(out));
forward CreateStone(class, Float:x, Float:y, Float:z);
forward DestroyStone(stoneid);
forward IsValidStoneID(stoneid);
forward SetStonePricePerGram(class, price);
forward GetMinedStonePrice(class, Float:grams);
forward GetStonePricePerGram(class);
forward LoadStones(filename[]);
forward GetStoneID(stone);
forward AddStone(filename[], Float:x, Float:y, Float:z);

Callbacks

Callbacks which you need to use

Код:

forward OnPlayerEndMining(playerid, class, Float:Amount);
forward OnPlayerStartMining(playerid);

How To Let Player Mine

If you want to let player mine stone. You have to use function: PlayerCanMine(playerid, bool:value); Example :

Код:

public OnPlayerStartMining(playerid)
{
    if(GetPlayerScore(playerid) < 3)
    {
        PlayerCanMine(playerid, false);
    }
    else
    {
        PlayerCanMine(playerid, true);
    }
}

Loading stones from file

Create file in scriptfiles. Name it what you want. Under OnGameModeInit() write LoadStones("FileName");

At this moment, LoadStones function is still under development. Right now if you want to load stones from file, in file you would write positions with this format: StonePositions(x, y, z);

Код:

StonePositions(2562.507812,-1529.606811,1399.841064);

Stone class will be choosen randomly.

Video

*******

Contributing

If you have any idea, to improve this script, feel free to do this. After doing some fix or Finding any bug please open issue or make pull request.

Authors
See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Download

https://github.com/medzvel/samp-mining
Reply
#2

Looks a lot like the mining system DTV wrote for Wild West RP lol, altho ours was a bit more dynamic.

Good job!
Reply
#3

Quote:
Originally Posted by Dignity
Посмотреть сообщение
Looks a lot like the mining system DTV wrote for Wild West RP lol, altho ours was a bit more dynamic.

Good job!
Thanks.
Reply
#4

Goodjob
Reply
#5

Quote:
Originally Posted by rfr
Посмотреть сообщение
Goodjob
Thanks.
Reply
#6

I didnt think you would release this.
Keep up the great work.
Reply
#7

Great job! This may come in hand for my roleplay gamemode that I'm working on.
Reply
#8

Hey that's actually nice gj.
Reply
#9

Where's the download link?
Reply
#10

Quote:
Originally Posted by Injury
Посмотреть сообщение
Where's the download link?
Uhh, just forgot to add extra link for download, just added github. Anyways, updated.
Reply
#11

Omg i thought that this is a bitcoin miner plugin for server DDD
Reply
#12

Quote:
Originally Posted by kurta999
Посмотреть сообщение
Omg i thought that this is a bitcoin miner plugin for server DDD
Why would anyone make this lmao. xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)