OnPlayerUpdate Anti Weapon Hack (Urgent) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerUpdate Anti Weapon Hack (Urgent) (
/showthread.php?tid=270900)
OnPlayerUpdate Anti Weapon Hack (Urgent) -
Jack_Leslie - 22.07.2011
Hi guys, I have this on OnPlayerUpdate. It's supposed to ban the person if they aren't admin and have an RPG.
pawn Код:
new weaponid = GetPlayerWeapon(playerid);
if(PlayerInfo[playerid][pAdmin] <= 1 && weaponid == 38 || weaponid == 35 || weaponid == 36) //anti minigun and rpg
{
PlayerInfo[playerid][pBand] = 3;
PlayerInfo[playerid][pPermBand] = 1;
SendClientMessageToAll(COLOR_LIGHTRED, "{CC1100}{CC1100}AdmCmd:{FFFFFF}{FFFFFF} Another user was just banned by Leslie's Anti-Weapon hack!");
BanEx(playerid, "Banned by Leslie, Reason: Hacked Minigun/RPG");
}
else {
return 1;
}
EDIT:
Fixed, code above it was stopping it from working.
Re: OnPlayerUpdate Anti Weapon Hack (Urgent) -
Backwardsman97 - 22.07.2011
Try this.
pawn Код:
if(PlayerInfo[playerid][pAdmin] <= 1)
{
new weaponid = GetPlayerWeapon(playerid);
if(weaponid == 38 || weaponid == 35 || weaponid == 36) //anti minigun and rpg
{
PlayerInfo[playerid][pBand] = 3;
PlayerInfo[playerid][pPermBand] = 1;
SendClientMessageToAll(COLOR_LIGHTRED, "{CC1100}{CC1100}AdmCmd:{FFFFFF}{FFFFFF} Another user was just banned by Leslie's Anti-Weapon hack!");
BanEx(playerid, "Banned by Leslie, Reason: Hacked Minigun/RPG");
return 1;
}
}
return 1;
A logic error.
Re: OnPlayerUpdate Anti Weapon Hack (Urgent) -
Jack_Leslie - 22.07.2011
Quote:
Originally Posted by Backwardsman97
Try this.
pawn Код:
if(PlayerInfo[playerid][pAdmin] <= 1) { new weaponid = GetPlayerWeapon(playerid); if(weaponid == 38 || weaponid == 35 || weaponid == 36) //anti minigun and rpg { PlayerInfo[playerid][pBand] = 3; PlayerInfo[playerid][pPermBand] = 1; SendClientMessageToAll(COLOR_LIGHTRED, "{CC1100}{CC1100}AdmCmd:{FFFFFF}{FFFFFF} Another user was just banned by Leslie's Anti-Weapon hack!"); BanEx(playerid, "Banned by Leslie, Reason: Hacked Minigun/RPG"); return 1; } } return 1;
A logic error.
|
Didn't work.
Re: OnPlayerUpdate Anti Weapon Hack (Urgent) -
Backwardsman97 - 22.07.2011
Then there's a problem elsewhere.