27.11.2014, 20:19
Hi Guy I Created Money Anti Cheat But It Reset The Money Even If I Dont Use Hack's I Created A Command That Gives You $5 But It Reset IT Too Not Only Hack
Hare's My Code :
Pls Help And Thx ! ! !.........
Hare's My Code :
pawn Код:
#include <a_samp>
new pMoney[MAX_PLAYERS];
#if defined FILTERSCRIPT
#endif
public OnPlayerConnect(playerid)
{
pMoney[playerid] = 0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
pMoney[playerid] = 0;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/cash", cmdtext, true, 10) == 0)
{
GivePlayerMoney(playerid, 5);
return 1;
}
return 0;
}
stock ResetMoney(playerid)
{
new money;
money = GetPlayerMoney(playerid);
GivePlayerMoney(playerid, money);
}
public OnPlayerUpdate(playerid)
{
if(GetPlayerMoney(playerid) > pMoney[playerid])
{
ResetPlayerMoney(playerid);
ResetMoney(playerid);
}
return 1;
}