Behoben Dank Jeffry! /Closed!

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
  • Das Nummernschild hab ich jetz reingepackt.


    public DestroyAndCreateFactionCar(fc)
    {
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611)
    {
    DestroyVehicle(FactionCars[fc][fCarid]);
    FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255);
    switch(FactionCars[fc][fFaction][0])
    {
    case 1: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "Regierung");
    case 2: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "SAPD");
    case 3: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "ARZT");
    case 4: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "FBI");
    case 5: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "SA Army");
    case 6: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "LCM");
    case 7: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "YAKUZA");
    case 8: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "XXXXXX");
    case 9: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "SA NEWS");
    case 10: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "TAXI");
    case 11: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "FAHRSCHULE");
    case 12: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "TRIADEN");
    case 13: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "RIFA");
    case 14: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "GROVE");
    case 15: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "BALLAS");
    case 16: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "VAGOS");
    case 17: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "AZTECAS");
    case 18: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "RS");
    case 19: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "XXXXXX");
    case 20: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "XXXXXX");
    case 21: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "Hells Angels");
    case 22: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "RUSSEN");
    case 23: SetVehicleNumberPlate((FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255)), "Ordnungsamt"); }
    }


    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66896) : error 017: undefined symbol "fUnlockCar"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66901) : error 017: undefined symbol "fLockCar"


    Zeile:66896


    fUnlockCar(FactionCars[fc][fCarid]);
    Zeile: 66901


    fLockCar(FactionCars[fc][fCarid]);

  • #if defined FACTION_CARS_LOCKABLE
    public LockFactionCarDoors(){
    ForAllPlayers(i){
    for(new fc;fc<sizeof(FactionCars);fc++){
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611){
    if(FactionCars[fc][fLock] == true){
    if(GetPlayerFaction(i)==FactionCars[fc][fFaction][0]||GetPlayerFaction(i)==FactionCars[fc][fFaction][1]||GetPlayerFaction(i)==FactionCars[fc][fFaction][2]||GetPlayerFaction(i)==FactionCars[fc][fFaction][3]||GetPlayerFaction(i)==FactionCars[fc][fFaction][4]||GetPlayerAdmin(i) >= NEEDED_ADMINLEVEL)
    SetVehicleParamsForPlayer(FactionCars[fc][fCarid],i,false,false);
    else
    SetVehicleParamsForPlayer(FactionCars[fc][fCarid],i,false,true);
    }
    }
    }
    }return true;
    }
    stock fLockCar(vehicleid){
    ForAllPlayers(i)
    SetVehicleParamsForPlayer(vehicleid,i,false,true);
    return true;
    }
    stock fUnlockCar(vehicleid){
    ForAllPlayers(i)
    SetVehicleParamsForPlayer(vehicleid,i,false,false);
    return true;
    }
    #endif


    //E:
    Code Geändert und den Code Darunter eingefügt


    wen ich #endif entferne 26 Errors

    2 Mal editiert, zuletzt von DerFamer ()

  • C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(354) : fatal error 100: cannot read from file: "ForAllPlayers"


    #include <a_samp>
    #include <a_npc>
    #include <core>
    #include <float>
    #include <time>
    #include <dini>
    #include <file>
    #include <utils>
    #include <morphinc>
    #include <M_Bot>
    #include <streamer>
    #include <MD5>
    #define FACTION_CARS_LOCKABLE
    #pragma dynamic 8192
    #pragma tabsize 0
    #pragma unused Money
    #pragma unused ProdsDabei


    //E:


    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66968) : error 017: undefined symbol "ForAllPlayers"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66972) : error 017: undefined symbol "i"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66973) : error 017: undefined symbol "i"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66975) : error 017: undefined symbol "i"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66982) : error 017: undefined symbol "ForAllPlayers"
    C:\Windows\Vss\First Person\Samp Server\gamemodesGerman.pwn(66983) : warning 217: loose indentation
    C:\Windows\Vss\First Person\Samp Server\gamemodesGerman.pwn(66983) : error 017: undefined symbol "i"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66984) : warning 217: loose indentation
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66987) : error 017: undefined symbol "ForAllPlayers"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66988) : warning 217: loose indentation
    C:\Windows\Vss\First Person\Samp Server\gamemodesGerman.pwn(66988) : error 017: undefined symbol "i"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66989) : warning 217: loose indentation


    Zeile 1 und bei zeile 26 das entfernt taucht das auf!

  • Wo kann ich das downloaden?


    -> Bei mir wird nur die codes angezeigt


    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66968) : error 017: undefined symbol "ConnectedPlayerList"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-.pwn(66968) : warning 215: expression has no effect
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66968) : error 001: expected token: ")", but found ";"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66968) : error 036: empty statement
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66968) : fatal error 107: too many error messages on one line



    Zeile: 66968
    ForAllPlayers(i){

    Einmal editiert, zuletzt von DerFamer ()

  • Hab die als txt jetz drinnen!


    //E:


    Jetz als .inc
    Code Geändert


    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-Elite-Reallife.pwn(66968) : error 017: undefined symbol "ForAllPlayers"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\Reallife.pwn(66972) : error 017: undefined symbol "i"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66973) : error 017: undefined symbol "i"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66975) : error 017: undefined symbol "i"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66982) : error 017: undefined symbol "ForAllPlayers"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-.pwn(66983) : warning 217: loose indentation
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-.pwn(66983) : error 017: undefined symbol "i"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-.pwn(66984) : warning 217: loose indentation
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-.pwn(66987) : error 017: undefined symbol "ForAllPlayers"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-.pwn(66988) : warning 217: loose indentation
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-.pwn(66988) : error 017: undefined symbol "i"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-.pwn(66989) : warning 217: loose indentation


    public LockFactionCarDoors(){
    ForAllPlayers(i){
    for(new fc;fc<sizeof(FactionCars);fc++){
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611){
    if(FactionCars[fc][fLock] == true){
    if(GetPlayerFaction(i)==FactionCars[fc][fFaction][0]||GetPlayerFaction(i)==FactionCars[fc][fFaction][1]||GetPlayerFaction(i)==FactionCars[fc][fFaction][2]||GetPlayerFaction(i)==FactionCars[fc][fFaction][3]||GetPlayerFaction(i)==FactionCars[fc][fFaction][4]||GetPlayerAdmin(i) >= NEEDED_ADMINLEVEL)
    SetVehicleParamsForPlayer(FactionCars[fc][fCarid],i,false,false);
    else
    SetVehicleParamsForPlayer(FactionCars[fc][fCarid],i,false,true);
    }
    }
    }
    }return true;
    }
    stock fLockCar(vehicleid){
    ForAllPlayers(i)
    SetVehicleParamsForPlayer(vehicleid,i,false,true);
    return true;
    }
    stock fUnlockCar(vehicleid){
    ForAllPlayers(i)
    SetVehicleParamsForPlayer(vehicleid,i,false,false);
    return true;
    }

    2 Mal editiert, zuletzt von DerFamer ()

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • C:\Windows\Vss\First Person\Samp Server\pawno\include\ForAllPlayers.inc(1) : error 010: invalid function or declaration
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66967) : error 017: undefined symbol "ForAllPlayers"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66971) : error 017: undefined symbol "i"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66972) : error 017: undefined symbol "i"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66974) : error 017: undefined symbol "i"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66981) : error 017: undefined symbol "ForAllPlayers"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66982) : warning 217: loose indentation
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-.pwn(66982) : error 017: undefined symbol "i"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66983) : warning 217: loose indentation
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66986) : error 017: undefined symbol "ForAllPlayers"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66987) : warning 217: loose indentation
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66987) : error 017: undefined symbol "i"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German.pwn(66988) : warning 217: loose indentation


    Bleibt gleich !


    //E:


    Das mit den Kennzeichen habe ich jetz hinbekommen!

    Einmal editiert, zuletzt von DerFamer ()

  • Also, folgendermaßen dann, wenn du es mit der Include nicht hinbekommst.
    Entferne das
    #include <ForAllPlayers>
    wieder.


    Dann schreibe unter den Includes irgendwo:
    #define ForAllPlayers(%0) for(new index_%0=0,%0=ConnectedPlayerList[0]; index_%0<ConnectedPlayers; index_%0++,%0=ConnectedPlayerList[index_%0])
    new ConnectedPlayers, ConnectedPlayerList[MAX_PLAYERS+1];


    Bei OnPlayerConnect fügst du das hinzu:
    if(!IsPlayerNPC(playerid)) AddPlayer(playerid);


    Bei OnPlayerDisconnect das:
    if(!IsPlayerNPC(playerid)) RemovePlayer(playerid);


    Und das hier fügst du ganz unten in deinen Gamemode ein:
    stock AddPlayer(playerid){
    if(ConnectedPlayers>=MAX_PLAYERS || playerid<0 || playerid>=MAX_PLAYERS) return 0;
    ConnectedPlayerList[ConnectedPlayers++]=playerid;
    return 1;
    }


    stock RemovePlayer(playerid){
    for(new i;i<ConnectedPlayers;i++){
    if(ConnectedPlayerList[i]==playerid){
    ConnectedPlayers--;
    ConnectedPlayerList[i]=ConnectedPlayerList[ConnectedPlayers];
    return 1;
    }
    }return 0;
    }

    3HZXdYd.png

    Einmal editiert, zuletzt von Jeffry ()