06.09.2016, 13:28
Hi bro, pls help me to use Money Hack System.. Why my money in game reset to 0, but i not using Hack Money?
PHP код:
#define ResetMoneyBar ResetPlayerMoney
#define UpdateMoneyBar GivePlayerMoney
new Cash[MAX_PLAYERS];
stock GivePlayerCash(playerid, money)
{
Cash[playerid] += money;
ResetMoneyBar(playerid);//Resets the money in the original moneybar, Do not remove!
UpdateMoneyBar(playerid,Cash[playerid]);//Sets the money in the moneybar to the serverside cash, Do not remove!
return Cash[playerid];
}
stock SetPlayerCash(playerid, money)
{
Cash[playerid] = money;
ResetMoneyBar(playerid);//Resets the money in the original moneybar, Do not remove!
UpdateMoneyBar(playerid,Cash[playerid]);//Sets the money in the moneybar to the serverside cash, Do not remove!
return Cash[playerid];
}
*/stock ResetPlayerCash(playerid)*/
{
Cash[playerid] = 0;
ResetMoneyBar(playerid);//Resets the money in the original moneybar, Do not remove!
UpdateMoneyBar(playerid,Cash[playerid]);//Sets the money in the moneybar to the serverside cash, Do not remove!
return Cash[playerid];
}
stock GetPlayerCash(playerid)
{
return Cash[playerid];
}
PHP код:
SetTimer("MoneyTimer", 1000, 1);
PHP код:
public MoneyTimer()
{
new username[MAX_PLAYER_NAME];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerCash(i) != GetPlayerMoney(i))
{
ResetMoneyBar(i);//Resets the money in the original moneybar, Do not remove!
UpdateMoneyBar(i,GetPlayerCash(i));//Sets the money in the moneybar to the serverside cash, Do not remove!
new hack = GetPlayerMoney(i) - GetPlayerCash(i);
GetPlayerName(i,username,sizeof(username));
printf("%s has picked up/attempted to spawn $%d.", username,hack);
}
}
}
}