Hallo!
ich habe mich mal an einem Anti Geld Cheat System versucht. Nun schlägt dies aber falsch an, wenn ich mir per Befehl geld gebe.
public OnPlayerUpdate(playerid)
{
if(GetPlayerMoney(playerid) > Spieler[playerid][money_hand] && !IsAdmin(playerid, 7)) return _Ban(playerid, 2201, "Geld-Hack"), Ban(playerid);
else Spieler[playerid][money_hand] = GetPlayerMoney(playerid);
return 1;
}
GiveMoney(playerid, money)
{
Spieler[playerid][money_hand] += money;
GivePlayerMoney(playerid, money);
return 1;
}
ocmd:givemoney(playerid, params[])
{
if(!IsAdmin(playerid, 6)) return NoAdmin(playerid, 6);
new pID, money;
if(sscanf(params, "ud", pID, money)) return Using(playerid, "givemoney [ID] [Money]");
if(!IsPlayerConnected(pID)) return Offline(playerid);
GiveMoney(pID, money);
format(s, sizeof(s), "Du hast %s %d$ geld gegeben", GetName(pID), money);
SCM(playerid, C_YELLOW, s);
format(s, sizeof(s), "Du hast von %s %d$ Geld bekommen", GetName(playerid), money);
SCM(pID, C_DGREEN, s);
return 1;
}