Help with server side money
#1

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 ?
Reply
#2

Please, help me!
Reply
#3

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.
Reply
#4

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;
}
Reply
#5

@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 ?
Reply
#6

The best solution is to incorporate the FS into your GM.
So it reads all the defined variables(such as PlayerInfo) correctly.
Reply
#7

But FS have many defines with conflit with gamemode. it's hard to do.
Reply
#8

why not try different server sided money system?
Reply
#9

I got the Same Problem , And AVS system too , im trying to merge AVS with my GM but ik its Complicated
Reply
#10

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..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)