filterscript

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
  • Also das geht ganz einfach guck Ehmm


    Du ziehst die pwn und amx datei des Filterscripts in den Ordner Filterscripts, dan


    gehst du in Server.cfg und dan müsste da eigentlich stehen filterscripts da machst du eine [LEERTASTE] und schreibst den namen von dem Filterscript hin


    z.B dein filterscript heißt "Bla " oder so dan in Server.cfg unter filterscripts einfach Bla rein schreiben z.B ^^


    Ich hoffe ich konnte dir helfen :rolleyes:

  • jo früher
    habs aber etwas anders gemacht ich bring mal ein beispiel
    //EDIT
    forward reloadfs();//oben bei den forwards


    reloadfs();// bei ongamemodeinit


    public reloadfs()
    {
    SendRconCommand("reloadfs DeinFS");
    SendRconCommand("reloadfs DeinFS"); // kannste dir bilibieg viele einfügen kann aber den server langsamer machen
    return 1;
    }

    DDoS = Die dollsten ollen Sprüche :P


    Zitat

    Ich möchte hier den Lars gerne sehr loben.
    Er ist ein sehr netter kerl.
    Er hat es mir sofort gemacht..


    Zitat von Nachrichtenverlauf


    ;(


    Einmal editiert, zuletzt von BeHapper ()

  • also ich will des in mein script ein bauen wie kann ich des machen




    /*~~__--==||=|=| Neon Filterscript by DJ-EMTY |=|=||==--___~~*/


    #include <a_samp>
    #define FILTERSCRIPT


    #define DIALOG_NEON 8000
    #define COLOR_LIGHTGREEN 0xB4B5B7FF
    #pragma tabsize 0
    new arlarm;
    new arlarm2;
    forward Neon(playerid);
    forward Neon2(playerid);
    forward IsAAntiNeon2(playerid);
    forward IsAAntiNeon(playerid, vehicleid);
    enum pInfo
    {
    pNeonAn,
    pBlau,
    pGreen,
    pGelb,
    pRot,
    pPink,
    pWeiss,
    pSierene,
    pID,
    };
    new CarInfo[MAX_VEHICLES][pInfo];
    enum sInfo
    {
    sAnti,
    };
    new PlayerInfo[MAX_PLAYERS][sInfo];


    public OnFilterScriptInit()
    {
    print("\n__________[Eilmeldung]______________");
    print(" DJ-EMTY's NEON FS geladen & bereit.");
    print("____________________________________\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }
    public OnPlayerConnect(playerid)
    {
    PlayerInfo[playerid][sAnti]=0;
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    new car = GetPlayerVehicleID(playerid);
    new carip = CarInfo[car][pID];
    if(strcmp(cmdtext,"/neonan",true) == 0)
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    if(PlayerInfo[playerid][sAnti] == 0)
    {
    if(CarInfo[car][pNeonAn]==0)
    {
    ShowPlayerDialog(playerid,8000,DIALOG_STYLE_LIST,"Neon","Blau\nRot\nGrün\nWeiß\nPink\nGelb\nSirene","Auswählen","Abbrechen");
    CarInfo[car][pNeonAn]=1;
    new carid = GetPlayerVehicleID(playerid);
    CarInfo[car][pID] = carid;
    return 1;
    }
    else
    {
    SendClientMessage(playerid,COLOR_LIGHTGREEN,"* Diese Auto hat schon eine Neonröhre. Benutze /neonaus um sie auszuschalten.");
    }
    }
    else
    {
    SendClientMessage(playerid,COLOR_LIGHTGREEN,"* Dafür bekommst du keine Neons");
    }
    }
    else
    {
    SendClientMessage(playerid,COLOR_LIGHTGREEN,"* Du kannst dir keine Neons unter die Füße kleben.");
    }
    }
    if(strcmp(cmdtext,"/Neonaus",true) == 0)
    {
    DestroyObject(arlarm);
    DestroyObject(arlarm2);
    SendClientMessage(playerid,COLOR_LIGHTGREEN,"* Du hast deine Neon's ausgeschaltet.");
    CarInfo[carip][pNeonAn]=0;
    CarInfo[carip][pBlau]=0;
    CarInfo[carip][pGreen]=0;
    CarInfo[carip][pRot]=0;
    CarInfo[carip][pGelb]=0;
    CarInfo[carip][pWeiss]=0;
    CarInfo[carip][pPink]=0;
    CarInfo[carip][pSierene]=0;
    return 1;
    }
    return 0;
    }
    public OnVehicleSpawn(vehicleid)
    {
    CarInfo[vehicleid][pNeonAn]=0;
    CarInfo[vehicleid][pBlau]=0;
    CarInfo[vehicleid][pGreen]=0;
    CarInfo[vehicleid][pRot]=0;
    CarInfo[vehicleid][pGelb]=0;
    CarInfo[vehicleid][pWeiss]=0;
    CarInfo[vehicleid][pPink]=0;
    CarInfo[vehicleid][pSierene]=0;
    return 1;
    }
    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    new car = GetPlayerVehicleID(playerid);
    new carip = CarInfo[car][pID];
    if(dialogid == 8000)
    {
    if(response)
    switch(listitem)
    {
    case 0://NEONBLAU
    {
    new Float:x,Float:y,Float:z;
    arlarm = CreateObject(18648,x,y,z,0,0,0,283);
    arlarm2 = CreateObject(18648,x,y,z,0,0,0,283);
    AttachObjectToVehicle(arlarm, GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(arlarm2, GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    SendClientMessage(playerid,COLOR_LIGHTGREEN,"* Du hast dir eine Balue Neon-Röhre unter dein Fahrzeug gebaut.");
    CarInfo[carip][pBlau]=1;
    }
    case 1://NEONROT
    {
    new Float:x,Float:y,Float:z;
    arlarm = CreateObject(18647,x,y,z,0,0,0,283);
    arlarm2 = CreateObject(18647,x,y,z,0,0,0,283);
    AttachObjectToVehicle(arlarm, GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(arlarm2, GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    SendClientMessage(playerid,COLOR_LIGHTGREEN,"* Du hast dir eine Rote Neon-Röhre unter dein Fahrzeug gebaut.");
    CarInfo[carip][pRot]=1;
    }
    case 2://NEONGRÜN
    {
    new Float:x,Float:y,Float:z;
    arlarm = CreateObject(18649,x,y,z,0,0,0,283);
    arlarm2 = CreateObject(18649,x,y,z,0,0,0,283);
    AttachObjectToVehicle(arlarm, GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(arlarm2, GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    SendClientMessage(playerid,COLOR_LIGHTGREEN,"* Du hast dir eine Grüne Neon-Röhre unter dein Fahrzeug gebaut.");
    CarInfo[carip][pGreen]=1;
    }
    case 3://NEONWEIß
    {
    new Float:x,Float:y,Float:z;
    arlarm = CreateObject(18652,x,y,z,0,0,0,283);
    arlarm2 = CreateObject(18652,x,y,z,0,0,0,283);
    AttachObjectToVehicle(arlarm, GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(arlarm2, GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    SendClientMessage(playerid,COLOR_LIGHTGREEN,"* Du hast dir eine Weiße Neon-Röhre unter dein Fahrzeug gebaut.");
    CarInfo[carip][pWeiss]=1;
    }
    case 4://NEONPINK
    {
    new Float:x,Float:y,Float:z;
    arlarm = CreateObject(18651,x,y,z,0,0,0,283);
    arlarm2 = CreateObject(18651,x,y,z,0,0,0,283);
    AttachObjectToVehicle(arlarm, GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(arlarm2, GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    SendClientMessage(playerid,COLOR_LIGHTGREEN,"* Du hast dir eine Pinke Neon-Röhre unter dein Fahrzeug gebaut.");
    CarInfo[carip][pPink]=1;
    }
    case 5://NEONGELB
    {
    new Float:x,Float:y,Float:z;
    arlarm = CreateObject(18650,x,y,z,0,0,0,283);
    arlarm2 = CreateObject(18650,x,y,z,0,0,0,283);
    AttachObjectToVehicle(arlarm, GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(arlarm2, GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    SendClientMessage(playerid,COLOR_LIGHTGREEN,"* Du hast dir eine Gelbe Neon-Röhre unter dein Fahrzeug gebaut.");
    CarInfo[carip][pGelb]=1;
    }
    case 6://SIRENE fürs auto
    {
    new Float:x,Float:y,Float:z;
    arlarm = CreateObject(18646,x,y,z,0,0,0,283);
    arlarm2 = CreateObject(18646,x,y,z,0,0,0,283);
    AttachObjectToVehicle(arlarm, GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(arlarm2, GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    SendClientMessage(playerid,COLOR_LIGHTGREEN,"* Du hast dir eine Sierene unter dein Fahrzeug gebaut.");
    CarInfo[carip][pSierene]=1;
    }
    }
    }
    return 1;
    }
    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    SetTimer("Neon2",100,0);
    SetTimer("IsAAntiNeon2",10,0);
    return 1;
    }


    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    DestroyObject(arlarm);
    DestroyObject(arlarm2);
    PlayerInfo[playerid][sAnti] = 0;
    return 1;
    }


    public IsAAntiNeon2(playerid)
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetTimer("IsAAntiNeon",10,0);
    }
    else
    {
    SetTimer("IsAAntiNeon2",100,0);
    }
    return 1;
    }


    public Neon2(playerid)
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetTimer("Neon",100,0);
    }
    else
    {
    SetTimer("Neon2",100,0);
    }
    }


    public Neon(playerid)
    {
    new car = GetPlayerVehicleID(playerid);
    new carip = CarInfo[car][pID];
    if(IsPlayerInAnyVehicle(playerid))
    {
    if(CarInfo[carip][pNeonAn]==1)
    {
    if(CarInfo[carip][pBlau]==1)
    {
    new Float:x,Float:y,Float:z;
    arlarm = CreateObject(18648,x,y,z,0,0,0,283);
    arlarm2 = CreateObject(18648,x,y,z,0,0,0,283);
    AttachObjectToVehicle(arlarm, GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(arlarm2, GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    CarInfo[carip][pBlau]=1;
    }
    else if(CarInfo[carip][pRot]==1)
    {
    new Float:x,Float:y,Float:z;
    arlarm = CreateObject(18647,x,y,z,0,0,0,283);
    arlarm2 = CreateObject(18647,x,y,z,0,0,0,283);
    AttachObjectToVehicle(arlarm, GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(arlarm2, GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    CarInfo[carip][pRot]=1;
    }
    else if(CarInfo[carip][pGreen]==1)
    {
    new Float:x,Float:y,Float:z;
    arlarm = CreateObject(18649,x,y,z,0,0,0,283);
    arlarm2 = CreateObject(18649,x,y,z,0,0,0,283);
    AttachObjectToVehicle(arlarm, GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(arlarm2, GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    CarInfo[carip][pGreen]=1;
    }
    else if(CarInfo[carip][pGelb]==1)
    {
    new Float:x,Float:y,Float:z;
    arlarm = CreateObject(18650,x,y,z,0,0,0,283);
    arlarm2 = CreateObject(18650,x,y,z,0,0,0,283);
    AttachObjectToVehicle(arlarm, GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(arlarm2, GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    CarInfo[carip][pGelb]=1;
    }
    else if(CarInfo[carip][pWeiss]==1)
    {
    new Float:x,Float:y,Float:z;
    arlarm = CreateObject(18652,x,y,z,0,0,0,283);
    arlarm2 = CreateObject(18652,x,y,z,0,0,0,283);
    AttachObjectToVehicle(arlarm, GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(arlarm2, GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    CarInfo[carip][pWeiss]=1;
    }
    else if(CarInfo[carip][pPink]==1)
    {
    new Float:x,Float:y,Float:z;
    arlarm = CreateObject(18651,x,y,z,0,0,0,283);
    arlarm2 = CreateObject(18651,x,y,z,0,0,0,283);
    AttachObjectToVehicle(arlarm, GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(arlarm2, GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    CarInfo[carip][pPink]=1;
    }
    else if(CarInfo[carip][pSierene]==1)
    {
    new Float:x,Float:y,Float:z;
    arlarm = CreateObject(18646,x,y,z,0,0,0,283);
    arlarm2 = CreateObject(18646,x,y,z,0,0,0,283);
    AttachObjectToVehicle(arlarm, GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(arlarm2, GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    CarInfo[carip][pSierene]=1;
    }
    }
    }
    return 1;
    }
    public IsAAntiNeon(playerid)
    {
    new carid = GetPlayerVehicleID(playerid);
    new model = GetVehicleModel(carid);
    if(model == 448 || model == 461 || model == 462 || model == 463 || model == 468 || model == 471 || model == 481 || model == 509 || model == 510 || model == 521 ||model == 522 || model == 581 || model == 586)
    {
    PlayerInfo[playerid][sAnti] = 1;
    return 1;
    }
    return 1;
    }