[Help] Money Rests
#1

Hi guys, I got a problem that when ever i add any car dealers and when i /buycar it gives my money back, And i've tried it on other GM it doesn't give the money Back Please help me!
Reply
#2

Because your GameMode has user files and uses a variable for the money, so you have to find that.

Example:
Код:
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-carcost;
Using:
Код:
GivePlayerMoney(playerid, Money);
Always resets if you're GameMode has a user file system with money OR you have a Public command that automatically does it for you, which obviously you do not.
Reply
#3

Hey can you please check this game mod and please say me where is it? Because i din't get you http://forum.sa-mp.com/showthread.ph...=South+african

Please..

Thanks in advance..
Reply
#4

Quote:
Originally Posted by akif
Посмотреть сообщение
Hey can you please check this game mod and please say me where is it? Because i din't get you http://forum.sa-mp.com/showthread.ph...=South+african

Please..

Thanks in advance..
Not sure, look for a command that's already in the game that buys something.

Or search for something like:
Код:
pMoney
pCash
PlayerInfo[playerid](Money/cash here)
Reply
#5

There is something like this, And more with Pcash..

Quote:

stock GivePlayerCash(playerid, money)
{
PlayerInfo[playerid][pCash] -= money;
ResetMoneyBar(playerid);
UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);
return PlayerInfo[playerid][pCash];
}

stock SetPlayerCash(playerid, money)
{
PlayerInfo[playerid][pCash] = money;
ResetMoneyBar(playerid);
UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);
return PlayerInfo[playerid][pCash];
}

stock ResetPlayerCash(playerid)
{
PlayerInfo[playerid][pCash] = 0;
ResetMoneyBar(playerid);
UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);
return PlayerInfo[playerid][pCash];
}

stock GetPlayerCash(playerid)
{
return PlayerInfo[playerid][pCash];
}

Reply
#6

It looks like you've got stocks that should work..

What's the code for /buycar?
Reply
#7

Thats a FS that i use as Car dealer..
Reply
#8

Those kind of FilterScripts don't really work due to the use of Files. It'd only work if you were experienced enough to edit the FS to work with the user files or put the FS into the actual GameMode. My advice is to find someone to combine the FS into the GameMode or code a custom Dealership.
Reply
#9

But the FS when i use in other GM it works perfect i mean it dont give money back...

I din't get you what are you saying...
Reply
#10

Do you have anti-cheat?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)