tag mismatch anticheat.
#1

pawn Код:
if(IsPlayerConnected(playerid))
    {
        if(IsSpawned[playerid] == 1)
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                new Float:angle;
                new currentveh;
                currentveh = GetPlayerVehicleID(playerid);
                GetVehicleZAngle(currentveh, angle);
                if((floatround(angle) == floatround(LastA[playerid])+180) || (floatround(angle) == floatround(LastA[playerid])-180))
                {
                    new string[128];
                    format(string,sizeof(string),"*SERVER KICK:%s[%d] Has Been Kicked From The Server Reason: Cheats Detected",Playername(playerid),playerid);
                    SendClientMessageToAll(PINK,string);
                    Kick(playerid);
                }
                LastA[playerid] = angle;
            }
        }
    }
tag mismatch on

pawn Код:
LastA[playerid] = angle;
Reply
#2

Not tested but compiled without errors:

pawn Код:
//****************************************************************************//
// Cameltoe's Test script
//
//
//****************************************************************************//

//****************************************************************************//
// Include's
//****************************************************************************//
#include <a_samp>

//****************************************************************************//
// Defines's
//****************************************************************************//

//****************************************************************************//
// Color's
//****************************************************************************//
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xFF0000AA

//****************************************************************************//
// Forward's
//****************************************************************************//
forward AC(playerid);

//****************************************************************************//
// Enum's
//****************************************************************************//
enum pInfo
{
    IsLogged,
    Float:LastA,
}
//****************************************************************************//
// Symbol's
//****************************************************************************//
new PlayerInfo[MAX_PLAYERS][pInfo];

//****************************************************************************//
// Function's
//****************************************************************************//
public AC(playerid)
{
if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][IsLogged] == 1)
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                new Float:angle;
                new currentveh;
                currentveh = GetPlayerVehicleID(playerid);
                GetVehicleZAngle(currentveh, angle);
                if((floatround(angle) == floatround(PlayerInfo[playerid][LastA])+180) || (floatround(angle) == floatround(PlayerInfo[playerid][LastA])-180))
                {
                    new string[128];
                    format(string,sizeof(string),"*SERVER KICK:%s[%d] Has Been Kicked From The Server Reason: Cheats Detected",GetName(playerid),playerid);
                    SendClientMessageToAll(COLOR_RED,string);
                    Kick(playerid);
                }
                PlayerInfo[playerid][LastA] = angle;
            }
        }
    }
}

//****************************************************************************//
// Stocks's
//****************************************************************************//

stock GetName(playerid)
{
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,sizeof(pName));
    return pName;
}
Reply
#3

i'll use that as an alternative. if i dont get any answers

anyone esle?

new LastA[MAX_PLAYERS];

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(IsSpawned[playerid] == 1)
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                new Float:angle;
                new currentveh;
                currentveh = GetPlayerVehicleID(playerid);
                GetVehicleZAngle(currentveh, angle);
                if((floatround(angle) == floatround(LastA[playerid])+180) || (floatround(angle) == floatround(LastA[playerid])-180))
                {
                    new string[128];
                    format(string,sizeof(string),"*SERVER KICK:%s[%d] Has Been Kicked From The Server Reason: Cheats Detected",Playername(playerid),playerid);
                    SendClientMessageToAll(PINK,string);
                    Kick(playerid);
                }
                LastA[playerid] = angle;
            }
        }
    }
    return 1;
}
dont tell me about onplayerupdate, i dont give a ..
Reply
#4

i'll make a compiled version of your script with new LastA[MAX_PLAYERS] after im dont with this one.
Reply
#5

okay thx camel btw did u lose ur msn or something xD
Reply
#6

Quote:
Originally Posted by Kar
Посмотреть сообщение
okay thx camel btw did u lose ur msn or something xD
Nono just been on vacation ^^

EDIT:

Change new LastA[MAX_PLAYERS]; to: new Float:LastA[MAX_PLAYERS];
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)