Problem mit einem FS

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
  • Habe ein Problem:
    Ich habe ein Feuerwerk FS gefunden , jedoch kan man immer nur eine Rakete einen Böller etc. machen.
    Ich habe schon versucht es zu verändern bin aber gefailt.Kann mir jmd. helfen?


    hier der befehl:
    dcmd_lightfw(playerid, params[])
    {
    new distance;
    if(AllowedFirework[DrawDistance] == 0) distance = 15;
    if(AllowedFirework[DrawDistance] == 1) distance = 22;
    if(AllowedFirework[DrawDistance] == 2) distance = 30;
    if(!strlen(params))
    {
    SendClientMessage(playerid, COLOR_TAN, "Right Usage: /lightfw [type]");
    SendClientMessage(playerid, COLOR_TAN, "Types: Firecracker, crackerroll, firerocket1, firerocket2, fountain1, fountain2, fountain3, rocketbox");
    return 1;
    }
    if(strcmp("firecracker", params, true, 8) == 0)
    {
    if(AllowedFirework[FireCracker] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[FireCracker] == 0)
    {
    if(firecrackertime[playerid] == 0)
    {
    new Float:X, Float:Y,Float:Z;
    firecrackertime[playerid] = 1;
    new string[128];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "<> %s throws away a firecracker.", sendername);
    ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
    GetPlayerPos(playerid,X,Y,Z);
    GetXYInFrontOfPlayer(playerid, X,Y, 8);
    Firecracker[playerid] = CreateObject(1672, X,Y,(Z-0.9), 0, 0, 0);
    SetTimerEx("FirecrackerTime", (2000+(random(3000))), 0, "i", playerid);
    return 1;
    }
    else return SendClientMessage(playerid, RED, "ERROR: You already threw a firecracker.");
    }
    else return SendClientMessage(playerid, RED, "ERROR: The Firecracker is enabled for rcon admins only");
    }
    if(strcmp("crackerroll", params, true, 11) == 0)
    {
    if(AllowedFirework[Crackerroll] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[Crackerroll] == 0)
    {
    if(firecrackerroll[playerid] == 0)
    {
    new Float:X, Float:Y,Float:Z;
    firecrackerroll[playerid] = 1;
    new string[128];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "<> %s Places down a firecracker roll", sendername);
    ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
    GetPlayerPos(playerid,X,Y,Z);
    GetXYInFrontOfPlayer(playerid, X,Y, 8);
    FireCrackerRoll[playerid] = CreateRoll(playerid,X,Y,(Z-1.00));
    RollStartX[playerid] = X;
    RollStartY[playerid] = Y;
    RollStartZ[playerid] = (Z-1.00);
    CrackerRollSmoke[playerid] = CreateObject(2780, X, Y, (Z-5.00), 0, 0, 0);
    SetTimerEx("CrackerRollTime", (2000+(random(3000))), 0, "i", playerid);
    return 1;
    }
    else return SendClientMessage(playerid, RED, "ERROR: You already placed a firecracker roll.");
    }
    else return SendClientMessage(playerid, RED, "ERROR: The CrackerRoll is enabled for rcon admins only");
    }
    if(strcmp("firerocket1", params, true, 11) == 0)
    {
    if(AllowedFirework[Firerocket1] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[Firerocket1] == 0)
    {
    if(firerockettime[playerid] == 0)
    {
    new Float:X, Float:Y,Float:Z;
    firerockettime[playerid] = 1;
    new string[128];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "<> %s lights up a fire rocket.", sendername);
    ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
    GetPlayerPos(playerid,X,Y,Z);
    GetXYInFrontOfPlayer(playerid, X,Y, distance);
    Firerocket[playerid] = CreateObject(354, X,Y,(Z), 0, 0, 0);
    rocketsmoke[playerid] = CreateObject(2780, X,Y,(Z), 0, 0, 0);
    MoveObject(Firerocket[playerid], X, Y, Z+30, 10);
    MoveObject(rocketsmoke[playerid], X, Y, Z+30, 10);
    SetTimerEx("FirerocketTime", 3000, 0, "i", playerid);
    return 1;
    }
    else return SendClientMessage(playerid, RED, "ERROR: You already lightd a firerocket.");
    }
    else return SendClientMessage(playerid, RED, "ERROR: The FireRocket 1 is enabled for rcon admins only");
    }
    if(strcmp("firerocket2", params, true, 11) == 0)
    {
    if(AllowedFirework[Firerocket2] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[Firerocket2] == 0)
    {
    if(firerockettime[playerid] == 0)
    {
    new Float:X, Float:Y,Float:Z;
    firerockettime[playerid] = 2;
    new string[128];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "<> %s lights up a fire rocket.", sendername);
    ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
    GetPlayerPos(playerid,X,Y,Z);
    GetXYInFrontOfPlayer(playerid, X,Y, distance);
    Firerocket[playerid] = CreateObject(354, X,Y,(Z), 0, 0, 0);
    rocketsmoke[playerid] = CreateObject(2780, X,Y,(Z), 0, 0, 0);
    MoveObject(Firerocket[playerid], X, Y, Z+50, 15);
    MoveObject(rocketsmoke[playerid], X, Y, Z+50, 15);
    SetTimerEx("FirerocketTime", 3000, 0, "i", playerid);
    return 1;
    }
    else return SendClientMessage(playerid, RED, "ERROR: You already Light a firerocket.");
    }
    else return SendClientMessage(playerid, RED, "ERROR: The FireRocket 2 is enabled for rcon admins only");
    }
    if(strcmp("fountain1", params, true, 9) == 0)
    {
    if(AllowedFirework[Fountain1] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[Fountain1] == 0)
    {
    if(Fountain1Time[playerid] == 0 && Fountain2Time[playerid] == 0 && Fountain3Time[playerid] == 0)
    {
    new Float:X, Float:Y,Float:Z;
    Fountain1Time[playerid] = 1;
    new string[128];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "<> %s places a Firework Fountain on the ground.", sendername);
    ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
    GetPlayerPos(playerid,X,Y,Z);
    GetXYInFrontOfPlayer(playerid, X,Y, 15);
    FTX[playerid] = X;
    FTY[playerid] = Y;
    FTZ[playerid] = (Z-1.0);
    Fountain[playerid] = CreateObject(354, X,Y,(Z-1.0), 0, 0, 0);
    FountainSmoke[playerid] = CreateObject(2780, X,Y,(Z-1.0), 0, 0, 0);
    SetTimerEx("FountainTimer", 3000, 0, "i", playerid);
    return 1;
    }
    else return SendClientMessage(playerid, RED, "ERROR: You already Light a Firework Fountain.");
    }
    else return SendClientMessage(playerid, RED, "ERROR: The Fountain 1 is enabled for rcon admins only");
    }
    if(strcmp("fountain2", params, true, 9) == 0)
    {
    if(AllowedFirework[Fountain2] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[Fountain2] == 0)
    {
    if(Fountain1Time[playerid] == 0 && Fountain2Time[playerid] == 0 && Fountain3Time[playerid] == 0)
    {
    new Float:X, Float:Y,Float:Z;
    Fountain2Time[playerid] = 1;
    new string[128];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "<> %s places a Firework Fountain on the ground.", sendername);
    ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
    GetPlayerPos(playerid,X,Y,Z);
    GetXYInFrontOfPlayer(playerid, X,Y, 15);
    FTX[playerid] = X;
    FTY[playerid] = Y;
    FTZ[playerid] = (Z-1.0);
    Fountain[playerid] = CreateObject(354, X,Y,(Z-1.0), 0, 0, 0);
    FountainSmoke[playerid] = CreateObject(2780, X,Y,(Z-1.0), 0, 0, 0);
    SetTimerEx("FountainTimer", 3000, 0, "i", playerid);
    return 1;
    }
    else return SendClientMessage(playerid, RED, "ERROR: You already Light a Firework Fountain.");
    }
    else return SendClientMessage(playerid, RED, "ERROR: The Fountain 2 is enabled for rcon admins only");
    }
    if(strcmp("fountain3", params, true, 9) == 0)
    {
    if(AllowedFirework[Fountain3] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[Fountain3] == 0)
    {
    if(Fountain1Time[playerid] == 0 && Fountain2Time[playerid] == 0 && Fountain3Time[playerid] == 0)
    {
    new Float:X, Float:Y,Float:Z;
    Fountain3Time[playerid] = 1;
    new string[128];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "<> %s places a Firework Fountain on the ground.", sendername);
    ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
    GetPlayerPos(playerid,X,Y,Z);
    GetXYInFrontOfPlayer(playerid, X,Y, 15);
    FTX[playerid] = X;
    FTY[playerid] = Y;
    FTZ[playerid] = (Z-1.0);
    Fountain[playerid] = CreateObject(354, X,Y,(Z-1.0), 0, 0, 0);
    FountainSmoke[playerid] = CreateObject(2780, X,Y,(Z-1.0), 0, 0, 0);
    SetTimerEx("FountainTimer", 3000, 0, "i", playerid);
    return 1;
    }
    else return SendClientMessage(playerid, RED, "ERROR: You already Light a Firework Fountain.");
    }
    else return SendClientMessage(playerid, RED, "ERROR: The Fountain 3 is enabled for rcon admins only");
    }
    if(strcmp("rocketbox", params, true, 9) == 0)
    {
    if(AllowedFirework[RocketB] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[RocketB] == 0)
    {
    if(RocketBoxTime[playerid] == 0)
    {
    new Float:X, Float:Y,Float:Z;
    RocketBoxTime[playerid] = 1;
    new string[128];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "<> %s places a Rocketbox on the ground.", sendername);
    ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
    GetPlayerPos(playerid,X,Y,Z);
    GetXYInFrontOfPlayer(playerid, X,Y, distance);
    RBX[playerid] = X;
    RBY[playerid] = Y;
    RBZ[playerid] = (Z-1.0);
    RocketBox[playerid] = CreateObject(354, X,Y,(Z-1.0), 0, 0, 0);
    RocketBoxSmoke[playerid] = CreateObject(2780, X,Y,(Z-1.0), 0, 0, 0);
    SetTimerEx("RocketBoxTimer", 3000, 0, "i", playerid);
    return 1;
    }
    else return SendClientMessage(playerid, RED, "ERROR: You already Light a Firework RocketBox.");
    }
    else return SendClientMessage(playerid, RED, "ERROR: The RocketBox is enabled for rcon admins only");
    }
    else return SendClientMessage(playerid, COLOR_TAN, "Right Usage: /lightfirework [type]");
    }


    Spoiler anzeigen
    Danke An Alle die mir Helfen :thumbup: 

    Dieser Beitrag wurde bereits 763 mal editiert, zuletzt von »Anker.« (Vor einem Moment)


    "eingetragende Stand -Ins"


  • Ja es gibt ein Publick
    hier:
    public CrackerRollTime(playerid)
    {
    if(firecrackerroll[playerid] == 1)
    {
    DestroyObject(CrackerRollSmoke[playerid]);
    }
    if(firecrackerroll[playerid] == 49)
    {
    firecrackerroll[playerid] = 0;
    DestroyRoll(playerid);
    return 1;
    }
    if(firecrackerroll[playerid] >= 1)
    {
    new Float:X, Float:Y, Float:Z;
    if(firecrackerroll[playerid] >= 1 && firecrackerroll[playerid] <= 4)
    {
    GetObjectPos(RollParts[playerid][1], X, Y, Z);
    DestroyRoll(playerid);
    CreateExplosion(X, Y, Z, 12, 0);
    CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
    firecrackerroll[playerid] = firecrackerroll[playerid]+1;
    SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
    return 1;
    }
    if(firecrackerroll[playerid] >= 5 && firecrackerroll[playerid] <= 8)
    {
    GetObjectPos(RollParts[playerid][2], X, Y, Z);
    DestroyRoll(playerid);
    CreateExplosion(X, Y, Z, 12, 0);
    CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
    firecrackerroll[playerid] = firecrackerroll[playerid]+1;
    SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
    return 1;
    }
    if(firecrackerroll[playerid] >= 9 && firecrackerroll[playerid] <= 12)
    {
    GetObjectPos(RollParts[playerid][3], X, Y, Z);
    DestroyRoll(playerid);
    CreateExplosion(X, Y, Z, 12, 0);
    CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
    firecrackerroll[playerid] = firecrackerroll[playerid]+1;
    SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
    return 1;
    }
    if(firecrackerroll[playerid] >= 13 && firecrackerroll[playerid] <= 16)
    {
    GetObjectPos(RollParts[playerid][4], X, Y, Z);
    DestroyRoll(playerid);
    CreateExplosion(X, Y, Z, 12, 0);
    CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
    firecrackerroll[playerid] = firecrackerroll[playerid]+1;
    SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
    return 1;
    }
    if(firecrackerroll[playerid] >= 17 && firecrackerroll[playerid] <= 20)
    {
    GetObjectPos(RollParts[playerid][5], X, Y, Z);
    DestroyRoll(playerid);
    CreateExplosion(X, Y, Z, 12, 0);
    CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
    firecrackerroll[playerid] = firecrackerroll[playerid]+1;
    SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
    return 1;
    }
    if(firecrackerroll[playerid] >= 21 && firecrackerroll[playerid] <= 24)
    {
    GetObjectPos(RollParts[playerid][6], X, Y, Z);
    DestroyRoll(playerid);
    CreateExplosion(X, Y, Z, 12, 0);
    CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
    firecrackerroll[playerid] = firecrackerroll[playerid]+1;
    SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
    return 1;
    }
    if(firecrackerroll[playerid] >= 25 && firecrackerroll[playerid] <= 28)
    {
    GetObjectPos(RollParts[playerid][12], X, Y, Z);
    DestroyRoll(playerid);
    CreateExplosion(X, Y, Z, 12, 0);
    CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
    firecrackerroll[playerid] = firecrackerroll[playerid]+1;
    SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
    return 1;
    }
    if(firecrackerroll[playerid] >= 29 && firecrackerroll[playerid] <= 32)
    {
    GetObjectPos(RollParts[playerid][11], X, Y, Z);
    DestroyRoll(playerid);
    CreateExplosion(X, Y, Z, 12, 0);
    CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
    firecrackerroll[playerid] = firecrackerroll[playerid]+1;
    SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
    return 1;
    }
    if(firecrackerroll[playerid] >= 33 && firecrackerroll[playerid] <= 36)
    {
    GetObjectPos(RollParts[playerid][10], X, Y, Z);
    DestroyRoll(playerid);
    CreateExplosion(X, Y, Z, 12, 0);
    CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
    firecrackerroll[playerid] = firecrackerroll[playerid]+1;
    SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
    return 1;
    }
    if(firecrackerroll[playerid] >= 37 && firecrackerroll[playerid] <= 40)
    {
    GetObjectPos(RollParts[playerid][9], X, Y, Z);
    DestroyRoll(playerid);
    CreateExplosion(X, Y, Z, 12, 0);
    CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
    firecrackerroll[playerid] = firecrackerroll[playerid]+1;
    SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
    return 1;
    }
    if(firecrackerroll[playerid] >= 41 && firecrackerroll[playerid] <= 44)
    {
    GetObjectPos(RollParts[playerid][8], X, Y, Z);
    DestroyRoll(playerid);
    CreateExplosion(X, Y, Z, 12, 0);
    CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
    firecrackerroll[playerid] = firecrackerroll[playerid]+1;
    SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
    return 1;
    }
    if(firecrackerroll[playerid] >= 45 && firecrackerroll[playerid] <= 48)
    {
    GetObjectPos(RollParts[playerid][7], X, Y, Z);
    DestroyRoll(playerid);
    CreateExplosion(X, Y, Z, 12, 0);
    CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
    firecrackerroll[playerid] = firecrackerroll[playerid]+1;
    SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
    return 1;
    }
    return 1;
    }
    return 1;
    }

    Dieser Beitrag wurde bereits 763 mal editiert, zuletzt von »Anker.« (Vor einem Moment)


    "eingetragende Stand -Ins"