Anti Cbug System

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hallo.


    Ich bräuchte für meinen Server einen Anti Cbug System. Ich wollte fragen ob mir jemand sowas Scripten oder Coden kann weiß jetzt nicht wie man es nennen kann.


    Es soll wenn man Cbug macht zwar schießen doch wenn er triff soll der Gegner keinen HP verlieren. Und der User der denn Cbug ausgenutz hat soll für 3-5 Sekunden die Animation haben was zbs wenn man lange rennt und er eine Schnauf pause machen um mehr Luft zu hollen. Darauf hin soll auf ihm der Cbug genutz hat in Rot *Cbug genutz* stehen. Und wenn man dies 3x ausnutz soll man vom Junkbuster Grund 3x Cbug Ausnutzung* gegickt werden.


    Hoffe ihr habt es irgendwie verstanden

  • Aber als ich es Compilet habe kam dies.


    C:\Users\korha\Desktop\Cbug System.pwn(3) : error 017: undefined symbol "MAX_PLAYERS"
    C:\Users\korha\Desktop\Cbug System.pwn(3) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\Cbug System.pwn(64) : warning 235: public function lacks forward declaration (symbol "OnFilterScriptInit")
    C:\Users\korha\Desktop\Cbug System.pwn(66) : error 017: undefined symbol "print"
    C:\Users\korha\Desktop\Cbug System.pwn(67) : error 017: undefined symbol "print"
    C:\Users\korha\Desktop\Cbug System.pwn(68) : error 017: undefined symbol "print"
    C:\Users\korha\Desktop\Cbug System.pwn(72) : warning 235: public function lacks forward declaration (symbol "OnFilterScriptExit")
    C:\Users\korha\Desktop\Cbug System.pwn(77) : warning 235: public function lacks forward declaration (symbol "OnPlayerKeyStateChange")
    C:\Users\korha\Desktop\Cbug System.pwn(79) : error 017: undefined symbol "KEY_FIRE"
    C:\Users\korha\Desktop\Cbug System.pwn(80) : error 017: undefined symbol "GetPlayerWeapon"
    C:\Users\korha\Desktop\Cbug System.pwn(82) : error 017: undefined symbol "GetPlayerWeapon"
    C:\Users\korha\Desktop\Cbug System.pwn(85) : warning 217: loose indentation
    C:\Users\korha\Desktop\Cbug System.pwn(90) : warning 217: loose indentation
    C:\Users\korha\Desktop\Cbug System.pwn(93) : error 017: undefined symbol "KEY_CROUCH"
    C:\Users\korha\Desktop\Cbug System.pwn(94) : error 017: undefined symbol "GetPlayerWeapon"
    C:\Users\korha\Desktop\Cbug System.pwn(104) : error 017: undefined symbol "KEY_FIRE"
    C:\Users\korha\Desktop\Cbug System.pwn(110) : error 017: undefined symbol "SetTimerEx"
    C:\Users\korha\Desktop\Cbug System.pwn(112) : error 017: undefined symbol "GetPlayerWeapon"
    C:\Users\korha\Desktop\Cbug System.pwn(113) : error 017: undefined symbol "GetPlayerWeapon"
    C:\Users\korha\Desktop\Cbug System.pwn(120) : warning 235: public function lacks forward declaration (symbol "OnPlayerUpdate")
    C:\Users\korha\Desktop\Cbug System.pwn(123) : error 017: undefined symbol "GetPlayerKeys"
    C:\Users\korha\Desktop\Cbug System.pwn(127) : error 017: undefined symbol "KEY_CROUCH"
    C:\Users\korha\Desktop\Cbug System.pwn(128) : error 017: undefined symbol "GetPlayerWeapon"
    C:\Users\korha\Desktop\Cbug System.pwn(145) : error 017: undefined symbol "MAX_PLAYER_NAME"
    C:\Users\korha\Desktop\Cbug System.pwn(145) : error 009: invalid array size (negative, zero or out of bounds)
    C:\Users\korha\Desktop\Cbug System.pwn(145) : error 036: empty statement
    C:\Users\korha\Desktop\Cbug System.pwn(145) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    21 Errors.

  • Also ich kann das Script ohne Probleme compilen.



    //Edit
    benutz diesen Quellcode ist zwar der gleiche, aber es sollten keine Fehler drinne sein

    #include <a_samp>


    #define COLOR_RED 0xAA3333AA


    #undef MAX_PLAYERS
    #define MAX_PLAYERS 500 // Change to you're servers max player count.


    #define MAX_SLOTS 48


    new NotMoving[MAX_PLAYERS];
    new WeaponID[MAX_PLAYERS];
    new CheckCrouch[MAX_PLAYERS];
    new Ammo[MAX_PLAYERS][MAX_SLOTS];


    new aWeaponNames[][32] = {
    {"Fist"}, // 0
    {"Brass Knuckles"}, // 1
    {"Golf Club"}, // 2
    {"Night Stick"}, // 3
    {"Knife"}, // 4
    {"Baseball Bat"}, // 5
    {"Shovel"}, // 6
    {"Pool Cue"}, // 7
    {"Katana"}, // 8
    {"Chainsaw"}, // 9
    {"Purple Dildo"}, // 10
    {"Vibrator"}, // 11
    {"Vibrator"}, // 12
    {"Vibrator"}, // 13
    {"Flowers"}, // 14
    {"Cane"}, // 15
    {"Grenade"}, // 16
    {"Teargas"}, // 17
    {"Molotov"}, // 18
    {" "}, // 19
    {" "}, // 20
    {" "}, // 21
    {"Colt 45"}, // 22
    {"Silenced Pistol"}, // 23
    {"Deagle"}, // 24
    {"Shotgun"}, // 25
    {"Sawns"}, // 26
    {"Spas"}, // 27
    {"Uzi"}, // 28
    {"MP5"}, // 29
    {"AK47"}, // 30
    {"M4"}, // 31
    {"Tec9"}, // 32
    {"Country Rifle"}, // 33
    {"Sniper Rifle"}, // 34
    {"Rocket Launcher"}, // 35
    {"Heat-Seeking Rocket Launcher"}, // 36
    {"Flamethrower"}, // 37
    {"Minigun"}, // 38
    {"Satchel Charge"}, // 39
    {"Detonator"}, // 40
    {"Spray Can"}, // 41
    {"Fire Extinguisher"}, // 42
    {"Camera"}, // 43
    {"Night Vision Goggles"}, // 44
    {"Infrared Vision Goggles"}, // 45
    {"Parachute"}, // 46
    {"Fake Pistol"} // 47
    };


    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" Simple & Accurate Anti-C-Bug by Whitetiger.");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    if((newkeys & KEY_FIRE) && (oldkeys & KEY_CROUCH) && !((oldkeys & KEY_FIRE) || (newkeys & KEY_HANDBRAKE)) || (oldkeys & KEY_FIRE) && (newkeys & KEY_CROUCH) && !((newkeys & KEY_FIRE) || (newkeys & KEY_HANDBRAKE)) ) {
    switch(GetPlayerWeapon(playerid)) {
    case 23..25, 27, 29..34, 41: {
    if(Ammo[playerid][GetPlayerWeapon(playerid)] > GetPlayerAmmo(playerid)) {
    OnPlayerCBug(playerid);
    }
    return 1;
    }
    }
    }


    if(CheckCrouch[playerid] == 1) {
    switch(WeaponID[playerid]) {
    case 23..25, 27, 29..34, 41: {
    if((newkeys & KEY_CROUCH) && !((newkeys & KEY_FIRE) || (newkeys & KEY_HANDBRAKE)) && GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK ) {
    if(Ammo[playerid][GetPlayerWeapon(playerid)] > GetPlayerAmmo(playerid)) {
    OnPlayerCBug(playerid);
    }
    }
    }
    }
    }


    //if(newkeys & KEY_CROUCH || (oldkeys & KEY_CROUCH)) return 1;


    else if(((newkeys & KEY_FIRE) && (newkeys & KEY_HANDBRAKE) && !((newkeys & KEY_SPRINT) || (newkeys & KEY_JUMP))) ||
    (newkeys & KEY_FIRE) && !((newkeys & KEY_SPRINT) || (newkeys & KEY_JUMP)) ||
    (NotMoving[playerid] && (newkeys & KEY_FIRE) && (newkeys & KEY_HANDBRAKE)) ||
    (NotMoving[playerid] && (newkeys & KEY_FIRE)) ||
    (newkeys & KEY_FIRE) && (oldkeys & KEY_CROUCH) && !((oldkeys & KEY_FIRE) || (newkeys & KEY_HANDBRAKE)) ||
    (oldkeys & KEY_FIRE) && (newkeys & KEY_CROUCH) && !((newkeys & KEY_FIRE) || (newkeys & KEY_HANDBRAKE)) ) {
    SetTimerEx("CrouchCheck", 3000, 0, "d", playerid);
    CheckCrouch[playerid] = 1;
    WeaponID[playerid] = GetPlayerWeapon(playerid);
    Ammo[playerid][GetPlayerWeapon(playerid)] = GetPlayerAmmo(playerid);
    return 1;
    }
    return 1;
    }


    public OnPlayerUpdate(playerid)
    {
    new Keys, ud, lr;
    GetPlayerKeys(playerid, Keys, ud, lr);
    if(CheckCrouch[playerid] == 1) {
    switch(WeaponID[playerid]) {
    case 23..25, 27, 29..34, 41: {
    if((Keys & KEY_CROUCH) && !((Keys & KEY_FIRE) || (Keys & KEY_HANDBRAKE)) && GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK ) {
    if(Ammo[playerid][GetPlayerWeapon(playerid)] > GetPlayerAmmo(playerid)) {
    OnPlayerCBug(playerid);
    }
    }
    //else SendClientMessage(playerid, COLOR_RED, "Failed in onplayer update");
    }
    }
    }


    if(!ud && !lr) { NotMoving[playerid] = 1; /*OnPlayerKeyStateChange(playerid, Keys, 0);*/ }
    else { NotMoving[playerid] = 0; /*OnPlayerKeyStateChange(playerid, Keys, 0);*/ }


    return 1;
    }


    forward OnPlayerCBug(playerid);
    public OnPlayerCBug(playerid) {
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    new str2[128];
    format(str2, sizeof(str2), "Automatic system has kicked %s for Crouch bugging with weapon (%s!)", playername, aWeaponNames[WeaponID[playerid]]);
    SendClientMessageToAll(COLOR_RED, str2);
    CheckCrouch[playerid] = 0;
    Kick(playerid);
    return 1;
    }
    forward CrouchCheck(playerid);
    public CrouchCheck(playerid) {
    CheckCrouch[playerid] = 0;
    return 1;
    }

  • Habe jetzt diesen Include eingefügt jetzt kam das



    C:\Users\korha\Desktop\Cbug System.pwn(3) : error 017: undefined symbol "MAX_PLAYERS"
    C:\Users\korha\Desktop\Cbug System.pwn(3) : error 010: invalid function or declaration
    C:\Users\korha\Desktop\German Reality\pawno\include\a_samp.inc(30) : warning 201: redefinition of constant/macro (symbol "MAX_PLAYERS")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.

  • Habe zwar ein fehler gefunden und es gefixxt doch jetzt kam das


    C:\Users\korha\Desktop\German Reality\pawno\include\a_samp.inc(30) : warning 201: redefinition of constant/macro (symbol "MAX_PLAYERS")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Warning.


    was muss man dort machen? oder kann dies bleiben und ist einfach egal?

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen

  • C:\Users\korha\Desktop\German Reality\pawno\include\a_samp.inc(30) : warning 201: redefinition of constant/macro (symbol "MAX_PLAYERS")
    C:\Users\korha\Desktop\Cbug System.pwn(6) : warning 201: redefinition of constant/macro (symbol "MAX_PLAYERS")
    C:\Users\korha\Desktop\Cbug System.pwn(11) : error 017: undefined symbol "MAX_SLOTS"
    C:\Users\korha\Desktop\Cbug System.pwn(11) : error 009: invalid array size (negative, zero or out of bounds)
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.





    #define COLOR_RED 0xAA3333AA


    #define MAX_PLAYERS
    #include <a_samp>


    #define MAX_PLAYERS 20

  • @Whice.



    C:\Users\korha\Desktop\Cbug System.pwn(11) : error 017: undefined symbol "MAX_SLOTS"
    C:\Users\korha\Desktop\Cbug System.pwn(11) : error 009: invalid array size (negative, zero or out of bounds)
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen