Hilfe beim Spawn-Sys

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
  • Huhu,


    Ich habe folgendes gescriptet:



    switch(GetPVarInt(playerid,"Fraktion"))
    {
    case 0:{SetPlayerColor(playerid,WEISS);
    case 1:{SetPlayerPos(playerid,1410.9117,-1686.7150,5.8769);SetPlayerColor(playerid,WEISS);
    case 2:{SetPlayerPos(playerid,2282.3591,2423.5342,3.4766);SetPlayerColor(playerid,WEISS);
    case 3:{SetPlayerPos(playerid,1494.4673,1308.2590,1093.2875);SetPlayerInterior(playerid,3);SetPlayerVirtualWorld(playerid,2);SetPlayerColor(playerid,WEISS);
    case 4:{SetPlayerPos(playerid,2770.6680,-1628.6028,12.1775);SetPlayerColor(playerid,WEISS);
    case 5:{SetPlayerPos(playerid,1728.9877,-1668.8741,22.6094);SetPlayerInterior(playerid,18);SetPlayerColor(playerid,WEISS);
    case 6:{SetPlayerPos(playerid,662.8915,1716.6161,7.1875);SetPlayerColor(playerid,WEISS);
    case 7:{SetPlayerPos(playerid,-2056.2644,455.1431,35.1719);SetPlayerColor(playerid,WEISS);
    case 8:{SetPlayerPos(playerid,-2523.3655,1216.2040,37.4283);SetPlayerColor(playerid,WEISS);
    case 9:{SetPlayerPos(playerid,2122.1887,-2271.2925,20.6719);SetPlayerColor(playerid,WEISS);
    case 10:{SetPlayerPos(playerid,-329.6675,1537.0415,76.6117);SetPlayerColor(playerid,WEISS);
    case 11:{SetPlayerPos(playerid,-1322.3192,2498.2083,87.0469);SetPlayerColor(playerid,WEISS);
    case 12:{SetPlayerPos(playerid,2561.4861,-1034.3064,69.6692);SetPlayerColor(playerid,WEISS);
    case 13:{SetPlayerPos(playerid,1684.9148,-2099.0713,13.8343);SetPlayerColor(playerid,WEISS);
    case 14:{SetPlayerPos(playerid,-2719.5259,-319.0955,7.8438);SetPlayerColor(playerid,WEISS);
    case 15:{SetPlayerPos(playerid,2633.7493,1824.2067,11.0234);SetPlayerColor(playerid,WEISS);
    case 16:{SetPlayerPos(playerid,2495.3035,-1690.8003,14.7656);SetPlayerColor(playerid,WEISS);
    case 17:{SetPlayerPos(playerid,2000.1272,-1114.3354,27.1250);SetPlayerColor(playerid,WEISS);
    case 18:{SetPlayerPos(playerid,1457.7407,2773.3633,10.8203);SetPlayerColor(playerid,WEISS);
    }


    Wenn ich es drinnen habe, bekomme ich diese Errors:

    Code
    Zeile (1471) : Unbekannte Variable :  "SpielerName"
    Zeile (1488) : Unbekannte Variable :  "SpielerSpeichern"
    Zeile (1498) : Unbekannte Variable :  "IstSpielerAdmin"
    Zeile (1506) : Falsch eingerückt
    Zeile (1506) : error 014: invalid statement; not in switch
    Zeile (1506) : Befehl hat keinen Sinn
    Zeile (1506) : Erwartete Zeichen ";", aber gefunden ":"
    Zeile (1506) : Ungültiger Befehl
    Zeile (1506) : Zuviele Fehler in einer Zeile


    Wenn ich es drausen habe, dann bekomme ich 0 Error und 0 Warnings ... Bitte helft mir! es ist wichtig


    MfG, iReAcTzz

  • ich habe es so gemacht, wie er sagte, aber ich bekomme diese Errors:

    Code
    Zeile (1506) : Falsch eingerückt
    Zeile (1506) : error 014: invalid statement; not in switch
    Zeile (1506) : Befehl hat keinen Sinn
    Zeile (1506) : Erwartete Zeichen ";", aber gefunden ":"
    Zeile (1506) : Ungültiger Befehl
    Zeile (1506) : Zuviele Fehler in einer Zeile

  • public OnPlayerSpawn(playerid)
    {
    SetPlayerPos(playerid,2798.6274,-1087.8002,30.7188);
    SetPlayerFacingAngle(playerid,267.1315);
    SetPlayerColor(playerid,WEISS);
    if(IstSpielerAdmin(playerid,1))
    {
    new Text3D:GSR = Create3DTextLabel("*GSR-Teammitglied*", WEISS, 30.0, 40.0, 50.0, 40.0, 0);
    Attach3DTextLabelToPlayer(GSR, playerid, 0.0,0.0,0.0);
    }
    switch(GetPVarInt(playerid,"Fraktion"))
    {
    case 0:{SetPlayerColor(playerid,WEISS);
    case 1:{SetPlayerPos(playerid,1410.9117,-1686.7150,5.8769);SetPlayerColor(playerid,WEISS);}
    case 2:{SetPlayerPos(playerid,2282.3591,2423.5342,3.4766);SetPlayerColor(playerid,WEISS);}
    case 3:{SetPlayerPos(playerid,1494.4673,1308.2590,1093.2875);SetPlayerInterior(playerid,3);SetPlayerVirtualWorld(playerid,2);SetPlayerColor(playerid,WEISS);}
    case 4:{SetPlayerPos(playerid,2770.6680,-1628.6028,12.1775);SetPlayerColor(playerid,WEISS);}
    case 5:{SetPlayerPos(playerid,1728.9877,-1668.8741,22.6094);SetPlayerInterior(playerid,18);SetPlayerColor(playerid,WEISS);}
    case 6:{SetPlayerPos(playerid,662.8915,1716.6161,7.1875);SetPlayerColor(playerid,WEISS);}
    case 7:{SetPlayerPos(playerid,-2056.2644,455.1431,35.1719);SetPlayerColor(playerid,WEISS);}
    case 8:{SetPlayerPos(playerid,-2523.3655,1216.2040,37.4283);SetPlayerColor(playerid,WEISS);}
    case 9:{SetPlayerPos(playerid,2122.1887,-2271.2925,20.6719);SetPlayerColor(playerid,WEISS);}
    case 10:{SetPlayerPos(playerid,-329.6675,1537.0415,76.6117);SetPlayerColor(playerid,WEISS);}
    case 11:{SetPlayerPos(playerid,-1322.3192,2498.2083,87.0469);SetPlayerColor(playerid,WEISS);}
    case 12:{SetPlayerPos(playerid,2561.4861,-1034.3064,69.6692);SetPlayerColor(playerid,WEISS);}
    case 13:{SetPlayerPos(playerid,1684.9148,-2099.0713,13.8343);SetPlayerColor(playerid,WEISS);}
    case 14:{SetPlayerPos(playerid,-2719.5259,-319.0955,7.8438);SetPlayerColor(playerid,WEISS);}
    case 15:{SetPlayerPos(playerid,2633.7493,1824.2067,11.0234);SetPlayerColor(playerid,WEISS);}
    case 16:{SetPlayerPos(playerid,2495.3035,-1690.8003,14.7656);SetPlayerColor(playerid,WEISS);}
    case 18:{SetPlayerPos(playerid,1457.7407,2773.3633,10.8203);SetPlayerColor(playerid,WEISS);}
    }
    return 1;
    }

  • SetPlayerPos(playerid,2798.6274,-1087.8002,30.7188);
    SetPlayerFacingAngle(playerid,267.1315);
    SetPlayerColor(playerid,WEISS);
    if(IstSpielerAdmin(playerid,1))
    {
    new Text3D:GSR = Create3DTextLabel("*GSR-Teammitglied*", WEISS, 30.0, 40.0, 50.0, 40.0, 0);
    Attach3DTextLabelToPlayer(GSR, playerid, 0.0,0.0,0.0);
    }
    switch(GetPVarInt(playerid,"Fraktion"))
    {
    case 0:{SetPlayerColor(playerid,WEISS);
    case 1:{SetPlayerPos(playerid,1410.9117,-1686.7150,5.8769);SetPlayerColor(playerid,WEISS);}
    case 2:{SetPlayerPos(playerid,2282.3591,2423.5342,3.4766);SetPlayerColor(playerid,WEISS);}
    case 3:{SetPlayerPos(playerid,1494.4673,1308.2590,1093.2875);SetPlayerInterior(playerid,3);SetPlayerVirtualWorld(playerid,2);SetPlayerColor(playerid,WEISS);}
    case 4:{SetPlayerPos(playerid,2770.6680,-1628.6028,12.1775);SetPlayerColor(playerid,WEISS);}
    case 5:{SetPlayerPos(playerid,1728.9877,-1668.8741,22.6094);SetPlayerInterior(playerid,18);SetPlayerColor(playerid,WEISS);}
    case 6:{SetPlayerPos(playerid,662.8915,1716.6161,7.1875);SetPlayerColor(playerid,WEISS);}
    case 7:{SetPlayerPos(playerid,-2056.2644,455.1431,35.1719);SetPlayerColor(playerid,WEISS);}
    case 8:{SetPlayerPos(playerid,-2523.3655,1216.2040,37.4283);SetPlayerColor(playerid,WEISS);}
    case 9:{SetPlayerPos(playerid,2122.1887,-2271.2925,20.6719);SetPlayerColor(playerid,WEISS);}
    case 10:{SetPlayerPos(playerid,-329.6675,1537.0415,76.6117);SetPlayerColor(playerid,WEISS);}
    case 11:{SetPlayerPos(playerid,-1322.3192,2498.2083,87.0469);SetPlayerColor(playerid,WEISS);}
    case 12:{SetPlayerPos(playerid,2561.4861,-1034.3064,69.6692);SetPlayerColor(playerid,WEISS);}
    case 13:{SetPlayerPos(playerid,1684.9148,-2099.0713,13.8343);SetPlayerColor(playerid,WEISS);}
    case 14:{SetPlayerPos(playerid,-2719.5259,-319.0955,7.8438);SetPlayerColor(playerid,WEISS);}
    case 15:{SetPlayerPos(playerid,2633.7493,1824.2067,11.0234);SetPlayerColor(playerid,WEISS);}
    case 16:{SetPlayerPos(playerid,2495.3035,-1690.8003,14.7656);SetPlayerColor(playerid,WEISS);}
    case 18:{SetPlayerPos(playerid,1457.7407,2773.3633,10.8203);SetPlayerColor(playerid,WEISS);}
    }
    versuch es mal ganeu so einzufügen

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Also ich habe es jetzt so gemacht:



    public OnPlayerSpawn(playerid)
    {
    if(IstSpielerAdmin(playerid,1))
    {
    new Text3D:GSR = Create3DTextLabel("*GSR-Teammitglied*", WEISS, 30.0, 40.0, 50.0, 40.0, 0);
    Attach3DTextLabelToPlayer(GSR, playerid, 0.0,0.0,0.0);
    }
    switch(GetPVarInt(playerid,"Fraktion"))
    {
    case 0:SetPlayerPos(playerid,2798.6274,-1087.8002,30.7188);SetPlayerColor(playerid,WEISS);}
    case 1:SetPlayerPos(playerid,1410.9117,-1686.7150,5.8769);SetPlayerColor(playerid,WEISS);}
    case 2:SetPlayerPos(playerid,2282.3591,2423.5342,3.4766);SetPlayerColor(playerid,WEISS);}
    case 3:SetPlayerPos(playerid,1494.4673,1308.2590,1093.2875);SetPlayerInterior(playerid,3);SetPlayerVirtualWorld(playerid,2);SetPlayerColor(playerid,WEISS);}
    case 4:SetPlayerPos(playerid,2770.6680,-1628.6028,12.1775);SetPlayerColor(playerid,WEISS);}
    case 5:SetPlayerPos(playerid,1728.9877,-1668.8741,22.6094);SetPlayerInterior(playerid,18);SetPlayerColor(playerid,WEISS);}
    case 6:SetPlayerPos(playerid,662.8915,1716.6161,7.1875);SetPlayerColor(playerid,WEISS);}
    case 7:SetPlayerPos(playerid,-2056.2644,455.1431,35.1719);SetPlayerColor(playerid,WEISS);}
    case 8:SetPlayerPos(playerid,-2523.3655,1216.2040,37.4283);SetPlayerColor(playerid,WEISS);}
    case 9:SetPlayerPos(playerid,2122.1887,-2271.2925,20.6719);SetPlayerColor(playerid,WEISS);}
    case 10:SetPlayerPos(playerid,-329.6675,1537.0415,76.6117);SetPlayerColor(playerid,WEISS);}
    case 11:SetPlayerPos(playerid,-1322.3192,2498.2083,87.0469);SetPlayerColor(playerid,WEISS);}
    case 12:SetPlayerPos(playerid,2561.4861,-1034.3064,69.6692);SetPlayerColor(playerid,WEISS);}
    case 13:SetPlayerPos(playerid,1684.9148,-2099.0713,13.8343);SetPlayerColor(playerid,WEISS);}
    case 14:SetPlayerPos(playerid,-2719.5259,-319.0955,7.8438);SetPlayerColor(playerid,WEISS);}
    case 15:SetPlayerPos(playerid,2633.7493,1824.2067,11.0234);SetPlayerColor(playerid,WEISS);}
    case 16:SetPlayerPos(playerid,2495.3035,-1690.8003,14.7656);SetPlayerColor(playerid,WEISS);}
    case 16:SetPlayerPos(playerid,2495.3035,-1690.8003,14.7656);SetPlayerColor(playerid,WEISS);}
    case 18:{SetPlayerPos(playerid,1457.7407,2773.3633,10.8203);SetPlayerColor(playerid,WEISS);}
    }
    return 1;
    }


    Und es klappt ausgezeichnet ^^