[SOLVED] "AntiHack Sending Client to admins" -
The_Tough - 16.06.2009
Here is the anticheat,I got the include in pawno but I need a help
Код:
new HealthCheck = 1; // Enabled (1) / Disabled (0) the Health Checks
new ArmourCheck = 1; // Enabled (1) / Disabled (0) the Armour Checks
new JetpackCheck = 1; // Enabled (1) / Disabled (0) the Jetpack Checks
new WeaponCheck = 1; // Enabled (1) / Disabled (0) the Weapon Checks
new MoneyCheck = 1; // Enabled (1) / Disabled (0) the Money Checks
new AmmoCheck = 1; // Enabled (1) / Disabled (0) the Ammo Checks
Код:
forward AntiHealthHack();
new Float:health;
forward AntiArmourHack();
new Float:armour;
forward AntiWeaponHack();
forward AntiAmmoHack();
#define MAX_WEAPONS 46
#define UAC_MAX_AMMO 50 // Max Number of Ammo, as difference
enum Winfo
forward ResetSpam(playerid);
forward ResetSpamCMD(playerid);
forward ResetMute(playerid);
#define MAX_SPAM_MESSAGES 3
#define MAX_SPAM_CMDS 3
new Spam[MAX_PLAYERS];
new SpamCMD[MAX_PLAYERS];
new Mute[MAX_PLAYERS];
etc for other
Here I would like to know how to and if its possible:
When the system detects a teleport,healthhack,etc to be like /report <id> <reason> to admins.So admins see it and do their job.Not auto-punish system.Would be really apriciated if you give me an example
Код:
if(HealthCheck == 1) // If HealthCheck is Enablbed
{
HealthTimer = SetTimer("AntiHealthHack", 3000, 1); // All 3.0 Seconds a check
}
if(ArmourCheck == 1) // If ArmourCheck is Enablbed
{
ArmourTimer = SetTimer("AntiArmourHack", 3000, 1); // All 3.0 Seconds a check
}
if(JetpackCheck == 1) // If JetpackCheck is Enablbed
{
JetpackTimer = SetTimer("AntiJetpack", 700, 1); // All 0.7 Seconds a check
}
if(WeaponCheck == 1) // If WeaponCheck is Enablbed
{
WeaponTimer = SetTimer("AntiWeaponHack", 800, 1); // All 0.8 Seconds a check
}
if(MoneyCheck == 1) // If MoneyCheck is Enablbed
{
MoneyTimer = SetTimer("AntiMoneyHack", 4000, 1); // All 4 Seconds a check
}
if(AmmoCheck == 1) // If AmmoCheck is Enablbed
{
AmmoTimer = SetTimer("AntiAmmoHack", 5000, 1); // All 5 Seconds a check
}
if(BotCheck == 1) // If BotCheck is Enablbed
{
BotTimer = SetTimer("AntiBot", 150000, 1); // All 2,5 Minutes a check
}
if(PosCheck == 1) // If PosCheck is Enablbed
{
PosTimer = SetTimer("AntiPositionHack", 1000, 1); // Jede Seconds a check
}
Re: I need a help here -
The_Tough - 16.06.2009
Noone know?
Re: [HELP] I really need you here. -
The_Tough - 16.06.2009
someone please can help me?
Re: [HELP] I really need you here. -
Weirdosport - 16.06.2009
The system of which you speak is completely different.... You're just after a report command..
And
don't triple post.
Re: [HELP] I really need you here. -
The_Tough - 17.06.2009
I mean that
When the Anti Cheat System detects someone ex:Health Hack to do the following thing.I will write it with words
if detect "health hack"
takeplayerid
/report id "health hack"
SendClientMessageToAdmins(AC:Reported <id> for <health hack>
return 1;
I want a system like this,how can I make it?I really need help.
Regards
Re: [HELP] I really need you here. -
Luka P. - 17.06.2009
Just format message and send it to admins
Re: [HELP] I really need you here. -
The_Tough - 18.06.2009
you mean this?
Код:
format(str, sizeof(str), "*To admin: AC reported %s for health hack !", pName);
SendClientMessage(i, admin_color, str);
I wrote this in my include is it correct?Its not because on pawno it apears this
Код:
public AntiHealthHack()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && Spawned[i] == 1)
{
GetPlayerHealth(i, health);
if(health > 100)
{
format(str, sizeof(str), "*To admin: AC reported %s for health hack !", pName);
SendClientMessage(i, admin_color, str);
}
}
return 1;
}
Код:
F:\break dance Video & music\diafora\ \GTA mods\Programs\pawno\Untitled.pwn(62) : warning 235: public function lacks forward declaration (symbol "AntiHealthHack")
F:\break dance Video & music\diafora\ \GTA mods\Programs\pawno\Untitled.pwn(66) : error 017: undefined symbol "Spawned"
F:\break dance Video & music\diafora\ \GTA mods\Programs\pawno\Untitled.pwn(66) : warning 215: expression has no effect
F:\break dance Video & music\diafora\ \GTA mods\Programs\pawno\Untitled.pwn(66) : error 001: expected token: ";", but found "]"
F:\break dance Video & music\diafora\ \GTA mods\Programs\pawno\Untitled.pwn(66) : error 029: invalid expression, assumed zero
F:\break dance Video & music\diafora\ \GTA mods\Programs\pawno\Untitled.pwn(66) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
If i do #include <anti_cheat> forward,new etc it apears this
Код:
[F:\break dance Video & music\diafora\ \GTA mods\Programs\pawno\health.pwn(10) : error 020: invalid symbol name ""
F:\break dance Video & music\diafora\ \GTA mods\Programs\pawno\health.pwn(79) : error 017: undefined symbol "str"
F:\break dance Video & music\diafora\ \GTA mods\Programs\pawno\health.pwn(79) : error 017: undefined symbol "str"
F:\break dance Video & music\diafora\ \GTA mods\Programs\pawno\health.pwn(79) : error 029: invalid expression, assumed zero
F:\break dance Video & music\diafora\ \GTA mods\Programs\pawno\health.pwn(79) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
http://pastebin.com/m1030f580
http://pastebin.com/m51268999
Re: [HELP] I really need you here. -
Ignas1337 - 18.06.2009
NOT
simply make a command like /report and use strtok for two params: reported_id and the text.
then do a global check (loop) and do it like the following:
pawn Код:
if(IsPlayerAdmin(i)){/*send message here*/}
this would output the message to all rcon admins. if you use a custom system, chec if player is admin according to that system.
Re: [HELP] I really need you here. -
The_Tough - 18.06.2009
Код:
public AntiHealthHack()
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && Spawned[i] == 1)
{
GetPlayerHealth(i, health);
if(health > 100)
{
format(str, sizeof(str), "*ToAdmin: AC reported %s(%d) Reason: Health Hack", reporter,playerid, reportedname, reported, params[strlen(tmp)+1]);
MessageToAdmins(COLOR_WHITE,str);
}
}
}
return 1;
}
Its that?
Re: [HELP] I really need you here. -
The_Tough - 20.06.2009
oh now I got it...Thanks,I will give a try,
If(checklevel>0)
format(string,sizeof(string), "Ac reported %s for "Health Hack" ");
SendClientMessage(i, admin_color, str);
ok I think its that,any prob will be fixed
thanks