Mein AntiWaffen-Cheat system ist bisschen Buggy bannt manchmal einfach so oder manchmal garnicht :O
new pWaffen[MAX_PLAYERS][13];
OnPlayerConnect
for(new i = 0; i < 13; i++)
{
pWaffen[playerid][i] = 0;
}
OnGamemodeInit
SetTimer("CheckPlayerWeapons",1000,1);
Function CheckPlayerWeapons()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new weapons[13][2];
for (new k = 0; k < 13; k++)
{
GetPlayerWeaponData(i, k, weapons[k][0], weapons[k][1]);
if(weapons[k][0] != pWaffen[i][k] && !IsPlayerNPC(i))
{
if(weapons[11][0] == 46 && pWaffen[i][11] == 0)
{
pWaffen[i][11] = 46;
return 1;
}
else if(weapons[11][0] == 0 && pWaffen[i][11] == 46)
{
pWaffen[i][11] = 0;
return 1;
}
new string[250];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(i, sendername, sizeof(sendername));
//format(string,sizeof(string),"%s wurde vom Server gebannt, Grund: Waffenhack!",sendername);
format(string,sizeof(string),"Security hat %s vom Server gebannt, Grund: Waffenhack!",sendername);
SendClientMessageToAll(rot, string);
TextDrawShowForPlayer(i,Schwarz);
PlayerInfo[i][pBan] = 1;
GameTextForPlayer(i, "~r~~r~Waffenhack!", 3000, 1);
Ban(i);
}
}
if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
{
new string[250];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(i, sendername, sizeof(sendername));
//format(string,sizeof(string),"%s wurde vom Server gebannt, Grund: Waffenhack!",sendername);
format(string,sizeof(string),"Security hat %s vom Server gebannt, Grund: Waffenhack!",sendername);
SendClientMessageToAll(rot, string);
TextDrawShowForPlayer(i,Schwarz);
PlayerInfo[i][pBan] = 1;
GameTextForPlayer(i, "~r~~r~Waffenhack!", 3000, 1);
Ban(i);
}
}
}
return 1;
}
Function AntiGivePlayerWeapon(playerid,weaponid,ammo)
{
new slot;
switch(weaponid)
{
case 1,19,20,21: slot = 0;
case 2,3,4,5,6,7,8,9: slot = 1;
case 10,11,12,13,14,15: slot = 10;
case 16,17,18: slot = 8;
case 22,23,24: slot = 2;
case 25,26,27: slot = 3;
case 28,29,32: slot = 4;
case 30: slot = 5;
case 31,33,34: slot = 6;
case 35,36,37,38: slot = 7;
case 40: slot = 12;
case 41,42,43: slot = 9;
case 44,45,46: slot = 11;
}
pWaffen[playerid][slot] = weaponid;
GivePlayerWeapon(playerid,weaponid,ammo);
return weaponid;
}
Function AntiResetPlayerWeapons(playerid)
{
for(new i = 0; i < 13; i++)
{
pWaffen[playerid][i] = 0;
}
ResetPlayerWeapons(playerid);
}
Das ist alles habe auch überall Anti davor aber es ist voll Fake was ist hier der Fehler ?