Slt
tout d'abord merci pour votre aide après avoir adapté votre code il n'y a pas de warnings ni d'erreurs
Mais je ne suis en aucun cas kické si je cheat ma tune
Voivi le code exacte que j'ai inséré sur mon GM:
//=====ANTICHEATARGENT==========================================================
#define sGivePlayerMoney(%0,%1) gLastCash[%0] += %1;\
GivePlayerMoney(%0, %1)
#define DIFFERENCE_MAXIMALE 500//différence maximale autorisée entre l'argent prévu et réel
//==============================================================================
new gLastCash[MAX_PLAYERS];//argent supposé du joueur
new MoneyCheat[MAX_PLAYERS];
new KillTimerCheat;
//==============================================================================
forward MoneyHackDetection();
//==============================================================================
Main()
//==============================================================================
public OnGameModeInit()
{
KillTimerCheat = SetTimer("Anticheat",7000,1); //anticheatargent
//==============================================================================
public OnGameModeExit()
{
KillTimer(KillTimerCheat);//anticheatargent
return 1;
}
//==============================================================================
public OnPlayerConnect(playerid)
{
MoneyCheat[playerid] = 0;//anticheatargent
return 1;
}
//==============================================================================
public OnPlayerDisconnect(playerid, reason)
{
MoneyCheat[playerid] = 0;//anticheatargent
return 1;
}
//==============================================================================
public MoneyHackDetection()
{
new tmp[128], money;
for( new i = 0; i < MAX_PLAYERS; i++)
{
if((money = GetPlayerMoney(i)))
{
if((money-gLastCash[i]) >= DIFFERENCE_MAXIMALE)
{
GetPlayerName(i, tmp, MAX_PLAYER_NAME);
format(tmp, sizeof(tmp), "Le joueur %s est kické pour money hack!", tmp);
SendClientMessageToAll(0xFFFFFFFF, tmp);
Kick(i);
}
gLastCash[i] = money;
}
}
return 1;
}
//==============================================================================
Si vous pouviez encore m'aidez un peu. Merci d'avance
A++