SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 27/02/2013, 02:55 PM   #1
paul988
Little Clucker
 
Join Date: Oct 2012
Posts: 29
Reputation: 13
Default Help with anti armour hack!

Anti Armour Hack


When i connect to the server i get instantly banned when im spawning for armout hack and i dont see why!

My Anti Armour Hack:
pawn Code:
new pArmour[MAX_PLAYERS];

public OnPlayerSpawn(playerid)
{
    AntiCheat_SetPlayerArmour(playerid, 0);
    return 1;
}

public OnPlayerUpdate(playerid)
{
    new Float:Armour;
    if(GetPlayerArmour(playerid, Armour) > pArmour[playerid])
    }
        SendClientMessage(playerid, -1, ""Red"AntiCheat: You've got banned for armour cheating! ");
        format(string, sizeof(string), ""Red"AntiCheat: %s Banned | Reason: Armour Cheats! ", GetName(playerid));
        SendClientMessageToAll(-1, string);
        BanEx(playerid, "Banned By: SERVER | Reason: Armour Cheats! ");
    }
    else if(GetPlayerArmour(playerid, Armour) < pArmour[playerid])
    {
         pArmour[playerid] = GetPlayerArmour(playerid, Armour);
    }
    return 1;
}

stock AntiCheat_SetPlayerArmour(playerid, amount)
{
    pArmour[playerid] = amount;
    SetPlayerArmour(playerid, amount);
}

Do anyone know why im getting instant banned on spawn?

Forgot the GetName stock!
Edit:
pawn Code:
stock GetName(playerid)
{
    new pName[24];
    GetPlayerName(playerid, pName, 24);
    return pName;
}
paul988 is offline   Reply With Quote
Old 27/02/2013, 03:06 PM   #2
Infinity90
Gangsta
 
Infinity90's Avatar
 
Join Date: Feb 2012
Location: United Kingdom
Posts: 511
Reputation: 38
Default Re: Help with anti armour hack!

Possibly because:
http://gyazo.com/a666c4aeb261cdeff72b8a0f7d4582bb
You need to change it too a "{" Opening brace
__________________
Coding for money.
______________________________________________
You need to give respect to earn it.
______________________________________________
My Work
Dynamic Entrance System
EasyScript System
Infinity90 is offline   Reply With Quote
Old 27/02/2013, 03:09 PM   #3
paul988
Little Clucker
 
Join Date: Oct 2012
Posts: 29
Reputation: 13
Default Re: Help with anti armour hack!

Quote:
Originally Posted by Infinity90 View Post
Possibly because:
http://gyazo.com/a666c4aeb261cdeff72b8a0f7d4582bb
You need to change it too a "{" Opening brace
oops i were changing the code before posting it, didnt notice that but it still dosnt work with "{"
paul988 is offline   Reply With Quote
Old 27/02/2013, 03:10 PM   #4
zxc1
Huge Clucker
 
zxc1's Avatar
 
Join Date: Apr 2010
Posts: 225
Reputation: 15
Default Re: Help with anti armour hack!

EDIT: Nevermind too late.
zxc1 is offline   Reply With Quote
Old 27/02/2013, 03:11 PM   #5
paul988
Little Clucker
 
Join Date: Oct 2012
Posts: 29
Reputation: 13
Default Re: Help with anti armour hack!

Quote:
Originally Posted by zxc1 View Post
EDIT: Nevermind too late.
Edit: xD
paul988 is offline   Reply With Quote
Old 27/02/2013, 03:14 PM   #6
Vince
Spam Machine
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 10,067
Reputation: 2660
Default Re: Help with anti armour hack!

pawn Code:
if(GetPlayerArmour(playerid, Armour) > pArmour[playerid])

That's not how it works! If it were that easy, then why would we still need that variable? Read the wiki.
__________________
Vince is offline   Reply With Quote
Old 27/02/2013, 03:18 PM   #7
Glad2BeHere
Gangsta
 
Glad2BeHere's Avatar
 
Join Date: Oct 2012
Posts: 759
Reputation: 136
Default Re: Help with anti armour hack!

if i may recommend http://forum.sa-mp.com/showthread.php?t=419034

stock AntiCheat_SetPlayerArmour(playerid, amount)
{
pArmour[playerid] = amount;
SetPlayerArmour(playerid, amount);
}

pawn Code:
new Float:pArmour[MAX_PLAYERS];

stock AntiCheat_SetPlayerArmour(playerid, Float:amount)
{
    pArmour[playerid] = amount;
    SetPlayerArmour(playerid, amount);
}

Also What about if the player is shot does the system Accommodate that
Glad2BeHere is offline   Reply With Quote
Old 27/02/2013, 03:24 PM   #8
paul988
Little Clucker
 
Join Date: Oct 2012
Posts: 29
Reputation: 13
Default Re: Help with anti armour hack!

Quote:
Originally Posted by Glad2BeHere View Post
if i may recommend http://forum.sa-mp.com/showthread.php?t=419034

stock AntiCheat_SetPlayerArmour(playerid, amount)
{
pArmour[playerid] = amount;
SetPlayerArmour(playerid, amount);
}

pawn Code:
new Float:pArmour[MAX_PLAYERS];

stock AntiCheat_SetPlayerArmour(playerid, Float:amount)
{
    pArmour[playerid] = amount;
    SetPlayerArmour(playerid, amount);
}

Also What about if the player is shot does the system Accommodate that
1. Didnt work

2. Dosnt this work if the player gets shot?
pawn Code:
else if(GetPlayerArmour(playerid, Armour) < pArmour[playerid])
    {
         pArmour[playerid] = GetPlayerArmour(playerid, Armour);
    }
paul988 is offline   Reply With Quote
Old 27/02/2013, 03:55 PM   #9
paul988
Little Clucker
 
Join Date: Oct 2012
Posts: 29
Reputation: 13
Default Re: Help with anti armour hack!

It works for health but not armour, i dont understand why its not working for armour
paul988 is offline   Reply With Quote
Old 27/02/2013, 04:14 PM   #10
Vince
Spam Machine
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 10,067
Reputation: 2660
Default Re: Help with anti armour hack!

Did you just ignore my post?
__________________
Vince is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Anti-Armour Hack lordturhan Scripting Help 2 20/05/2012 07:31 AM
anti armour hack problem. Gh0sT_ Help Archive 6 19/03/2011 12:21 PM
[Include] WAC: Anti armour cheat/hack gimini Includes 9 15/12/2010 01:10 AM
[HELP] Anti armour hack problem Pooh7 Help Archive 3 13/10/2010 06:14 PM


All times are GMT. The time now is 05:45 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.