Hilfe

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 Habe ein frage ich will mich mit einem kumpel besaufen aber immer wenn ich /drink Bier eingebe steht Server Unknow Command und ziehe mir geld ab aber ich habe den befehl drinne hier die Zeilen:
    [if(strcmp(cmd, "/drink", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(IsPlayerInRangeOfPoint(playerid,3.0,499.4521,-20.6484,1000.6797))
    {
    new local = PlayerInfo[playerid][pLocal];
    if(PlayerDrunk[playerid] < 10)
    {
    new Float:health;
    new x_nr[256];
    x_nr = strtok(cmdtext, idx);
    if(!strlen(x_nr))
    {
    SendClientMessage(playerid, COLOR_WHITE, "|__________________ Bar __________________|");
    SendClientMessage(playerid, COLOR_WHITE, "Benutzung: /drink [Drink]");
    SendClientMessage(playerid, COLOR_GREY, "Verfügbare Drinks: Bier ($60), Vodka ($100), V+Energy ($100), Wasser ($20), Soda($10)");
    SendClientMessage(playerid, COLOR_GREY, "Verfügbare Drinks: Mixery (20$), Grapefruit (20$), Cola (10$), Fanta (10$)");
    SendClientMessage(playerid, COLOR_WHITE, "|________________________________________________|");
    return 1;
    }
    if(strcmp(x_nr,"Bier",true) == 0)
    {
    GivePlayerMoney(playerid, - 60);
    BizzInfo[local-99][bProducts] -= 1;
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
    PlayerDrunk[playerid] += 1;
    if(PlayerDrunk[playerid] >= 5)
    {
    GameTextForPlayer(playerid, "~w~Du bist~n~~p~betrunken", 3500, 1);
    BizzInfo[local-99][bTill] += 60;
    }
    SetPlayerTime(playerid,22,10);
    SetPlayerDrunkLevel(playerid,50000);
    SetPlayerWeather(playerid,-66);
    PlayerStoned[playerid] += 1;
    if(GetPlayerHealth(playerid, health) < 100)
    {
    if(PlayerInfo[playerid][pAlcoholPerk] > 0)
    {
    PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
    hp += 15; SetPlayerHealth(playerid, health + hp);
    }
    else
    {
    SetPlayerHealth(playerid, health + 15.0);
    }
    }
    }
    else if(strcmp(x_nr,"Mixery", true) == 0)
    {
    GivePlayerMoney(playerid, -10);
    BizzInfo[local-99][bProducts] -= 1;
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
    PlayerDrunk[playerid] += 2;
    if(PlayerDrunk[playerid] >= 5)
    {
    GameTextForPlayer(playerid, "~w~Du bist~n~~p~betrunken", 3500, 1);
    BizzInfo[local-99][bTill] += 10;
    }
    SetPlayerTime(playerid,22,10);
    SetPlayerDrunkLevel(playerid,50000);
    SetPlayerWeather(playerid,-66);
    PlayerStoned[playerid] += 1;
    if(GetPlayerHealth(playerid, health) < 100)
    {
    if(PlayerInfo[playerid][pAlcoholPerk] > 0)
    {
    PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 25;
    SetPlayerHealth(playerid, health + hp);
    }
    else
    {
    SetPlayerHealth(playerid, health + 25.0);
    }
    }
    }
    else if(strcmp(x_nr,"Grapefruit", true) == 0)
    {
    GivePlayerMoney(playerid, -20);
    BizzInfo[local-99][bProducts] -= 1;
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
    PlayerDrunk[playerid] += 2;
    if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~Du bist~n~~p~betrunken", 3500, 1);
    BizzInfo[local-99][bTill] += 20; }
    if(GetPlayerHealth(playerid, health) < 100)
    {
    if(PlayerInfo[playerid][pAlcoholPerk] > 0)
    {
    PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
    hp += 25; SetPlayerHealth(playerid, health + hp);
    }
    else
    {
    SetPlayerHealth(playerid, health + 25.0);
    }
    }
    }
    else if(strcmp(x_nr,"Cola", true) == 0)
    {
    GivePlayerMoney(playerid, -10);
    BizzInfo[local-99][bProducts] -= 1;
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
    PlayerDrunk[playerid] += 2;
    BizzInfo[local-99][bTill] += 10;
    if(GetPlayerHealth(playerid, health) < 100)
    {
    if(PlayerInfo[playerid][pAlcoholPerk] > 0)
    {
    PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
    hp += 25; SetPlayerHealth(playerid, health + hp);
    }
    else
    {
    SetPlayerHealth(playerid, health + 25.0);
    }
    }
    }
    else if(strcmp(x_nr,"Fanta", true) == 0)
    {
    GivePlayerMoney(playerid, -20);
    BizzInfo[local-99][bProducts] -= 1;
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
    PlayerDrunk[playerid] += 2;
    BizzInfo[local-99][bTill] += 20;
    if(GetPlayerHealth(playerid, health) < 100)
    {
    if(PlayerInfo[playerid][pAlcoholPerk] > 0)
    {
    PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
    hp += 25; SetPlayerHealth(playerid, health + hp);
    }
    else
    {
    SetPlayerHealth(playerid, health + 25.0);
    }
    }
    }
    else if(strcmp(x_nr,"Vodka",true) == 0)
    {
    GivePlayerMoney(playerid, - 10);
    BizzInfo[local-99][bProducts] -= 1;
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
    PlayerDrunk[playerid] += 2;
    if(PlayerDrunk[playerid] >= 5)
    {
    GameTextForPlayer(playerid, "~w~Du bist~n~~p~betrunken", 3500, 1);
    BizzInfo[local-99][bTill] += 100;
    }
    SetPlayerTime(playerid,22,10);
    SetPlayerDrunkLevel(playerid,50000);
    SetPlayerWeather(playerid,-66);
    PlayerStoned[playerid] += 1;
    if(GetPlayerHealth(playerid, health) < 100)
    {
    if(PlayerInfo[playerid][pAlcoholPerk] > 0)
    {
    PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
    hp += 25; SetPlayerHealth(playerid, health + hp);
    }
    else
    {
    SetPlayerHealth(playerid, health + 25.0);
    }
    }
    }
    else if(strcmp(x_nr,"V+Energy",true) == 0)
    {
    GivePlayerMoney(playerid, - 100);
    BizzInfo[local-99][bProducts] -= 1;
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
    PlayerDrunk[playerid] += 3;
    if(PlayerDrunk[playerid] >= 5)
    {
    GameTextForPlayer(playerid, "~w~Du bist~n~~p~betrunken", 3500, 1);
    BizzInfo[local-99][bTill] += 100;
    }
    SetPlayerTime(playerid,22,10);
    SetPlayerDrunkLevel(playerid,50000);
    SetPlayerWeather(playerid,-66);
    PlayerStoned[playerid] += 1;
    if(GetPlayerHealth(playerid, health) < 100)
    {
    if(PlayerInfo[playerid][pAlcoholPerk] > 0)
    {
    PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
    hp += 27; SetPlayerHealth(playerid, health + hp);
    }
    else
    {
    SetPlayerHealth(playerid, health + 27.0);
    }
    }
    }
    }
    }
    return 1;

    2 Mal editiert, zuletzt von lolska ()