Help with server side money -
rolex - 07.11.2013
Hello everybody!
Well my question is, I have a Gamemode using a Server Side Anti Money Cheat GiveZaiatMoney called, and I use the AVS system for my car, but when someone buys a car money is not removed or added, what do I do ?
Gamemode
Код:
// Money Anticheat
if(GetPlayerMoney(playerid) != PlayerInfo[playerid][pMoney])
{
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
}
Zaiat on Gamemode
Код:
stock GiveZaiatMoney(playerid, amount)
{
new string[128];
if(amount < 0) format(string, sizeof(string), "~r~-$%d", amount*-1);
else if(amount > 0) format(string, sizeof(string), "~g~+$%d", amount);
GameTextForPlayer(playerid, string, 3000, 1);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pMoney] += amount;
return 1;
}
how i can add my server side money on filterscript ?
Re: Help with server side money -
rolex - 07.11.2013
Please, help me!
Re: Help with server side money -
GTA Simmer - 07.11.2013
Just be cool rolex. Just because you are online does not mean that the person who has your answer is. You did not even give this an hour before you have run out of patience. You should allow up to 24 hours as many who play SAMP are spread out around the globe. Hope you get your answer but just be patient.
Re: Help with server side money -
Lynn - 07.11.2013
You aren't actually giving the player any money.
Try this;
pawn Код:
stock GiveZaiatMoney(playerid, amount)
{
new string[128];
new cash = GetPlayerMoney(playerid);
if(amount < 0) format(string, sizeof(string), "~r~-$%d", amount*-1);
else if(amount > 0) format(string, sizeof(string), "~g~+$%d", amount);
GameTextForPlayer(playerid, string, 3000, 1);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
GivePlayerMoney(playerid, amount);
PlayerInfo[playerid][pMoney] = cash;
return 1;
}
Re: Help with server side money -
rolex - 07.11.2013
@Simmer
You be right simmer, really sorry for this, i know i'm wrong about it, but this problem is really putting me down!
Sorry.
@Lynn
Thank you for answer, but the problem is that my gamemode is not recognizing that it is to remove / add values to my filterscript are ordering.
be cause my Gamemode is using GiveZaiatMoney and my Filterscript is using GivePlayerMoney, how i can link Filterscript with my Gamemode money ?
Re: Help with server side money -
Lynn - 07.11.2013
The best solution is to incorporate the FS into your GM.
So it reads all the defined variables(such as PlayerInfo) correctly.
Re: Help with server side money -
rolex - 07.11.2013
But FS have many defines with conflit with gamemode. it's hard to do.
Re: Help with server side money -
gotwarzone - 07.11.2013
why not try different server sided money system?
Re: Help with server side money -
Alexander8 - 07.11.2013
I got the Same Problem , And AVS system too , im trying to merge AVS with my GM but ik its Complicated
Re: Help with server side money -
Beckett - 07.11.2013
Quote:
Originally Posted by Lynn
You aren't actually giving the player any money.
Try this;
pawn Код:
stock GiveZaiatMoney(playerid, amount) { new string[128]; new cash = GetPlayerMoney(playerid); if(amount < 0) format(string, sizeof(string), "~r~-$%d", amount*-1); else if(amount > 0) format(string, sizeof(string), "~g~+$%d", amount); GameTextForPlayer(playerid, string, 3000, 1); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, amount); PlayerInfo[playerid][pMoney] = cash; return 1; }
|
Then there's no point of server-sided money if you use
GivePlayerMoney then since it'll be a normal cash into your money bar..