Jump to content
  • 0

Bani nelimitati pe serverul de samp


FlobertRO

Question

Salutare.

Stie careva cum pot face sa scap de limita aia de la samp pentru a putea avea mai multi bani?

Limita e de 2.1kkk din cate stiu si ce trece de limita, banii se pun pe minus.

Am incercat sa bag includeul BigInt facut de catre Matt   dar nu am reusit ,  nu prea ma pricep . Ma poate ajuta cineva va rog ?

Discord Florin.#4322

Multumesc ❤️ 

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Îți explică el destul de clar ce trebuie să faci, ideea e că tu dacă vrei să-l bagi la tine pe server, trebuie să modifici tot ce ține de bani.

Dacă vrei să-l bagi pe un gamemode de la 0, treaba e destul de simplă.

Bagi include-ul lui, faci o variabilă nouă ex: new Bani[MAX_PLAYERS], Miliarde[MAX_PLAYERS];

 

Ca să bagi bani în variabilă ai

 

CMD:addmoney(playerid, params[])
{
	new mon;
	if(sscanf(params, "d", mon)) return SCM(playerid, -1, "/addmoney <Money>");
	AddBigInt(Miliarde[playerid], Bani[playerid], mon);
	new str[256];
	format(str, 256, GetBigInt(Miliarde[playerid], Bani[playerid]));
	SCM(playerid, -1, str);
	return 1;
}

 

Ca să scoți

CMD:delmoney(playerid, params[])
{
	new mon;
	if(sscanf(params, "d", mon)) return SCM(playerid, -1, "/delmoney <Money>");
	SubstractBigInt(Miliarde[playerid], Bani[playerid], mon);
	new str[256];
	format(str, 256, GetBigInt(Miliarde[playerid], Bani[playerid]));
	SCM(playerid, -1, str);
	return 1;
}

 

Ca să verifici dacă are suma

 

if(!SubstractBigInt(PlayerInfo[playerid][pMStore], PlayerInfo[playerid][pMoney], suma pe care sa o aiba))
	return SCM(playerid, -1, "Nu ai suma");
if(SubstractBigInt(PlayerInfo[playerid][pMStore], PlayerInfo[playerid][pMoney], suma pe care sa o aiba))
	return SCM(playerid, -1, "Ai suma");

 

Ca să afișezi

new str[256];
format(str, 256, GetBigInt(Miliarde[playerid], Bani[playerid]));
SCM(playerid, -1, str);

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.