08.06.2013, 18:40
Very Simple fllow this script
new Additionargent[MAX_PLAYERS];
new ancienargent[MAX_PLAYERS];
new officielargent[MAX_PLAYERS];
forward aunticheatARGENT()
Onplayerconnect et OnPlayerDisconnect
Additionargent[playerid] = 0;
ancienargent[playerid] = 0;
GameModeInit
SetTimer("aunticheatARGENT",1000,1);
Use officielargent[playerid] += 500; // to Give 500 $ to a player
new Additionargent[MAX_PLAYERS];
new ancienargent[MAX_PLAYERS];
new officielargent[MAX_PLAYERS];
forward aunticheatARGENT()
Onplayerconnect et OnPlayerDisconnect
Additionargent[playerid] = 0;
ancienargent[playerid] = 0;
GameModeInit
SetTimer("aunticheatARGENT",1000,1);
PHP код:
public aunticheatARGENT()
{
for(new argent=0; argent<MAX_PLAYERS; argent++)
{
if(IsPlayerConnected(argent))
{
if(GetPlayerMoney(argent) != officielargent[argent])
{
ancienargent[argent] = GetPlayerMoney(argent);
ResetPlayerMoney(argent);
GivePlayerMoney(argent,officielargent[argent]);
}
}
}
return 0;
}