Where Shall i place this?
#1

I created a quick script that if your armour is 100+, You will get banned for Amour hacking,
But, Where is the best place to place it?

Heres my Coding.

pawn Код:
new Float:armour;
    GetPlayerArmour(playerid,armour);
    if (armour == 100)
    {
        new banned [MAX_PLAYERS],string[128];
        GetPlayerName(playerid, banned, sizeof(banned));
        format(string, sizeof(string), "AdminCMD: %s has been banned for Armour Hacks", banned);
        SendClientMessageToAll(COLOR_ORANGE, string);
        Ban(playerid);
    }
Reply
#2

edit: ignore comment, realised what i said =[
Reply
#3

OnPlayerUpdate I guess. Not sure
Reply
#4

Quote:
Originally Posted by Kostas'
Посмотреть сообщение
OnPlayerUpdate I guess. Not sure
I would create Timer.
pawn Код:
forward ArmourCheck();

public ArmourCheck()
{
    new Float:armour;
    for(new c=0;c<MAX_PLAYERS;c++) 
    if(IsPlayerConnected(c))
    {
        GetPlayerArmour(c,armour);
        if (armour > 100.0)
        {
            new banned[MAX_PLAYER_NAME],string[128];
            GetPlayerName(c, banned, sizeof(banned));
            format(string, sizeof(string), "AdminCMD: %s has been banned for Armour Hacks", banned);
            SendClientMessageToAll(COLOR_ORANGE, string);
            Ban(c);
        }
    }
    return 1;
}

public OnGameModeInit()
{
    SetTimer("ArmourCheck",1000,true);
    return 1;
}
I have also edited you code
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)