[GF] Tor Problem

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
  • Hey ehm ich wollte das auch so mit nem gate machen also mit einem command auf/zu.
    Das sieht dann so aus :




    if(strcmp(cmdtext,"/move",true) == 0)
    {
    if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4 )
    {
    if (PlayerToPoint(5, playerid, 1142.8143,-1298.1726,13.6100))
    {
    if(TorOffen == false)
    {
    MoveObject(medicgate,1162.236816, -1292.904175, 12.680368,2.5); // Medic
    TorOffen = true;
    }
    else if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4 )
    {
    if(TorOffen == true)
    {
    if (PlayerToPoint(5, playerid, 1142.8143,-1298.1726,13.6100)
    {
    MoveObject(medicgate,1150.749512, -1292.956421, 12.678317,2.5);//medic
    TorOffen = false;
    }
    }
    }
    }
    }
    return 1;
    }



    Dabei bekomme ich folgenden error : ( die warnings sind immer da )
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(463) : warning 213: tag mismatch
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(3890) : warning 217: loose indentation
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(3908) : warning 217: loose indentation
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(3928) : warning 217: loose indentation
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(3946) : warning 217: loose indentation
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(3960) : warning 217: loose indentation
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(6776) : warning 217: loose indentation
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(6780) : warning 217: loose indentation
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(8070) : warning 217: loose indentation
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(8076) : warning 213: tag mismatch
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(8079) : warning 213: tag mismatch
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(8083) : warning 213: tag mismatch
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(8086) : error 001: expected token: ")", but found "{"
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(8088) : warning 213: tag mismatch
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(8096) : warning 217: loose indentation
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(8136) : warning 217: loose indentation
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(8146) : warning 217: loose indentation
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(8160) : warning 217: loose indentation
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(8161) : warning 217: loose indentation
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(8188) : warning 217: loose indentation
    C:\Users\Tim\Desktop\server\filterscripts\gf6.pwn(26387) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.




    ALs ich es noch ohne playertopoint und pInfo ging es ?(
    Hoffe mir kann wer helfen =)

  • Eine Abfrage mit PlayerToPoint und Member/Leader reicht ;)



    if(strcmp(cmdtext,"/move",true) == 0)
    {
    if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4 )
    {
    if (PlayerToPoint(5, playerid, 1142.8143,-1298.1726,13.6100))
    {
    if(TorOffen == false)
    {
    MoveObject(medicgate,1162.236816, -1292.904175, 12.680368,2.5); // Medic
    TorOffen = true;
    }
    else if (TorOffen == true)
    {
    MoveObject(medicgate,1150.749512, -1292.956421, 12.678317,2.5);//medic
    TorOffen = false;
    }
    }
    }
    return 1;
    }

  • ach stimmt xD
    danke =)
    ehm kannst du/wer mir nochmal helfen ?
    Ich habe jezz fraktions cars gemacht (gf).
    funktioniert super für cops & news , jezz hab ich noch fbi genommen ,
    bei fbi gehts aber nicht oO
    hier die entsprechenden zeilen :
    forward IsACopCar(carid);
    forward IsANewsCar(carid);
    forward IsAFbiCar(carid);
    new copcar[16];
    new newscar[6];
    new fbicar[12];

    if(IsACopCar(newcar))
    {
    if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1) { }
    else
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_YELLOW, "Du bist kein Cop!");
    }
    }
    else if(IsANewsCar(newcar))
    {
    if(PlayerInfo[playerid][pMember] == 9||PlayerInfo[playerid][pLeader] == 9) { }
    else
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_YELLOW, "Du bist kein Newsreporter!");
    }
    }
    else if(IsAFbiCar(newcar))
    {
    if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2) { }
    else
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_YELLOW, "Du bist kein FBI!");
    }
    }
    copcar[0]=AddStaticVehicle(596,1574.1584,-1710.6509,5.6115,0.4154,0,1); // copcar1
    copcar[1]=AddStaticVehicle(596,1570.4377,-1710.6825,5.6131,0.5105,0,1); // copcar2
    copcar[2]=AddStaticVehicle(596,1559.3243,-1710.7814,5.6131,0.5105,0,1); // copcar3
    copcar[3]=AddStaticVehicle(596,1578.3827,-1710.6116,5.6131,0.5105,0,1); // copcar4
    copcar[4]=AddStaticVehicle(596,1583.2097,-1710.5687,5.6131,0.5105,0,1); // copcar5
    copcar[5]=AddStaticVehicle(596,1587.3921,-1710.5316,5.6131,0.5105,0,1); // copcar6
    copcar[6]=AddStaticVehicle(596,1591.5092,-1710.4950,5.6131,0.5105,0,1); // copcar7
    copcar[7]=AddStaticVehicle(596,1595.4041,-1710.4602,5.6131,0.5105,0,1); // copcar8
    copcar[8]=AddStaticVehicle(596,1601.3982,-1703.9902,5.6115,89.3032,0,1); // copcar9
    copcar[9]=AddStaticVehicle(596,1601.4447,-1700.1577,5.6115,89.3032,0,1); // copcar10
    copcar[10]=AddStaticVehicle(596,1601.4974,-1695.8269,5.6116,89.3032,0,1); // copcar11
    copcar[11]=AddStaticVehicle(596,1601.5394,-1692.3743,5.6116,89.3032,0,1); // copcar12
    copcar[12]=AddStaticVehicle(596,1601.5939,-1687.9065,5.6116,89.3032,0,1); // copcar13
    copcar[13]=AddStaticVehicle(596,1601.6371,-1684.3641,5.6116,89.3032,0,1); // copcar14
    newscar[0]=AddStaticVehicle(582,-2022.6145,458.6876,35.2587,0.7133,41,20); // newsreporter1
    newscar[1]=AddStaticVehicle(582,-2031.1246,458.5816,35.2587,0.7133,41,20); // newsreporter2
    newscar[2]=AddStaticVehicle(582,-2052.5415,478.5311,35.2294,269.5472,41,20); // newsreporter3
    newscar[3]=AddStaticVehicle(582,-2052.4644,488.3944,35.2295,269.5472,41,20); // newsreporter4
    newscar[4]=AddStaticVehicle(488,-2026.5736,482.5542,35.3754,181.0513,2,26); // newsheli
    fbicar[0]=AddStaticVehicle(490,1538.7588,-1645.0771,6.0190,179.6968,0,0); // FBI rancher 1
    fbicar[1]=AddStaticVehicle(490,1535.1451,-1644.9781,6.0138,180.4146,0,0); // FBI rancher 2
    fbicar[2]=AddStaticVehicle(490,1531.0613,-1645.0074,6.0140,180.4147,0,0); // FBI rancher 3
    fbicar[3]=AddStaticVehicle(490,1526.9094,-1645.0375,6.0142,180.4147,0,0); // FBI rancher 4
    fbicar[4]=AddStaticVehicle(490,1545.0463,-1650.7054,6.0198,88.8863,0,0); // FBI rancher 5
    fbicar[5]=AddStaticVehicle(490,1544.9630,-1654.9993,6.0197,88.8863,0,0); // FBI rancher 6
    fbicar[6]=AddStaticVehicle(490,1544.8903,-1658.7330,6.0196,88.8863,0,0); // FBI rancher 7
    fbicar[7]=AddStaticVehicle(490,1544.8071,-1662.9934,6.0195,88.8863,0,0); // FBI rancher 8
    fbicar[8]=AddStaticVehicle(415,1544.2552,-1667.7814,5.6614,89.0030,0,0); // fbicheeta 1
    fbicar[9]=AddStaticVehicle(415,1544.1816,-1672.0135,5.6615,89.0030,0,0); // fbicheeta 2
    fbicar[10]=AddStaticVehicle(415,1544.1147,-1675.8505,5.6616,89.0030,0,0); // fbicheeta 3
    fbicar[11]=AddStaticVehicle(415,1543.9655,-1684.4102,5.6617,89.0030,0,0); // fbicheeta 4
    Ich finds komich das es bei Cops und news geht , aber bei FBI nicht.
    Also ich kann einsteigen mit wem ich will bei FBI ,
    bei den andern net.
    Hoffe mir kann nochma wer helfen ^^


    //Edit: Paar zeilen vergessen :D
    public IsACopCar(carid)
    {
    for(new i = 0; i < sizeof(copcar); i++)
    {
    if(carid == copcar[i])
    {
    return 1;
    }
    }
    return 0;
    }


    public IsANewsCar(carid)
    {
    for(new i = 0; i < sizeof(copcar); i++)
    {
    if(carid == newscar[i])
    {
    return 1;
    }
    }
    return 1;
    }


    public IsAFbiCar(carid)
    {
    for(new i = 0; i < sizeof(copcar); i++)
    {
    if(carid == fbicar[i])
    {
    return 1;
    }
    }
    return 1;
    }

    Einmal editiert, zuletzt von timsen ()

  • Nochmal deine Version komplett:
    public IsACopCar(carid)
    {
    for(new i = 0; i < sizeof(copcar); i++)
    {
    if(carid == copcar[i])
    {
    return 1;
    }
    }
    return 0;
    }


    public IsANewsCar(carid)
    {
    for(new i = 0; i < sizeof(newscar); i++)//PROBLEMZEILE
    {
    if(carid == newscar[i])
    {
    return 1;
    }
    }
    return 1;
    }


    public IsAFbiCar(carid)
    {
    for(new i = 0; i < sizeof(fbicar); i++)//PROBLEMZEILE
    {
    if(carid == fbicar[i])
    {
    return 1;
    }
    }
    return 1;
    }

    Hab dir jeweils die falsche Zeile marrkiert, achte dadrauf beim nächsten mal ;D

    Mfg kony




  • entweder bin ich zu dumm oder das script will mich verarschen xD :cursing:
    wenn ich es so mache :
    public IsACopCar(carid)
    {
    for(new i = 0; i < sizeof(copcar); i++)
    {
    if(carid == copcar[i])
    {
    return 1;
    }
    }
    return 0;
    }


    public IsANewsCar(carid)
    {
    for(new i = 0; i < sizeof(newscar); i++)//PROBLEMZEILE
    {
    if(carid == newscar[i])
    {
    return 1;
    }
    }
    return 1;
    }


    public IsAFbiCar(carid)
    {
    for(new i = 0; i < sizeof(fbicar); i++)//PROBLEMZEILE
    {
    if(carid == fbicar[i])
    {
    return 1;
    }
    }
    return 1;
    }
    geht es mit cop und fbi
    aber wenn ich in nen news van einsteige mit news leader kommt du bist kein FBI oO
    is doch kacke xD