Question: ServerSided Issue
#1

Hey,

I hope you all are good. The thing is Server sided giving lot of false alarm. How to fix that. Example of code is like that.

Код:
new MoneyServerSided[MAX_PLAYERS];


GivePlayerMoneyEx(playerid, money)
{
	MoneyServerSided[playerid] += money;
	ResetPlayerMoney(playerid);
	GivePlayerMoney(playerid,MoneyServerSided[playerid]);
	return MoneyServerSided[playerid];
}
Giving lot's of false reports.
Reply
#2

What kind of false reports is it giving? You should not use this function when loading a player's account data.
Reply
#3

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
What kind of false reports is it giving? You should not use this function when loading a player's account data.
It's give fake false alarm when someone buy anything or like that. and 60 % false alarm
Reply
#4

Quote:
Originally Posted by Humza
Посмотреть сообщение
It's give fake false alarm when someone buy anything or like that. and 60 % false alarm
I don't understand.
Reply
#5

Hmm, there are many client-side money earning sources such as casinos and stunt bonuses, false alarm cased by either:
Another script gave/took money from a player without updating the main script (1)
Player earned/spent money in client-sided source (2)
Reply
#6

Stunt cash is disable.. casino is also disable. The weapon shop is called with GivePlayerMoneyEx. so no chance issue with that.
Reply
#7

There is no need to kick players that spawn money, since it has no effect other than the hud updating (showing an incorrect value), but this can be fixed (by updating the player's hud with the player's pocket money) when a player gains or loses money.
Reply
#8

Well, are you sure that none of filterscripts are giving/taking money from the player without updating the gamemode?
Reply
#9

Use this. No more worries.

Код:
stock _GivePlayerMoney(playerid, money)
{
	MoneyServerSided[playerid] += money;
	GivePlayerMoney(playerid, MoneyServerSided[playerid] - GetPlayerMoney(playerid));
}
#define GivePlayerMoney(%0,%1) _GivePlayerMoney(%0,%1)
Reply
#10

Quote:
Originally Posted by Rdx
Посмотреть сообщение
Use this. No more worries.

Код:
stock _GivePlayerMoney(playerid, money)
{
	MoneyServerSided[playerid] += money;
	GivePlayerMoney(playerid, MoneyServerSided[playerid] - GetPlayerMoney(playerid));
}
#define GivePlayerMoney(%0,%1) _GivePlayerMoney(%0,%1)
Would is stop money hacks?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)