script sagt was was ich nict weiß

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
  • public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext,"/mv",true) == 0)
    {
    if(PlayerToPoint(25.0, playerid,3025,-1336.8866,13.3352,235))
    {
    if(PlayerInfo PlayerInfo[playerid][pMember] == 0||PlayerInfo[playerid][pLeader] == 0))
    {
    SetTimer("GateClose",3000 , 0);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    MoveObject(LCNTor,1270.9865722656, -1337.7030029297, 5.112417221069, 2.0);
    SendClientMessage(playerid, COLOR_GRAD1,"** Du hast das Tor geöffnet, es schließt sich automatisch wieder!");
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, "** Du bist kein Beamter!");
    }
    }
    {


    if(strcmp(cmdtext, "/motor",true) == 0)
    {
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
    new engine,lights,alarm,doors,bonnet,boot,objective;
    new vid = GetPlayerVehicleID(playerid);
    GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    if(vid != INVALID_VEHICLE_ID)
    {
    if(engine == VEHICLE_PARAMS_ON)
    {
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~W~Motor ~r~aus!", 2000, 5);
    }
    else
    {
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~W~Motor ~g~an!", 2000, 5);
    }
    }
    return 1;
    }
    return 1;
    }



    egen was ist im /mv falsch



    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(316) : error 029: invalid expression, assumed zero
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(316) : warning 215: expression has no effect
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(316) : error 001: expected token: ";", but found "]"
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(316) : error 029: invalid expression, assumed zero
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(316) : fatal error 107: too many error messages on one line


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



    5 Errors.

    ↓Das ist der Youtube Channel von mir und meinen Kollegen↓



    Sa-Mp Server [Im Aufbau/Beta]
    128.65.216.200:7777

  • Versuch es so:
    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext,"/mv",true) == 0)
    {
    if(PlayerToPoint(25.0, playerid,3025,-1336.8866,13.3352,235))
    {
    if(PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 0)
    {
    SetTimer("GateClose",3000 , 0);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    MoveObject(LCNTor,1270.9865722656, -1337.7030029297, 5.112417221069, 2.0);
    SendClientMessage(playerid, COLOR_GRAD1,"** Du hast das Tor geöffnet, es schließt sich automatisch wieder!");
    }
    else SendClientMessage(playerid, COLOR_GRAD1, "** Du bist kein Beamter!");
    }
    }
    if(strcmp(cmdtext, "/motor",true) == 0)
    {
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
    new engine,lights,alarm,doors,bonnet,boot,objective;
    new vid = GetPlayerVehicleID(playerid);
    GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    if(vid != INVALID_VEHICLE_ID)
    {
    if(engine == VEHICLE_PARAMS_ON)
    {
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~W~Motor ~r~aus!", 2000, 5);
    }
    else
    {
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~W~Motor ~g~an!", 2000, 5);
    }
    }
    return 1;
    }
    return 1;
    }


    /Edit: Einrückung verbessert

  • Also paar sind raus aber Hier sind noch paar ERRORS


    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(314) : warning 206: redundant test: constant expression is non-zero
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(316) : error 029: invalid expression, assumed zero
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(316) : warning 215: expression has no effect
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(316) : error 001: expected token: ";", but found "]"
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(316) : error 029: invalid expression, assumed zero
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(316) : fatal error 107: too many error messages on one line



    314
    if(PlayerToPoint(25.0, playerid,3025,-1336.8866,13.3352,235))


    316
    if(PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 0)


    was ist da los xD

    ↓Das ist der Youtube Channel von mir und meinen Kollegen↓



    Sa-Mp Server [Im Aufbau/Beta]
    128.65.216.200:7777

  • public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext,"/mv",true) == 0)
    {
    if(PlayerToPoint(25.0, playerid,3025,-1336.8866,13.3352))
    {
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
    {
    SetTimer("GateClose", 3000, 0);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    MoveObject(LCNTor,1270.9865722656, -1337.7030029297, 5.112417221069, 2.0);
    SendClientMessage(playerid, COLOR_GRAD1,"** Du hast das Tor geöffnet, es schließt sich automatisch wieder!");
    }
    else SendClientMessage(playerid, COLOR_GRAD1, "** Du bist kein Beamter!");
    }
    }
    if(strcmp(cmdtext, "/motor",true) == 0)
    {
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
    new engine,lights,alarm,doors,bonnet,boot,objective;
    new vid = GetPlayerVehicleID(playerid);
    GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    if(vid != INVALID_VEHICLE_ID)
    {
    if(engine == VEHICLE_PARAMS_ON)
    {
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~W~Motor ~r~aus!", 2000, 5);
    }
    else
    {
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~W~Motor ~g~an!", 2000, 5);
    }
    }
    return 1;
    }
    return 1;
    }

  • Errors
     C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(74) : error 001: expected token: ";", but found "-identifier-"
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(161) : warning 217: loose indentation
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(178) : warning 202: number of arguments does not match definition
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(178) : warning 202: number of arguments does not match definition
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(181) : warning 217: loose indentation
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(260) : warning 215: expression has no effect
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(261) : warning 215: expression has no effect
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(262) : warning 215: expression has no effect
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(263) : warning 215: expression has no effect
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(285) : warning 217: loose indentation
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(314) : warning 206: redundant test: constant expression is non-zero
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(316) : error 029: invalid expression, assumed zero
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(316) : warning 215: expression has no effect
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(316) : error 001: expected token: ";", but found "]"
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(316) : error 029: invalid expression, assumed zero
    C:\Users\FloCrow\Desktop\Spiele\SCRIPT\gamemodes\GBR.pwn(316) : fatal error 107: too many error messages on one line


    main()
    {
    print("\n----------------------------------");
    print("German TEST Server");
    print("----------------------------------\n");
    }


    public OnGameModeInit()
    {


    RealClock = TextDrawCreate(547.000000,22.000000," ");
    TextDrawAlignment(RealClock,0);
    TextDrawBackgroundColor(RealClock,0x000000ff);
    TextDrawFont(RealClock,3);
    TextDrawLetterSize(RealClock,0.599999,2.299999);
    TextDrawColor(RealClock,0xffffffff);
    TextDrawSetOutline(RealClock,1);
    TextDrawSetProportional(RealClock,1);
    TextDrawSetShadow(RealClock,10);
    Timer = SetTimer("UpdateClock",300,1);



    UsePlayerPedAnims();
    DisableInteriorEnterExits();

    SetGameModeText("Selfmade Script");
    AddPlayerClass(137,1727.9397,-1634.2394,20.2160,5.4384,0,0,0,0,0,0);



    // if (PlayerInfo[playerid][pMember] == 1) //LSP SPAWN
    // {
    // SetPlayerPos(playerid, 1559.6458,-1691.7698,5.8906);
    // SetPlayerFacingAngle(playerid, 217.1027);
    // SetPlayerInterior(playerid,0);
    // PlayerInfo[playerid][pInt] = 0;
    // GivePlayerWeapon(playerid, 41, 500);
    // return 1;
    // }

    //===================CARS==================
    //Noobcars
    noobcar[0] = AddStaticVehicleEx(462,1703.4419,-1624.1383,13.1476,359.1008,15,68, 1800); // Spawncar 1
    noobcar[1] = AddStaticVehicleEx(462,1704.9547,-1624.1165,13.1464,359.0744,15,68, 1800); // Spawncar 2
    noobcar[2] = AddStaticVehicleEx(462,1706.5665,-1624.1337,13.1459,358.9807,15,68, 1800); // Spawncar 3
    noobcar[3] = AddStaticVehicleEx(462,1736.6414,-1624.1914,13.1466,359.3909,15,68, 1800); // Spawncar 4
    noobcar[4] = AddStaticVehicleEx(462,1735.0638,-1624.2140,13.1467,1.5293,15,68, 1800); // Spawncar 5
    noobcar[5] = AddStaticVehicleEx(462,1733.5803,-1624.1064,13.1461,1.0946,15,68, 1800); // Spawncar &
    SetVehicleNumberPlate(noobcar[0],"{FFBB00}NewBie");
    SetVehicleNumberPlate(noobcar[1],"{FFBB00}NewBie");
    SetVehicleNumberPlate(noobcar[2],"{FFBB00}NewBie");
    SetVehicleNumberPlate(noobcar[3],"{FFBB00}NewBie");
    SetVehicleNumberPlate(noobcar[4],"{FFBB00}NewBie");
    SetVehicleNumberPlate(noobcar[5],"{FFBB00}NewBie");


    //=======================OBJECKTE==============
    //Spawn
    CreateObject(1444, 1721.9223632813, -1624.3846435547, 20.015625, 0, 0, 0);
    CreateObject(997, 1731.7254638672, -1605.0087890625, 12.546875, 0, 0, 82);
    CreateObject(997, 1710.4188232422, -1601.7065429688, 12.546875, 0, 0, 81.996459960938);
    CreateObject(996, 1724.2227783203, -1603.3253173828, 13.295630455017, 0, 0, 347.99792480469);
    CreateObject(996, 1711.2054443359, -1601.6993408203, 13.295630455017, 0, 0, 353.99743652344);
    CreateObject(1215, 1723.3833007813, -1603.1762695313, 13.111198425293, 0, 0, 2);
    CreateObject(1215, 1718.8420410156, -1602.4912109375, 13.111198425293, 0, 0, 1.99951171875);
    CreateObject(1215, 1721.1723632813, -1602.8663330078, 13.111198425293, 0, 0, 1.99951171875);
    CreateObject(1280, 1722.0942382813, -1613.2071533203, 12.948230743408, 0, 0, 270);
    //Arbeitsamt
    CreateObject(982, 1189.9721679688, -1823.08203125, 13.288709640503, 0, 0, 0);
    CreateObject(983, 1189.9848632813, -1839.0926513672, 13.259678840637, 0, 0, 0);
    CreateObject(982, 1202.7702636719, -1842.3273925781, 13.258746147156, 0, 0, 90);
    CreateObject(982, 1228.3814697266, -1842.318359375, 13.263671875, 0, 0, 90);
    CreateObject(984, 1247.6281738281, -1842.3393554688, 13.181560516357, 0, 0, 90);
    CreateObject(983, 1257.2053222656, -1842.3411865234, 13.240014076233, 0, 0, 90);
    CreateObject(982, 1287.2647705078, -1797.5495605469, 13.251992225647, 0, 0, 0);
    CreateObject(982, 1287.2586669922, -1823.1346435547, 13.254014015198, 0, 0, 0);
    CreateObject(983, 1287.2977294922, -1839.10546875, 13.250084877014, 0, 0, 0);
    CreateObject(984, 1280.8635253906, -1784.7136230469, 13.216292381287, 0, 0, 89.75);
    CreateObject(983, 1284.0902099609, -1842.3052978516, 13.245635032654, 0, 0, 90);
    CreateObject(8041, 1270.0916748047, -1841.0024414063, 18.214727401733, 0, 0, 270);
    CreateObject(1425, 1209.9831542969, -1842.7512207031, 12.8353099823, 0, 0, 0);
    CreateObject(1425, 1213.1536865234, -1842.7661132813, 12.8353099823, 0, 0, 0);
    CreateObject(1425, 1216.396484375, -1842.7806396484, 12.8353099823, 0, 0, 0);
    CreateObject(10183, 1278.8228759766, -1813.3887939453, 12.398484230042, 0, 0, 315);
    CreateObject(10183, 1239.9049072266, -1833.5079345703, 12.404179573059, 0, 0, 225.24995422363);
    CreateObject(2946, 1167.6999511719, 1362.9899902344, 9.9200000762939, 0, 0, 270);
    //LCN
    CreateObject(987, 1294, -1291.1300048828, 12.35000038147, 0, 0, 180);
    CreateObject(987, 1282, -1291.1300048828, 12.35000038147, 0, 0, 180);
    CreateObject(987, 1270.0999755859, -1291.0999755859, 12.35000038147, 0, 0, 270);
    CreateObject(987, 1270.0999755859, -1303.0500488281, 12.35000038147, 0, 0, 270);
    CreateObject(987, 1270.099609375, -1315, 12.35000038147, 0, 0, 270);
    CreateObject(3749, 1270.8728027344, -1337.7276611328, 18.197074890137, 0, 0, 90);
    CreateObject(3499, 1270.1339111328, -1327.4772949219, 12.989999771118, 0, 0, 0);
    CreateObject(3499, 1270.1844482422, -1348.0361328125, 12.999999046326, 0, 0, 0);
    CreateObject(987, 1270.0999755859, -1348.3199462891, 12.35000038147, 0, 0, 270);
    CreateObject(987, 1270.0180664063, -1360.3100585938, 12.35000038147, 0, 0, 270);
    CreateObject(987, 1270, -1372.2099609375, 12.35000038147, 0, 0, 0);
    CreateObject(987, 1276, -1372.2099609375, 12.35000038147, 0, 0, 0);
    CreateObject(987, 1287.9376220703, -1372.2746582031, 12.35000038147, 0, 0, 90);
    CreateObject(7392, 1309.6315917969, -1358.8831787109, 41.522998809814, 0, 0, 90);
    //CreateObject(980, 1270.9865722656, -1337.7030029297, 15.112417221069, 0, 0, 90);


    //==============TORE================
    LCNTor=CreateObject(971, 1270.9865722656, -1337.7030029297, 15.112417221069,300.0);



    return 1;
    }


    public OnGameModeExit()
    {
    KillTimer(Timer);
    TextDrawHideForAll(RealClock);
    TextDrawDestroy(RealClock);
    return 1;
    }
    public IsANewbie(carid)
    {
    for(new i = 0; i < sizeof(noobcar); i++)
    {
    if(carid == noobcar[i])
    {
    return 1;
    }
    }
    return 0;
    }
    public UpdateClock()
    {
    new Hour,Minute,Sec,String[256];
    gettime(Hour,Minute,Sec);
    if(Hour<9 && Minute<9){format(String,sizeof(String),"0%d:0%d",Hour,Minute);}
    else if(Hour>9 && Minute<9){format(String,sizeof(String),"%d:0%d",Hour,Minute);}
    else if(Hour<9 && Minute>9){format(String,sizeof(String),"0%d:%d",Hour,Minute);}
    else{format(String,sizeof(String),"%d:%d",Hour,Minute);}
    TextDrawSetString(RealClock,String);
    SetWorldTime(Hour);
    return 1;
    }


    public OnPlayerRequestClass(playerid,classid)
    {
    switch(classid)
    {
    case 0: gTeam[playerid] = TEAM_Zivilisten;
    case 280,281,282,283,288,284: gTeam[playerid] = TEAM_LSPD;
    case 286,164,163: gTeam[playerid] = TEAM_FBI;
    case 287: gTeam[playerid] = TEAM_Army;
    case 274,275,276,70:gTeam[playerid] = TEAM_MEDIC;
    case 113,124,127,111:gTeam[playerid] = TEAM_LCN;
    }
    SetPlayerPos(playerid,1948,-1812.7012,4.3994);
    SetPlayerCameraPos(playerid,8556,-2050.8708,1.8312);
    SetPlayerCameraLookAt(playerid,1948,-1812.7012,4.39947);


    TextDrawHideForPlayer(playerid,RealClock);



    return 1;
    }



    public OnPlayerConnect(playerid)
    {
    new pname[MAX_PLAYERS],accFormat[128];
    GetPlayerName(playerid,pname,sizeof pname);
    format(accFormat,sizeof accFormat,"%s.datei",pname);
    if(fexist(accFormat))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Abbrechen","Weiter");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte Registriere dich","Abbrechen","Weiter");
    }
    return 1;
    }
    public OnPlayerDisconnect(playerid, reason)
    {
    new pname[MAX_PLAYERS],accFormat[128];
    GetPlayerName(playerid,pname,sizeof pname);
    format(accFormat,sizeof accFormat,"%s.datei",pname);
    if(fexist(accFormat) && Spieler[playerid][eingeloggt])
    {


    dini_IntSet(accFormat,"skin",Spieler[playerid][skin]);
    dini_FloatSet(accFormat,"lastx",Spieler[playerid][lastx]);
    dini_FloatSet(accFormat,"lasty",Spieler[playerid][lasty]);
    dini_FloatSet(accFormat,"lastz",Spieler[playerid][lastz]);
    }
    Spieler[playerid][eingeloggt] = 0;
    Spieler[playerid][wanted] = 0;
    Spieler[playerid][skin] = 0;
    Spieler[playerid][lastx] = (0.0);
    Spieler[playerid][lasty] = (0.0);
    Spieler[playerid][lastz] = (0.0);

    TextDrawHideForPlayer(playerid,RealClock);
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    new pname[MAX_PLAYERS],accFormat[128];
    GetPlayerName(playerid,pname,sizeof pname);
    format(accFormat,sizeof accFormat,"%s.datei",pname);
    if(dini_Isset(accFormat,"lastx"))
    {
    SetPlayerPos(playerid,Spieler[playerid][lastx],Spieler[playerid][lasty],Spieler[playerid][lastz]);
    }
    TextDrawShowForPlayer(playerid,RealClock);
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    TextDrawHideForPlayer(playerid,RealClock);
    return 1;
    }


    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }


    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }


    public OnPlayerText(playerid, text[])
    {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext,"/mv",true) == 0)
    {
    if(PlayerToPoint(25.0, playerid,3025,-1336.8866,13.3352))
    {
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)


    Von 74 bis 316

    ↓Das ist der Youtube Channel von mir und meinen Kollegen↓



    Sa-Mp Server [Im Aufbau/Beta]
    128.65.216.200:7777