Du hast kein Schlüssel (Gang Staat)

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
  • dcmd_efa(playerid,params[]){
    if(GetPlayerAdmin(playerid) >= NEEDED_ADMINLEVEL){
    new vehid,col1,col2,faction[5];
    if(!sscanf(params,"dddd",vehid,col1,col2,faction[0])){
    sscanf(params,"dddddddd",vehid,col1,col2,faction[0],faction[1],faction[2],faction[3],faction[4]);
    if(vehid < 400 || vehid > 611) return SendClientMessage(playerid,FACTION_COL_GREY,"Vehicle-ID nur von 400 bis 611.");
    if(col1 < 0 || col1 > 255) return SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Farbe(1)!");
    if(col2 < 0 || col2 > 255) return SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Farbe(2)!");
    if(faction[0] && faction[0] <= MAX_FACTIONS){
    for(new f;f<5;f++){
    if(faction[f] <= 0 || faction[f] > MAX_FACTIONS){
    faction[f] = -255;
    }
    }
    for(new fc;fc<sizeof(FactionCars);fc++){
    if(FactionCars[fc][fVehid] < 400 || FactionCars[fc][fVehid] > 611){
    FactionCars[fc][fVehid] = vehid;
    new Float:fX,Float:fY,Float:fZ,Float:fA;
    GetPlayerPos(playerid,fX,fY,fZ),GetPlayerFacingAngle(playerid,fA);
    FactionCars[fc][fPos][0] = fX;
    FactionCars[fc][fPos][1] = fY;
    FactionCars[fc][fPos][2] = fZ;
    FactionCars[fc][fPos][3] = fA;
    FactionCars[fc][fCol][0] = col1;
    FactionCars[fc][fCol][1] = col2;
    for(new f;f<5;f++){
    FactionCars[fc][fFaction][f] = faction[f];
    }
    FactionCars[fc][fPrice] = 0;
    for(new mod;mod<14;mod++)
    FactionCars[fc][fTuning][mod] = 0;
    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);
    #if defined FACTION_CARS_LOCKABLE
    FactionCars[fc][fLock] = true;
    #endif
    SendClientMessage(playerid,FACTION_COL_YELLOW,"Du hast das Fraktionsfahrzeug erfolgreich erstellt.");
    SendClientMessage(playerid,FACTION_COL_YELLOW,"Vergesse es nicht mit '/fpark' umzuparken.");
    PutPlayerInVehicle(playerid,FactionCars[fc][fCarid],0);
    return true;
    }
    }SendClientMessage(playerid,FACTION_COL_GREY,"Die Maximale Anzahl von Fraktionsfahrzeugen wurde bereits erreicht.");
    }else SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Fraktion!");
    }else SendClientMessage(playerid,FACTION_COL_GREY,"Benutze: '/efa [Model] [Farbe(1)] [Farbe(2)] [Hauptfraktion]'.");
    }else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist nicht berechtigt diesen Befehl anzuwenden.");
    return true;
    }


    if(!IsPlayerInFrac(playerid,13))
    {
    for(new pv = 0; pv < sizeof(GroveVehs); pv++)
    {
    if(newcar == GroveVehs[pv])
    {
    SendClientMessage(playerid,COLOR_RED,"Du bist kein Mitglied der Groove Street!");
    RemovePlayerFromVehicle(playerid);
    TogglePlayerControllable(playerid,false);
    TogglePlayerControllable(playerid,true);
    }
    }
    }


    Aloha!


    Ich habe eine Frage ich tüftel schon seit gestern wie ich das hin bekomme! GroveVehs ist wen ich es in Script drinnen habe aber ich erstelle die Fraktions Autos ingame mit /efa!


    Hätte zufällig jemand eine Idee?

  • new bool:allowed;
    for(new fc;fc<sizeof(FactionCars);fc++)
    {
    if(newcar == FactionCars[fc][fCarid])
    {
    for(new f;f<5;f++)
    {
    if(IsPlayerInFrac(playerid,FactionCars[fc][fFaction][f]))
    {
    allowed = true;
    break;
    }
    }
    if(!allowed)
    {
    SendClientMessage(playerid,COLOR_RED,"Du bist kein Mitglied!");
    RemovePlayerFromVehicle(playerid);
    TogglePlayerControllable(playerid,false);
    TogglePlayerControllable(playerid,true);
    }
    break;
    }
    }

  • C:\Windows\Vss\First Person\Samp Server\gamemodes\German-Elite-Reallife.pwn(22661) : error 010: invalid function or declaration
    C:\Windows\Vss\First Person\Samp Server\gamemodesGerman-Reallife.pwn(22663) : error 010: invalid function or declaration
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-Reallife.pwn(22665) : error 010: invalid function or declaration
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-Reallife.pwn(22667) : error 010: invalid function or declaration
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-Reallife.pwn(22670) : error 010: invalid function or declaration
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-Reallife.pwn(22673) : error 010: invalid function or declaration
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-Reallife.pwn(22680) : error 010: invalid function or declaration
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-Reallife.pwn(66974) : warning 203: symbol is never used: "allowed"



    Function OnVehicleDeath(vehicleid)
    {
    for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
    {
    for(new x = 0; x < MaxVeh; x++)
    {
    if(IsPlayerConnected(playerid) && Dtc_PlayerHaveCar[playerid][x])
    {
    if (vehicleid == PlayerCar[playerid][x][CarId])
    {
    DestroyVehicle(PlayerCar[playerid][x][CarId]);
    PlayerCarSpawn(playerid,x);
    }
    }
    }
    }
    for(new fc;fc<sizeof(FactionCars);fc++)
    {
    if(vehicleid == FactionCars[fc][fCarid])
    {
    DestroyAndCreateFactionCar(fc);
    break;
    }
    }
    return 1;
    }


    new bool:allowed;
    for(new fc;fc<sizeof(FactionCars);fc++)
    {
    if(newcar == FactionCars[fc][fCarid])
    {
    for(new f;f<5;f++)
    {
    if(IsPlayerInFrac(playerid,FactionCars[fc][fFaction][f]))
    {
    allowed = true;
    break;
    }
    }
    if(!allowed)
    {
    SendClientMessage(playerid,COLOR_RED,"Du bist kein Mitglied!");
    RemovePlayerFromVehicle(playerid);
    TogglePlayerControllable(playerid,false);
    TogglePlayerControllable(playerid,true);
    }
    break;
    }
    }

  • C:\Windows\Vss\First Person\Samp Server\gamemodes\German-Elite-Reallife.pwn(22638) : error 017: undefined symbol "newcar"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-Elite-Reallife.pwn(22642) : error 017: undefined symbol "playerid"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-Elite-Reallife.pwn(22650) : error 017: undefined symbol "playerid"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-Elite-Reallife.pwn(22651) : error 017: undefined symbol "playerid"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-Elite-Reallife.pwn(22652) : error 017: undefined symbol "playerid"
    C:\Windows\Vss\First Person\Samp Server\gamemodes\German-Elite-Reallife.pwn(22653) : error 017: undefined symbol "playerid"


    Function OnVehicleDeath(vehicleid)
    {
    new bool:allowed;
    for(new fc;fc<sizeof(FactionCars);fc++)
    {
    if(newcar == FactionCars[fc][fCarid])
    {
    for(new f;f<5;f++)
    {
    if(IsPlayerInFrac(playerid,FactionCars[fc][fFaction][f]))
    {
    allowed = true;
    break;
    }
    }
    if(!allowed)
    {
    SendClientMessage(playerid,COLOR_RED,"Du bist kein Mitglied!");
    RemovePlayerFromVehicle(playerid);
    TogglePlayerControllable(playerid,false);
    TogglePlayerControllable(playerid,true);
    }
    break;
    }
    }
    for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
    {
    for(new x = 0; x < MaxVeh; x++)
    {
    if(IsPlayerConnected(playerid) && Dtc_PlayerHaveCar[playerid][x])
    {
    if (vehicleid == PlayerCar[playerid][x][CarId])
    {
    DestroyVehicle(PlayerCar[playerid][x][CarId]);
    PlayerCarSpawn(playerid,x);
    }
    }
    }
    }
    for(new fc;fc<sizeof(FactionCars);fc++)
    {
    if(vehicleid == FactionCars[fc][fCarid])
    {
    DestroyAndCreateFactionCar(fc);
    break;
    }
    }
    return 1;
    }

  • Nein, nicht dort.
    Hier danach:
    if(!IsPlayerInFrac(playerid,13))
    {
    for(new pv = 0; pv < sizeof(GroveVehs); pv++)
    {
    if(newcar == GroveVehs[pv])
    {
    SendClientMessage(playerid,COLOR_RED,"Du bist kein Mitglied der Groove Street!");
    RemovePlayerFromVehicle(playerid);
    TogglePlayerControllable(playerid,false);
    TogglePlayerControllable(playerid,true);
    }
    }
    }
    //Hier...