07.08.2011, 15:01
Eu tenho um anti hacker do money, se o cara faz money й ban.. mas qndo eu uso comando de dargrana para o player, ele vai ban tmb. Queria q ele identificasse o comando e fazer com que ele n va a banir o player
pawn Код:
new DineroAntiGR[MAX_PLAYERS];
new TAntiG[MAX_PLAYERS];
forward AntiG(playerid);
forward ActivarAntiDineroGR (playerid);
public ActivarAntiDineroGR(playerid)
{
TAntiG[playerid] = SetTimerEx("AntiG", 1000, 0,"d",playerid);
return 1;
}
forward GR_OnPlayerSpawn(playerid);
public GR_OnPlayerSpawn(playerid)
{
new CashAGR = GetPlayerMoney(playerid);
DineroAntiGR[playerid] = CashAGR;
return 1;
}
public AntiG(playerid)
{
if(DineroAntiGR[playerid] <= GetPlayerMoney(playerid))
{
if(DineroAntiGR[playerid] != GetPlayerMoney(playerid))
{
new string[256];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string),"[SERVER]: %s fue baneado por el Anti-Cheat. Razon: MoneyHack.",sendername);
SendClientMessageToAll(0xFF0000FF, string);
BanEx(playerid,"Cheat de Dinero");
}
else
{
TAntiG[playerid] = SetTimerEx("AntiG", 1000, 0,"d",playerid);
}
}
else
{
TAntiG[playerid] = SetTimerEx("AntiG", 1000, 0,"d",playerid);
}
return 1;
}
stock SetPlayerMoneyGR(playerid, Cantidad)
{
DineroAntiGR[playerid] = 0;
ResetPlayerMoney(playerid);
DineroAntiGR[playerid] += Cantidad;
GivePlayerMoney(playerid,Cantidad);
return 1;
}
stock GivePlayerMoneyGR(playerid,Cantidad)
{
if(Cantidad == 0)
{
return 1;
}
else if(Cantidad >= 1)
{
DineroAntiGR[playerid] += Cantidad;
GivePlayerMoney(playerid,Cantidad);
return 1;
}
else if(Cantidad <= -1)
{
GivePlayerMoney(playerid, Cantidad);
DineroAntiGR[playerid] = GetPlayerMoney(playerid);
return 1;
}
return 1;
}
stock ResetPlayerMoneyGR(playerid)
{
DineroAntiGR[playerid] = 0;
ResetPlayerMoney(playerid);
return 1;
}
stock GetPlayerMoneyGR(playerid)
{
return DineroAntiGR[playerid];
}
stock SetPlayerMoney_(playerid, Cantidad)
{
DineroAntiGR[playerid] = 0;
ResetPlayerMoney(playerid);
DineroAntiGR[playerid] += Cantidad;
GivePlayerMoney(playerid,Cantidad);
return 1;
}
stock GivePlayerMoney_(playerid,Cantidad)
{
if(Cantidad == 0)
{
return 1;
}
else if(Cantidad >= 1)
{
DineroAntiGR[playerid] += Cantidad;
GivePlayerMoney(playerid,Cantidad);
return 1;
}
else if(Cantidad <= -1)
{
GivePlayerMoney(playerid, Cantidad);
DineroAntiGR[playerid] = GetPlayerMoney(playerid);
return 1;
}
return 1;
}
stock ResetPlayerMoney_(playerid)
{
DineroAntiGR[playerid] = 0;
ResetPlayerMoney(playerid);
return 1;
}
stock GetPlayerMoney_(playerid)
{
return DineroAntiGR[playerid];
}