Beiträge von xxchrisiclpxx

    Die Sirene funktioniert nicht sie kommt garnicht erst ans auto.
    Das selbe Problem habe ich auch bei neonröhren sie gehen einfach nicht ans auto was kann der fehler hierfür sein?



    if( strcmp( cmdtext, "/sirene1", true) == 0 )
    {
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xFFFFFFFF, "Du sitzt in keinem Auto.");
    AttachObjectToVehicle(GetPlayerVehicleID(playerid),18646, 10.0, 10.0, 10.0, 0, 0, 0);
    SendClientMessage(playerid, 0xFFFFFFFF, "Du hast die Undercoversirene aufs Dach gesetzt.");
    return 1;
    }
    if( strcmp( cmdtext, "/sirene2", true) == 0 )
    {
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xFFFFFFFF, "Du sitzt in keinem Auto.");
    AttachObjectToVehicle(GetPlayerVehicleID(playerid),19419, 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000);
    SendClientMessage(playerid, 0xFFFFFFFF, "Du hast die Sirene aufs dach gesetzt.");
    return 1;
    }

    Hey Com


    Ich habe das Tutorial über das erstellen von Zöllen angescheut
    [ SCRIPTING ] [Tutorial] Zollsystem [Anfänger]


    Nun habe ich diese Fails
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(2397) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(2397) : warning 215: expression has no effect
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(2397) : warning 215: expression has no effect
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(2397) : warning 215: expression has no effect
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(2397) : warning 215: expression has no effect
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(2397) : warning 215: expression has no effect
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(2397) : error 001: expected token: ";", but found ")"
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(2397) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(2397) : fatal error 107: too many error messages on one line


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



    4 Errors.


    Die Betroffene Reihe ist diese hier:
    ShowPlayerDialog(playerid,DIALOG_CLOSE_ZOLL,DIALOG_STYLE_LIST,"Zollverwaltung",ZOLLCSTRING,"Auswählen","Schließen");


    Der DialogResponse:


    switch(dialogid){
    case DIALOG_CLOSE_ZOLL:{
    if(response){
    new i;
    for(; i < MAX_ZOLLGATES; ++i){
    if(listitem == i){
    ZollClickID{playerid} = i;
    SetPlayerMapIcon(playerid, i, ZollInfo[i][zCX],ZollInfo[i][zCY],ZollInfo[i][zCZ], 47, 0, MAPICON_GLOBAL );
    return


    ShowPlayerDialog(playerid,DIALOG_CHANGESTATE_ZOLL,DIALOG_STYLE_INPUT,"Zollsystem",
    "Gebe hier 1 für schließen und 0 für dne Status offen ein", "Login",
    "Cancel");
    }
    }
    }
    }
    case DIALOG_CHANGESTATE_ZOLL:{
    if(response){
    if(sscanf(inputtext,"l",ZollInfo[ZollClickID{playerid}][zState]))return


    ShowPlayerDialog(playerid,DIALOG_CHANGESTATE_ZOLL,DIALOG_STYLE_INPUT,"Zollsystem",
    "Gebe hier 1 für schließen und 0 für dne Status offen ein", "Login",
    "Cancel");
    ZollDialogText();
    RemovePlayerMapIcon(playerid,ZollClickID{playerid});
    ShowPlayerDialog(playerid,DIALOG_CLOSE_ZOLL,DIALOG_STYLE_LIST,"Zollverwaltung",ZOLLCSTRING,"Auswählen","Schließen");
    }else{
    RemovePlayerMapIcon(playerid,ZollClickID{playerid});
    return ShowPlayerDialog(playerid,DIALOG_CLOSE_ZOLL,DIALOG_STYLE_LIST,"Zollverwaltung",ZOLLCSTRING,"Auswählen","Schließen");
    }
    }
    }

    Anfang:
    enum zollsys {
    zID,
    zObject,
    Float:zCX,
    Float:zCY,
    Float:zCZ,
    Float:zCRx,
    Float:zCRy,
    Float:zCRz,
    Float:zOX,
    Float:zOY,
    Float:zOZ,
    Float:zORx,
    Float:zORy,
    Float:zORz,
    bool:zState,
    };
    #define MAX_ZOLLGATES (19)


    new ZollInfo[MAX_ZOLLGATES][zollsys] = {
    {0,973,1754.4000244,525.9000244,27.2999992-3,0.0000000,0.0000000,160.0000000,1754.4000244,525.9000244,27.2999992,0.0000000,0.0000000,160.0000000,false},
    {1,973,1745.9000244,528.9000244,27.2999992-3,0.0000000,0.0000000,160.0000000,1745.9000244,528.9000244,27.2999992,0.0000000,0.0000000,160.0000000,false},
    {2,973,1737.5999756,532.2999878,27.2999992-3,0.0000000,0.0000000,340.0000000,1737.5999756,532.2999878,27.2999992,0.0000000,0.0000000,340.0000000,false},
    {3,973,1729.4000244,535.4000244,27.2999992-3,0.0000000,0.0000000,340.0000000,1729.4000244,535.4000244,27.2999992,0.0000000,0.0000000,340.0000000,false},
    {4,979,433.3999939,597.4000244,18.7999992-3,0.0000000,0.0000000,34.0000000,433.3999939,597.4000244,18.7999992,0.0000000,0.0000000,34.0000000,false},
    {5,979,-139.5000000,473.2000122,11.8999996-3,0.0000000,0.0000000,346.0000000,-139.5000000,473.2000122,11.8999996,0.0000000,0.0000000,346.0000000,false},
    {6,978,-1303.8994141,934.0000000,45.7000008-3,0.0000000,0.0000000,315.9997559,-1303.8994141,934.0000000,45.7000008,0.0000000,0.0000000,315.9997559,false},
    {7,978,-1309.5999756,939.5000000,45.5999985-3,0.0000000,0.0000000,316.0000000,-1309.5999756,939.5000000,45.5999985,0.0000000,0.0000000,316.0000000,false},
    {8,978,-1297.5000000,927.2000122,45.7000008-3,0.0000000,0.0000000,136.0000000,-1297.5000000,927.2000122,45.7000008,0.0000000,0.0000000,136.0000000,false},
    {9,978,-1291.3000488,921.9000244,45.7000008-3,0.0000000,0.0000000,136.0000000,-1291.3000488,921.9000244,45.7000008,0.0000000,0.0000000,136.0000000,false},
    {10,978,-2686.3999023,1275.8000488,55.2999992-3,0.0000000,0.0000000,0.0000000,-2686.3999023,1275.8000488,55.2999992,0.0000000,0.0000000,0.0000000,false},
    {11,978,-2695.1999512,1275.5999756,55.2999992-3,0.0000000,0.0000000,0.0000000,-2695.1999512,1275.5999756,55.2999992,0.0000000,0.0000000,0.0000000,false},
    {12,978,-2677.0000000,1275.0999756,55.2999992-3,0.0000000,0.0000000,180.0000000,-2677.0000000,1275.0999756,55.2999992,0.0000000,0.0000000,180.0000000,false},
    {13,978,-2667.3000488,1275.0999756,55.2999992-3,0.0000000,0.0000000,180.0000000,-2667.3000488,1275.0999756,55.2999992,0.0000000,0.0000000,180.0000000,false},
    {14,978,-2256.3999023,2681.6000977,55.0000000-3,0.0000000,0.0000000,270.0000000,-2256.3999023,2681.6000977,55.0000000,0.0000000,0.0000000,270.0000000,false},
    {15,978,-2256.8000488,2672.5000000,54.7999992-3,0.0000000,0.0000000,270.0000000,-2256.8000488,2672.5000000,54.7999992,0.0000000,0.0000000,270.0000000,false},
    {16,978,-2254.8000488,2644.5000000,55.2000008-3,0.0000000,0.0000000,90.0000000,-2254.8000488,2644.5000000,55.2000008,0.0000000,0.0000000,90.0000000,false},
    {17,978,-2254.5000000,2635.8999023,55.2000008-3,0.0000000,0.0000000,90.0000000,-2254.5000000,2635.8999023,55.2000008,0.0000000,0.0000000,90.0000000,false}
    };



    OnGamemodeInit:
    for(new i; i < MAX_ZOLLGATES; ++i){
    ZollInfo[i][zID] = CreateDynamicObject(ZollInfo[i][zObject]
    ,ZollInfo[i][zCX]
    ,ZollInfo[i][zCY]
    ,ZollInfo[i][zCZ]
    ,ZollInfo[i][zCRx]
    ,ZollInfo[i[zCRy]
    ,ZollInfo[i][zCRz]
    );
    }



    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(116) : error 008: must be a constant expression; assumed zero
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(134) : error 010: invalid function or declaration
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(222 -- 227) : error 028: invalid subscript (not an array or too many subscripts): "i"
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(227) : warning 217: loose indentation
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(227) : warning 215: expression has no effect
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(227) : error 001: expected token: ";", but found "]"
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(227) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(227) : fatal error 107: too many error messages on one line


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



    6 Errors.

    nach dem öfteren anschauen ist mir auch aufgefallen das ich die in meinem falle (19) bei MAX_ZOLLGATES vergessen habe


    auch das mit den Kordinaten ich dachte das währen nur die Positionen und rotationen vom Ori Gate aber da muss ich ja auch noch die eintragen wie es ist wenn es unten ist habe ich also auch eingetragen


    Ich hatte nach diesen beiden Fehlerbehebungen immer noch genau die selben errors gerade bei diesem: for(new i; i < MAX_ZOLLGATES; ++i)
    {
    ZollInfo[i][zID] =
    CreateDynamicObject(ZollInfo[i][zObject],ZollInfo[i][zCX],ZollInfo[i][zCY],ZollInfo[i][zCZ],
    ZollInfo[i][zCRx],ZollInfo[i[zCRy],ZollInfo[i][zCRz]);
    }
    bei diesem Teil muss ich zugeben das ich es wirklich nur ins Script eingefügt habe da ich nocht weis was das ist und soll und bringt



    ALLES ANDERE HABE ICH MIR DUCHGELESEN VERSUCHT ES ZU VERSTEHEN UND NICHT NUR KOPIERT

    habe ein Problem


    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(113) : error 017: undefined symbol "MAX_ZOLLGATES"
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(217) : error 017: undefined symbol "Toranzahl"
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(219 -- 221) : error 028: invalid subscript (not an array or too many subscripts): "i"
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(221) : warning 215: expression has no effect
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(221) : error 001: expected token: ";", but found "]"
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(221) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(221) : fatal error 107: too many error messages on one line


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



    6 Errors.


    Was ich bis jetzt habe


    Oben im Script:
    //ZollSysthem
    enum zollsys {
    zID,
    zObject,
    Float:zCX,
    Float:zCY,
    Float:zCZ,
    Float:zCRx,
    Float:zCRy,
    Float:zCRz,
    Float:zOX,
    Float:zOY,
    Float:zOZ,
    Float:zORx,
    Float:zORy,
    Float:zORz,
    bool:zState,
    };
    new ZollInfo[MAX_ZOLLGATES][zollsys] = {
    {0,973,1754.4000244,525.9000244,27.2999992,0.0000000,0.0000000,160.0000000,false},
    {1,973,1745.9000244,528.9000244,27.2999992,0.0000000,0.0000000,160.0000000,false},
    {2,973,1737.5999756,532.2999878,27.2999992,0.0000000,0.0000000,340.0000000,false},
    {3,973,1729.4000244,535.4000244,27.2999992,0.0000000,0.0000000,340.0000000,false},
    {4,979,433.3999939,597.4000244,18.7999992,0.0000000,0.0000000,34.0000000,false},
    {5,979,-139.5000000,473.2000122,11.8999996,0.0000000,0.0000000,346.0000000,false},
    {6,978,-1303.8994141,934.0000000,45.7000008,0.0000000,0.0000000,315.9997559,false},
    {7,978,-1309.5999756,939.5000000,45.5999985,0.0000000,0.0000000,316.0000000,false},
    {8,978,-1297.5000000,927.2000122,45.7000008,0.0000000,0.0000000,136.0000000,false},
    {9,978,-1291.3000488,921.9000244,45.7000008,0.0000000,0.0000000,136.0000000,false},
    {10,978,-2686.3999023,1275.8000488,55.2999992,0.0000000,0.0000000,0.0000000,false},
    {11,978,-2695.1999512,1275.5999756,55.2999992,0.0000000,0.0000000,0.0000000,false},
    {12,978,-2677.0000000,1275.0999756,55.2999992,0.0000000,0.0000000,180.0000000,false},
    {13,978,-2667.3000488,1275.0999756,55.2999992,0.0000000,0.0000000,180.0000000,false},
    {14,978,-2256.3999023,2681.6000977,55.0000000,0.0000000,0.0000000,270.0000000,false},
    {15,978,-2256.8000488,2672.5000000,54.7999992,0.0000000,0.0000000,270.0000000,false},
    {16,978,-2254.8000488,2644.5000000,55.2000008,0.0000000,0.0000000,90.0000000,false},
    {17,978,-2254.5000000,2635.8999023,55.2000008,0.0000000,0.0000000,90.0000000,false}
    };


    #define MAX_ZOLLGATES (Toranzahl)


    bei OnGameModeInit:
    //Zoll
    for(new i; i < MAX_ZOLLGATES; ++i)
    {
    ZollInfo[i][zID] =
    CreateDynamicObject(ZollInfo[i][zObject],ZollInfo[i][zCX],ZollInfo[i][zCY],ZollInfo[i][zCZ],
    ZollInfo[i][zCRx],ZollInfo[i[zCRy],ZollInfo[i][zCRz]);
    }


    Ich bin das Tutorial einige male durchgegangen und habe jetzt immer noch einige errors ich glaube ich muss mich noch anders schlau machen :/

    Hey Com


    Ich möchte gerade ein Zollsysthem scripten und mache ca. 9 Zölle (erstmal)


    Jetzt meine Frage ich möchte es so machen das die zölle nach 5 sekunden wieder zu gehen ich weis auch wie es mit den
    Timern geht aber muss ich für jeden Zoll einen eigenen Timer erstellen oder kann ich auch einen Timer für alle Zölle machen


    Wenn es möglich ist nur ein Zoll zu machen Wie geht das dann?

    Es kommt tazächlich er sei in keiner Staatsfraktion doch wieso?


    Die Abfrage:
    stock IstSpielerInStaatsfraktion(playerid)
    {
    if(GetPVarInt(playerid,"Frktion")==1) return 1;
    return 0;
    }

    Wenn ich diesen Befehl an der angegebenen Stelle eingebe passiert nichts wie kann das sein?


    if(strcmp(cmdtext,"/enter",true,6) == 0)
    {
    if(IstSpielerInStaatsfraktion(playerid))
    {
    if(IsPlayerInRangeOfPoint(playerid,2.0,-2447.3311,523.0743,30.3530))
    {


    SetPlayerPos(playerid,-959.5824,1953.4684,9.0000);
    SetPlayerInterior(playerid,17);
    }
    }
    return 1;
    }

    stock LoadAccount(playerid)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));
    GivePlayerMoney(playerid,dini_Int(Spielerdatei,"Geld"));
    SetPVarInt(playerid,"Adminlevel",dini_Int(Spielerdatei,"Adminlevel"));
    SetPVarInt(playerid,"Baned",dini_Int(Spielerdatei,"Baned"));
    SetPVarInt(playerid,"Kills",dini_Int(Spielerdatei,"Kills"));
    SetPVarInt(playerid,"Tode",dini_Int(Spielerdatei,"Tode"));
    SetPVarInt(playerid,"Haus_Besitzer",dini_Int(Spielerdatei,"Haus_Besitzer"));
    SetPVarInt(playerid,"Fraktion",dini_Int(Spielerdatei,"Fraktion"));
    SetPVarInt(playerid,"VIPSatus",dini_Int(Spielerdatei,"VIPStatus"));

    if(GetPVarInt(playerid,"Baned")==1)
    {
    SendClientMessage(playerid,ROT,"Du wurdest vom Server gebannt.");
    Kick(playerid);
    }
    SetPVarInt(playerid,"loggedin",1);
    return 1;
    }

    Habe es jetzt so


    ocmd:vc(playerid,params[])
    {
    if(GetPVarInt(playerid,"VIPStatus") != 1) return SendClientMessage(playerid,-1,"Du bist kein VIP");
    new string[100];
    if(IsPlayerAnVIP(playerid))
    if(sscanf(params,"s",string)) return SendClientMessage(playerid,LIGHTLIME,"Benutze: /vc [Text]");
    format(string,sizeof(string),"AdminChat: %s (%s)",string,SpielerName(playerid));
    for(new ii=0; ii<MAX_PLAYERS; ii++)
    {
    if(IsPlayerAnVIP(ii))
    {
    SendClientMessage(ii,LIGHTLIME,string);
    }
    }
    return 1;
    }


    und
    stock IsPlayerAnVIP(playerid)
    {
    if(GetPVarInt(playerid,"VIPStatus") ==1 )
    {
    return 1;
    }
    return 0;
    }


    Es geht leider immer noch nicht