/command funktioniert nicht.

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
  • Hi Leute, ich hab ein Problem.
    Immer wenn ich den Command eingebe, funktioniert er nicht.
    Ich hab noch einen anderen Command Namens /deagle drin, wo auf einmal Sätze aus meinem anderen Command kommen.


    if(!strcmp("/warmupverlassen",cmdtext, true, 10) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid, 11.0, 2387.5325,1143.3420,34.2529))
    {
    SendClientMessage(playerid,0xFF8000FF,"Willkommen am Spawn.");
    SetPlayerPos(playerid, 1488.2256,716.4981,10.8203);
    return 1;
    }
    else
    {
    SendClientMessage(playerid,0xFF8000FF,"Du bist nicht in der Warm Up Runde.");
    }
    return 1;
    }



    Nur Warnings..


    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(73) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(74) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(75) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(76) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(77) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(78) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(79) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(80) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(174) : warning 217: loose indentation
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(189) : warning 217: loose indentation
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(231) : warning 225: unreachable code
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(231) : warning 217: loose indentation
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(236) : warning 213: tag mismatch
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(251) : warning 217: loose indentation
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(259) : warning 217: loose indentation
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(279) : warning 209: function "OnPlayerCommandText" should return a value
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(420) : warning 235: public function lacks forward declaration (symbol "UpdateTime")
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(427) : warning 235: public function lacks forward declaration (symbol "PayDay")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    18 Warnings.


    Man ist halt direkt nach dem Serverconnect in der Warmup Runde, und kann diese halt Verlassen und spawnt dann am Spawn.

  • bitte die zeilen kennzeichnen!
    //Edit:
    Die Warnings sagen auch das du irgendwas vergessen hast, unter anderem auch ein "return 0;" bevor OnPlayerCommandText geschlossen wird!


    Bei den Zeilen 73-80 fehlen parameter eines Befehls
    Zeile 231 kann eig komplett weg, da diese codestelle niemals erreicht wird
    die loose indentations sind falschgesetzte zeilen (Mit der TAB-Taste richten!)
    Zeile 420 & 427 da fehlen forwards!
    //Edit 2:


    Bei "if(!strcmp("/warmupverlassen",cmdtext, true, 10) == 0)"
    die "10" nach true wegmachen!!!


  • if(!strcmp("/warmupverlassen",cmdtext, true, 10) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid, 11.0, 2387.5325,1143.3420,34.2529))
    {
    SendClientMessage(playerid,0xFF8000FF,"Willkommen am Spawn.");
    SetPlayerPos(playerid, 1488.2256,716.4981,10.8203);
    return 1;
    }
    else
    {
    SendClientMessage(playerid,0xFF8000FF,"Du bist nicht in der Warm Up Runde.");
    }
    return 1;
    }


    Zeile 236-248 sind das..

  • siehe mein Edit 2!
    Edit:
    Die 10 bei if(!strcmp("/warmupverlassen",cmdtext, true, 10) == 0) muss weg außerdem ist das "== 0" unnötig!


    //Edit2:


    Um es klar zu zeigen:



    if(!strcmp("/warmupverlassen",cmdtext, true))
    {
    if(IsPlayerInRangeOfPoint(playerid, 11.0, 2387.5325,1143.3420,34.2529))
    {
    SendClientMessage(playerid,0xFF8000FF,"Willkommen am Spawn.");
    SetPlayerPos(playerid, 1488.2256,716.4981,10.8203);
    return 1;
    }
    else
    {
    SendClientMessage(playerid,0xFF8000FF,"Du bist nicht in der Warm Up Runde.");
    }
    return 1;
    }

  • D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(73) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(74) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(75) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(76) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(77) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(78) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(79) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(80) : warning 202: number of arguments does not match definition
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(230) : error 021: symbol already defined: "format"
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(231) : error 010: invalid function or declaration
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(232) : error 010: invalid function or declaration
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(237) : error 010: invalid function or declaration
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(239) : error 010: invalid function or declaration
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(243) : error 010: invalid function or declaration
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(245) : error 010: invalid function or declaration
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(249) : error 010: invalid function or declaration
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(252) : error 010: invalid function or declaration
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(254) : error 010: invalid function or declaration
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(266) : error 010: invalid function or declaration
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(276) : error 054: unmatched closing brace ("}")
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(277) : error 010: invalid function or declaration
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(279) : error 054: unmatched closing brace ("}")
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(420) : warning 235: public function lacks forward declaration (symbol "UpdateTime")
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(427) : warning 235: public function lacks forward declaration (symbol "PayDay")
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(576) : warning 203: symbol is never used: "stringx"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    14 Errors.

  • public OnPlayerCommandText(playerid, cmdtext[])
    {
    return 0;
    }


    new stringx[128];
    format(stringx,sizeof(stringx),"Den Command (%s) scheint es nicht zu geben.",cmdtext);
    return SendClientMessage(playerid,0xFFFFFFFF,stringx);
    if (strcmp("/deagle", cmdtext, true, 10) == 0)
    {
    SendClientMessage(playerid, 0xFF8000FF, "Hier hast du eine Deagle.");
    GivePlayerWeapon(playerid, 24, 99999);

    if(!strcmp("/warmupverlassen",cmdtext, true))
    {
    if(IsPlayerInRangeOfPoint(playerid, 11.0, 2387.5325,1143.3420,34.2529))
    {
    SendClientMessage(playerid,0xFF8000FF,"Willkommen am Spawn.");
    SetPlayerPos(playerid, 1488.2256,716.4981,10.8203);
    return 1;
    }
    else
    {
    SendClientMessage(playerid,0xFF8000FF,"Du bist nicht in der Warm Up Runde.");
    }
    return 1;
    }


    if (strcmp("/sirene", cmdtext, true, 10) == 0)
    {
    if(UCL[GetPlayerVehicleID(playerid)] == 0)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.5,0.0,0.85,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    }
    else if(UCL[GetPlayerVehicleID(playerid)] == 1)
    {
    DestroyObject(sirene[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene1[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene2[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene3[GetPlayerVehicleID(playerid)]);
    UCL[GetPlayerVehicleID(playerid)] = 0;
    }
    }


    }
    return 1;


    }


    Zeile 224-279

  • LOL HAHA :D
    Jetzt bemerk ich das erst. HäÄ?! :DD
    Moment, ich editier mal xD


    Edit : Ich hab Editiert, aber Ingame spuckt er trzd ein "Den Command (blabla) scheint es nicht zu geben" aus..


    public OnPlayerCommandText(playerid, cmdtext[])
    {


    new stringx[128];
    format(stringx,sizeof(stringx),"Den Command (%s) scheint es nicht zu geben.",cmdtext);
    return SendClientMessage(playerid,0xFFFFFFFF,stringx);
    if (strcmp("/deagle", cmdtext, true, 10) == 0)
    {
    SendClientMessage(playerid, 0xFF8000FF, "Hier hast du eine Deagle.");
    GivePlayerWeapon(playerid, 24, 99999);

    if(!strcmp("/warmupverlassen",cmdtext, true))
    {
    if(IsPlayerInRangeOfPoint(playerid, 11.0, 2387.5325,1143.3420,34.2529))
    {
    SendClientMessage(playerid,0xFF8000FF,"Willkommen am Spawn.");
    SetPlayerPos(playerid, 1488.2256,716.4981,10.8203);
    return 1;
    }
    else
    {
    SendClientMessage(playerid,0xFF8000FF,"Du bist nicht in der Warm Up Runde.");
    }
    return 1;
    }


    if (strcmp("/sirene", cmdtext, true, 10) == 0)
    {
    if(UCL[GetPlayerVehicleID(playerid)] == 0)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.5,0.0,0.85,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    }
    else if(UCL[GetPlayerVehicleID(playerid)] == 1)
    {
    DestroyObject(sirene[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene1[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene2[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene3[GetPlayerVehicleID(playerid)]);
    UCL[GetPlayerVehicleID(playerid)] = 0;
    }
    }


    }
    return 1;


    }

  • //Edit
    mach es so



    public OnPlayerCommandText(playerid, cmdtext[])
    {


    new stringx[128];
    format(stringx,sizeof(stringx),"Den Command (%s) scheint es nicht zu geben.",cmdtext);
    if (strcmp("/deagle", cmdtext, true, 10) == 0)
    {
    SendClientMessage(playerid, 0xFF8000FF, "Hier hast du eine Deagle.");
    GivePlayerWeapon(playerid, 24, 99999);
    return 1;
    }
    if(!strcmp("/warmupverlassen",cmdtext, true))
    {
    if(IsPlayerInRangeOfPoint(playerid, 11.0, 2387.5325,1143.3420,34.2529))
    {
    SendClientMessage(playerid,0xFF8000FF,"Willkommen am Spawn.");
    SetPlayerPos(playerid, 1488.2256,716.4981,10.8203);
    return 1;
    }
    else
    {
    SendClientMessage(playerid,0xFF8000FF,"Du bist nicht in der Warm Up Runde.");
    }
    return 1;
    }


    if (strcmp("/sirene", cmdtext, true, 10) == 0)
    {
    if(UCL[GetPlayerVehicleID(playerid)] == 0)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.5,0.0,0.85,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    }
    else if(UCL[GetPlayerVehicleID(playerid)] == 1)
    {
    DestroyObject(sirene[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene1[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene2[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene3[GetPlayerVehicleID(playerid)]);
    UCL[GetPlayerVehicleID(playerid)] = 0;
    }
    }
    return SendClientMessage(playerid,0xFFFFFFFF,stringx);
    }

  • Du meintest, statt dem Return 1; ^^


    Edit : ich teste. :]


    Edit2 : Ok, es funktioniert jetzt, nur der Command /sirene will noch nicht so Recht.
    u know what to do?


    Edit3 : Und nach jedem Spawn bin ich wieder in der Warmup Runde, wie kann ich das Wegmachen?


    public OnPlayerSpawn(playerid)
    {
    SendClientMessage(playerid, 0x00FF40FF,"Du bist in der Warm Up Runde. /warmupverlassen zum Verlassen.");
    PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
    GivePlayerWeapon(playerid, 24, 99999);
    return 1;
    }

  • mach mal bei /deagle und /sirene die "10" bei if(!strcmp(...)) weg und das "== 0" auch ^^


    andere fehler seh ich beim "überschlagen" nicht^^


    Edit: Fehler gefunden, die fehlen die "return 1;" nach
    UCL[GetPlayerVehicleID(playerid)] = 1;
    und
    UCL[GetPlayerVehicleID(playerid)] = 0;


    ohne das wird gleich im anschluss nämlich immer die else if schleife ausgelöst und es ist so als ob nichts passiert

  • D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(266) : error 029: invalid expression, assumed zero
    D:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Rezex.pwn(266) : error 001: expected token: ";", but found "if"


    if (strcmp("/sirene", cmdtext, true, 10) == 0)
    {
    if(UCL[GetPlayerVehicleID(playerid)] == 0)
    return 1;


    {
    sirene[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.5,0.0,0.85,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    }
    else if(UCL[GetPlayerVehicleID(playerid)] == 1) // Zeile 266
    return 1;


    {
    DestroyObject(sirene[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene1[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene2[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene3[GetPlayerVehicleID(playerid)]);
    UCL[GetPlayerVehicleID(playerid)] = 0;
    }
    }
    return SendClientMessage(playerid,0xFFFFFFFF,stringx);
    }

  • if (strcmp("/sirene", cmdtext, true, 10) == 0)
    {
    if(UCL[GetPlayerVehicleID(playerid)] == 0)
    return 1;


    {
    sirene[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.5,0.0,0.85,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    }
    if(UCL[GetPlayerVehicleID(playerid)] == 1) // Zeile 266
    return 1;


    {
    DestroyObject(sirene[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene1[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene2[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene3[GetPlayerVehicleID(playerid)]);
    UCL[GetPlayerVehicleID(playerid)] = 0;
    }
    }
    return SendClientMessage(playerid,0xFFFFFFFF,stringx);
    }


    MfG

  • soll nicht als beleidigung gelten, aber wenn ihr keine ahnung habt dann lasst es....


    ich meinte es eig so...



    if (strcmp("/sirene", cmdtext, true, 10) == 0)
    {
    if(UCL[GetPlayerVehicleID(playerid)] == 0)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.5,0.0,0.85,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(UCL[GetPlayerVehicleID(playerid)] == 1)
    {
    DestroyObject(sirene[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene1[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene2[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene3[GetPlayerVehicleID(playerid)]);
    UCL[GetPlayerVehicleID(playerid)] = 0;
    return 1;
    }
    }
    return SendClientMessage(playerid,0xFFFFFFFF,stringx);
    }


    bitte lerne die grundlagen und verstehe gleich was ich meine (außerdem hätte es keinen sinn ein return gleich nach der abfrage zumachen...
    -.-