Auto minigun and Rocket launcher ban -
Face9000 - 07.11.2010
hai all,i need to add instant ban for Rocket Launcher (not heatseeker) and minigun.
Ex: If player have minigun,he will be instantly banned.
how?
Re: Auto minigun and Rocket launcher ban -
Alex_Valde - 07.11.2010
You can try using
this
Re: Auto minigun and Rocket launcher ban -
BP13 - 07.11.2010
Quote:
Originally Posted by Alex_Valde
|
He said instantly banned so this should do the trick:
pawn Код:
#include <a_samp>
//AntiCheat
new timer1;
public OnGameModeInit()
{
timer1 = SetTimer("AntiCheat",5000,true);
return 1;
}
forward AntiCheat();
public AntiCheat()
{
new weap, ammo;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerWeaponData(i, 7, weap, ammo);
if(weap == 38)
{
new string [128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(string, sizeof(string), "BANNED: %s has been auto banned by console. (Reason: Minigun Cheat)", pName);
SendClientMessageToAll(0xFF0000FF, string);
BanEx(i, "AntiCheat - Minigun");
break;
}
GetPlayerWeaponData(i, 7, weap, ammo);
if(weap == 35)
{
new string [128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(string, sizeof(string), "BANNED: %s has been auto banned by console. (Reason: Rocket launcher Cheat)", pName);
SendClientMessageToAll(0xFF0000FF, string);
BanEx(i, "AntiCheat - Rocket Launcher");
break;
}
}
}
return 1;
}
public OnGameModeExit()
{
KillTimer(timer1);
return 1;
}
Re: Auto minigun and Rocket launcher ban -
Face9000 - 07.11.2010
Ty guys
Re: Auto minigun and Rocket launcher ban -
Face9000 - 07.11.2010
Another question,how to show the banned message (XXX has been autobanned for minigun) in an echo chan?
I use incognito irc plugin,i need to add something?
Re: Auto minigun and Rocket launcher ban -
gr56 - 07.11.2010
pawn Код:
IRC_Say(botid, channel, string);
just add it under BanEx
Re: Auto minigun and Rocket launcher ban -
Face9000 - 07.11.2010
Код:
C:\Documents and Settings\Utente\Desktop\anrpg.pwn(29) : error 017: undefined symbol "IRC_Say"
C:\Documents and Settings\Utente\Desktop\anrpg.pwn(41) : error 017: undefined symbol "IRC_Say"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
lol
P.S. I use as filterscript.
Re: Auto minigun and Rocket launcher ban -
The_Moddler - 07.11.2010
Quote:
Originally Posted by BP13
He said instantly banned so this should do the trick:
pawn Код:
#include <a_samp>
//AntiCheat new timer1;
public OnGameModeInit() { timer1 = SetTimer("AntiCheat",5000,true); return 1; }
forward AntiCheat(); public AntiCheat() { new weap, ammo; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { GetPlayerWeaponData(i, 7, weap, ammo); if(weap == 38) { new string [128]; new pName[MAX_PLAYER_NAME]; GetPlayerName(i, pName, sizeof(pName)); format(string, sizeof(string), "BANNED: %s has been auto banned by console. (Reason: Minigun Cheat)", pName); SendClientMessageToAll(0xFF0000FF, string); BanEx(i, "AntiCheat - Minigun"); break; } GetPlayerWeaponData(i, 7, weap, ammo); if(weap == 35) { new string [128]; new pName[MAX_PLAYER_NAME]; GetPlayerName(i, pName, sizeof(pName)); format(string, sizeof(string), "BANNED: %s has been auto banned by console. (Reason: Rocket launcher Cheat)", pName); SendClientMessageToAll(0xFF0000FF, string); BanEx(i, "AntiCheat - Rocket Launcher"); break; } } } return 1; }
public OnGameModeExit() { KillTimer(timer1); return 1; }
|
This code will show if the player was banned. Isn't working?
Re: Auto minigun and Rocket launcher ban -
BP13 - 07.11.2010
Quote:
Originally Posted by The_Moddler
This code will show if the player was banned. Isn't working?
|
Huh? This is a timer that auto bans for those 2 weapons.
Re: Auto minigun and Rocket launcher ban -
The_Moddler - 07.11.2010
Quote:
Originally Posted by BP13
Huh? This is a timer that auto bans for those 2 weapons.
|
Ye I know, I was talking to Logitech90.
Which IRC Plugin are you using?