Beiträge von SnoopDogg

    SetPlayerAttachedObject( playerid, 5, 1210, 5, 0.293188, -0.024004, 0.056436, 144.529037, 278.794769, 0.000000, 1.000000, 1.000000, 1.000000 );

    Mein AntiWaffen-Cheat system ist bisschen Buggy bannt manchmal einfach so oder manchmal garnicht :O


    new pWaffen[MAX_PLAYERS][13];


    OnPlayerConnect
    for(new i = 0; i < 13; i++)
    {
    pWaffen[playerid][i] = 0;
    }


    OnGamemodeInit
    SetTimer("CheckPlayerWeapons",1000,1);



    Function CheckPlayerWeapons()
    {
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    new weapons[13][2];
    for (new k = 0; k < 13; k++)
    {
    GetPlayerWeaponData(i, k, weapons[k][0], weapons[k][1]);
    if(weapons[k][0] != pWaffen[i][k] && !IsPlayerNPC(i))
    {
    if(weapons[11][0] == 46 && pWaffen[i][11] == 0)
    {
    pWaffen[i][11] = 46;
    return 1;
    }
    else if(weapons[11][0] == 0 && pWaffen[i][11] == 46)
    {
    pWaffen[i][11] = 0;
    return 1;
    }
    new string[250];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(i, sendername, sizeof(sendername));
    //format(string,sizeof(string),"%s wurde vom Server gebannt, Grund: Waffenhack!",sendername);
    format(string,sizeof(string),"Security hat %s vom Server gebannt, Grund: Waffenhack!",sendername);
    SendClientMessageToAll(rot, string);
    TextDrawShowForPlayer(i,Schwarz);
    PlayerInfo[i][pBan] = 1;
    GameTextForPlayer(i, "~r~~r~Waffenhack!", 3000, 1);
    Ban(i);
    }
    }
    if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
    {
    new string[250];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(i, sendername, sizeof(sendername));
    //format(string,sizeof(string),"%s wurde vom Server gebannt, Grund: Waffenhack!",sendername);
    format(string,sizeof(string),"Security hat %s vom Server gebannt, Grund: Waffenhack!",sendername);
    SendClientMessageToAll(rot, string);
    TextDrawShowForPlayer(i,Schwarz);
    PlayerInfo[i][pBan] = 1;
    GameTextForPlayer(i, "~r~~r~Waffenhack!", 3000, 1);
    Ban(i);
    }
    }
    }
    return 1;
    }


    Function AntiGivePlayerWeapon(playerid,weaponid,ammo)
    {
    new slot;
    switch(weaponid)
    {
    case 1,19,20,21: slot = 0;
    case 2,3,4,5,6,7,8,9: slot = 1;
    case 10,11,12,13,14,15: slot = 10;
    case 16,17,18: slot = 8;
    case 22,23,24: slot = 2;
    case 25,26,27: slot = 3;
    case 28,29,32: slot = 4;
    case 30: slot = 5;
    case 31,33,34: slot = 6;
    case 35,36,37,38: slot = 7;
    case 40: slot = 12;
    case 41,42,43: slot = 9;
    case 44,45,46: slot = 11;
    }


    pWaffen[playerid][slot] = weaponid;
    GivePlayerWeapon(playerid,weaponid,ammo);
    return weaponid;
    }


    Function AntiResetPlayerWeapons(playerid)
    {
    for(new i = 0; i < 13; i++)
    {
    pWaffen[playerid][i] = 0;
    }
    ResetPlayerWeapons(playerid);
    }


    Das ist alles habe auch überall Anti davor aber es ist voll Fake was ist hier der Fehler ?

    Wenn ich das rein mache Funktioniert mein Script nicht mehr Run time error 19: "File or function is not found"


    Ich habe aber 0 Errors 0 Warnings :O


    Es liegt an dieser Funktion glaube ich ?


    forward Z_High(playerid);
    public Z_High(playerid)
    {
    new Float:X, Float:Y, Float:Z, Float:NZ;
    GetPlayerPos(playerid, X, Y, Z);
    MapAndreas_FindZ_For2DCoord(X, Y, NZ);
    if(Z > NZ)
    {
    xCount[playerid]++;
    if(xCount[playerid] >= 25)
    {
    Kick(playerid);
    }
    }
    else KillTimer(Z_Timer[playerid]);
    return 1;
    }

    Hallo Leute
    Ich suche schon heute den ganzen tag ein gutes Anti-Airbreak System was auch zufuss und in einer Care funktioniert hat jemand ein gutes oder so weil ich finde nichts.


    MFG
    SuTroX


    Welchen Timer soll ich nutzen


    new weapons[13][2];
    for (new k = 0; k < 13; k++)
    {
    GetPlayerWeaponData(i, k, weapons[k][0], weapons[k][1]);
    if(weapons[k][0] != 0 && pWaffen[i][k] == 0)Ban(playerid);
    }
    if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK){
    Ban(playerid);
    }


    z.B


    CheckPlayerWeapons()
    und dann MAX_PLAYERS oder


    CheckPlayerWeapons(playerid)


    weil da ja steht einmal (i) und einmal (playerid)


    new weapons[13][2];
    for (new k = 0; k < 13; k++)
    {
    GetPlayerWeaponData(i, k, weapons[k][0], weapons[k][1]);
    if(weapons[k][0] != 0 && pWaffen[i][k] == 0)Ban(playerid);
    }
    if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
    {
    Ban(playerid);
    }

    Ich habe ein Antiwaffenhack System angefangen nun komm ich nicht weiter wie ich es checken soll ?


    enum SpielerDaten
    {
    bool:WeaponGived,
    Weapons[13],
    Ammos[13]


    stock GetWeaponSlot(weaponid){
    new slot;
    if(weaponid == 0 || weaponid == 1) { slot = 0; }
    else if(weaponid >= 2 && weaponid <= 9) { slot = 1; }
    else if(weaponid >= 22 && weaponid <= 24) { slot = 2; }
    else if(weaponid >= 25 && weaponid <= 27) { slot = 3; }
    else if(weaponid == 28 || weaponid == 29 || weaponid == 32) { slot = 4; }
    else if(weaponid == 30 || weaponid == 31) { slot = 5; }
    else if(weaponid == 33 || weaponid == 34) { slot = 6; }
    else if(weaponid >= 35 && weaponid <= 38) { slot = 7; }
    else if((weaponid >= 16 && weaponid <= 18) || weaponid == 39) { slot = 8; }
    else if(weaponid >= 41 && weaponid <= 43) { slot = 9; }
    else if(weaponid >= 10 && weaponid <= 15) { slot = 10; }
    else if(weaponid >= 44 && weaponid <= 46) { slot = 11; }
    else if(weaponid) { slot = 12; }
    else { slot = 0; }
    return slot;
    }




    Mysql Speichern und Loaden


    for(new slot=0;slot<13;slot++)
    {
    PlayerInfo[playerid][Weapons][slot] = mysql_GetInt("accounts", "Waffenslot1", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Weapons][slot] = mysql_GetInt("accounts", "Waffenslot2", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Weapons][slot] = mysql_GetInt("accounts", "Waffenslot3", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Weapons][slot] = mysql_GetInt("accounts", "Waffenslot4", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Weapons][slot] = mysql_GetInt("accounts", "Waffenslot5", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Weapons][slot] = mysql_GetInt("accounts", "Waffenslot6", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Weapons][slot] = mysql_GetInt("accounts", "Waffenslot7", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Weapons][slot] = mysql_GetInt("accounts", "Waffenslot8", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Weapons][slot] = mysql_GetInt("accounts", "Waffenslot9", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Weapons][slot] = mysql_GetInt("accounts", "Waffenslot10", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Weapons][slot] = mysql_GetInt("accounts", "Waffenslot11", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Weapons][slot] = mysql_GetInt("accounts", "Waffenslot12", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Ammos][slot] = mysql_GetInt("accounts", "Waffenammo1", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Ammos][slot] = mysql_GetInt("accounts", "Waffenammo2", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Ammos][slot] = mysql_GetInt("accounts", "Waffenammo3", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Ammos][slot] = mysql_GetInt("accounts", "Waffenammo4", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Ammos][slot] = mysql_GetInt("accounts", "Waffenammo5", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Ammos][slot] = mysql_GetInt("accounts", "Waffenammo6", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Ammos][slot] = mysql_GetInt("accounts", "Waffenammo7", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Ammos][slot] = mysql_GetInt("accounts", "Waffenammo8", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Ammos][slot] = mysql_GetInt("accounts", "Waffenammo9", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Ammos][slot] = mysql_GetInt("accounts", "Waffenammo10", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Ammos][slot] = mysql_GetInt("accounts", "Waffenammo11", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][Ammos][slot] = mysql_GetInt("accounts", "Waffenammo12", "Name", PlayerInfo[playerid][pName]);
    }
    for(new slot=0;slot<13;slot++)
    {
    mysql_SetInt("accounts", "Waffenslot1", PlayerInfo[playerid][Weapons][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenslot2", PlayerInfo[playerid][Weapons][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenslot3", PlayerInfo[playerid][Weapons][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenslot4", PlayerInfo[playerid][Weapons][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenslot5", PlayerInfo[playerid][Weapons][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenslot6", PlayerInfo[playerid][Weapons][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenslot7", PlayerInfo[playerid][Weapons][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenslot8", PlayerInfo[playerid][Weapons][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenslot9", PlayerInfo[playerid][Weapons][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenslot10", PlayerInfo[playerid][Weapons][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenslot11", PlayerInfo[playerid][Weapons][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenslot12", PlayerInfo[playerid][Weapons][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenammo1", PlayerInfo[playerid][Ammos][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenammo2", PlayerInfo[playerid][Ammos][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenammo3", PlayerInfo[playerid][Ammos][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenammo4", PlayerInfo[playerid][Ammos][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenammo5", PlayerInfo[playerid][Ammos][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenammo6", PlayerInfo[playerid][Ammos][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenammo7", PlayerInfo[playerid][Ammos][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenammo8", PlayerInfo[playerid][Ammos][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenammo9", PlayerInfo[playerid][Ammos][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenammo10", PlayerInfo[playerid][Ammos][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenammo11", PlayerInfo[playerid][Ammos][slot], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Waffenammo12", PlayerInfo[playerid][Ammos][slot], "Name", PlayerInfo[playerid][pName]);
    }







    Function AntiGivePlayerWeapon(playerid, weaponid, ammo)
    {
    if(IsPlayerConnected(playerid) && (weaponid && ammo))
    {
    PlayerInfo[playerid][WeaponGived] = true;
    PlayerInfo[playerid][Weapons][GetWeaponSlot(weaponid)] = weaponid;
    PlayerInfo[playerid][Ammos][GetWeaponSlot(weaponid)] += ammo;
    GivePlayerWeapon(playerid, weaponid, ammo);
    PlayerInfo[playerid][WeaponGived] = false;
    }
    return 1;
    }


    Function AntiResetPlayerWeapons(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    ResetPlayerWeapons(playerid);
    PlayerInfo[playerid][WeaponGived] = true;
    for(new slot=0;slot<13;slot++)
    {
    PlayerInfo[playerid][Weapons][slot] = 0;
    PlayerInfo[playerid][Ammos][slot] = 0;
    }
    PlayerInfo[playerid][WeaponGived] = false;
    }
    return 1;
    }



    Und wie soll ich es Checken ?



    MFG
    SuTroX