Question: ServerSided Issue -
HydraHumza - 04.07.2016
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.
Re: Question: ServerSided Issue -
SickAttack - 04.07.2016
What kind of false reports is it giving? You should not use this function when loading a player's account data.
Re: Question: ServerSided Issue -
HydraHumza - 04.07.2016
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
Re: Question: ServerSided Issue -
SickAttack - 04.07.2016
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.
Re: Question: ServerSided Issue -
iKarim - 04.07.2016
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)
Re: Question: ServerSided Issue -
HydraHumza - 04.07.2016
Stunt cash is disable.. casino is also disable. The weapon shop is called with GivePlayerMoneyEx. so no chance issue with that.
Re: Question: ServerSided Issue -
SickAttack - 04.07.2016
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.
Re: Question: ServerSided Issue -
iKarim - 04.07.2016
Well, are you sure that none of filterscripts are giving/taking money from the player without updating the gamemode?
Re: Question: ServerSided Issue -
Rdx - 04.07.2016
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)
Re: Question: ServerSided Issue - WhiteGhost - 04.07.2016
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?