Count cheaters -
ALoX12 - 08.07.2015
I'm trying to make count cheaters.
Like:
PHP код:
format(string, sizeof(string), "%s (%d) has been caught by Server Anticheat.",Name[playerid], playerid,);
SendClientMessageToAll(COLOR_ADMIN, string);
I am using this ^
PHP код:
format(string, sizeof(string), "%s (%d) has been caught by Server Anticheat. %s Cheaters Caught.",Name[playerid], playerid,);
SendClientMessageToAll(COLOR_ADMIN, string);
i want ot make it like this so it count cheaters ^^
Like if a cheaters get banned
PHP код:
format(string, sizeof(string), "%s (%d) has been caught by Server Anticheat. 1 Cheaters Caught.",Name[playerid], playerid,);
SendClientMessageToAll(COLOR_ADMIN, string);
if again another cheater gets banned
PHP код:
format(string, sizeof(string), "%s (%d) has been caught by Server Anticheat. 2 Cheaters Caught.",Name[playerid], playerid,);
SendClientMessageToAll(COLOR_ADMIN, string);
it goes like this.
hope u understand
Re: Count cheaters -
youssefehab500 - 08.07.2015
PHP код:
new CountCheaters;
CountCheaters += 1;
format(string, sizeof(string), "%s (%d) has been caught by Server Anticheat. %d Cheater(s) Caught.",Name[playerid], playerid,, CountCheaters);
SendClientMessageToAll(COLOR_ADMIN, string);
This is something basic, every time someone gets caught, CountCheaters will increase.
Just implement this option in your function, any errors tell me.
Re: Count cheaters -
bigtigerbeee - 08.07.2015
Код:
new CountCheck[MAX_PLAYERS];
//AntiCheat Runing
CountCheck[playerid]++;
format(string, sizeof(string), "%s (%d) has been caught by Server Anticheat. %d Cheaters Caught.",Name[playerid], playerid, CountCheck[playerid]);
SendClientMessageToAll(COLOR_ADMIN, string);
Re: Count cheaters -
ALoX12 - 08.07.2015
What if i want to save it. I mean, 50 cheaters caught and then server gets restart so after restart it should say 51 cheaters caught. I don't want it starts from 0-1 again.
Re: Count cheaters -
DarkLouis - 08.07.2015
So you need to save it with your save system.
Re: Count cheaters -
ALoX12 - 08.07.2015
Ofc then i need it. but i want to know how?
Re: Count cheaters -
rymax99 - 08.07.2015
Make a server variable, add 1 to the value of it every time a cheater is caught, either make a field in SQL if you're using it for your bans that distinguishes cheaters from other bans, OnGameModeInit count the amount of rows that have that field set, set the server variable to that. Either that, or save the variable in the database and load it, but eventually it'd get 'out of sync' if the server crashes, etc.
Re: Count cheaters -
Stanford - 08.07.2015
Save it in some ini file/database. Make the variable global. load & save.