Beiträge von AhaEinHunter

    Also ich glaub da kann ich helfen...


    und zwar musste unter public OnPlayerConnect(playerid)


    PlayAudioStreamForPlayer(playerid, "http://website.de/music.mp3");


    Eintragen und unter


    public OnPlayerSpawn(playerid)


    musste dann das hier ein tragen


    StopAudioStreamForPlayer(playerid);



    mfg

    hmm der Fehler kommt immer noch ich weis einfach net mehr weiter kann mir villeicht noch jemand helfen bzw mir versuchen zu helfen



    und bei den /sellprods kommt auch dieser fehler ich poste mal den ganzen PWn code


    if(strcmp(cmdtext, "/buyprods", true) == 0) //Eingabe ist immer cmdtext
    {
    if(IsPlayerConnected(playerid))
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    new compcost = 1;
    if(PlayerToPoint(60.0, playerid, -1003.5001,-628.2230,31.5784))
    {
    if(IsATruck(tmpcar))
    {
    if(PlayerHaul[tmpcar][pLoad] < PlayerHaul[tmpcar][pCapasity])
    {
    new amount;
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Benutze: /buyprods [amount]");
    return 1;
    }
    amount = strval(tmp);
    if(amount < 1 || amount > 1500) { SendClientMessage(playerid, COLOR_GREY, " Can't buy less then 1 Product or more then 1500 !"); return 1; }
    new check= PlayerHaul[tmpcar][pLoad] + amount;
    if(check > PlayerHaul[tmpcar][pCapasity])
    {
    format(string, sizeof(string), " You went over the Truck Products Carry Limit of %d, you currently carry %d.",PlayerHaul[tmpcar][pCapasity],PlayerHaul[tmpcar][pLoad]);
    SendClientMessage(playerid, COLOR_GREY, string);
    return 1;
    }
    new cost = amount*compcost;
    if(GetPlayerMoney(playerid) >= cost)
    {
    PlayerHaul[tmpcar][pLoad] += amount;
    format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    format(string, sizeof(string), "You bought %d Products for $%d.", amount,cost);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    GivePlayerMoney(playerid,-cost);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    return 1;
    }
    else
    {
    format(string, sizeof(string), "You cant afford %d Products at $%d !", amount,cost);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    return 1;
    }
    }
    else
    {
    format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, TEAM_GROVE_COLOR, "This Vehicle does not deliver Products.");
    return 1;
    }
    }
    }
    return 1;
    }
    if(strcmp(cmd, "/sellprods", true) == 0)
    {
    new cashmade;
    new tmpcar;
    if(IsPlayerConnected(playerid))
    {
    tmpcar = GetPlayerVehicleID(playerid);
    if(!IsATruck(tmpcar))
    {
    GameTextForPlayer(playerid, "~r~You are not in a delivery truck", 5000, 1);
    return 1;
    }
    if(PlayerHaul[tmpcar][pLoad] == 0)
    {
    GameTextForPlayer(playerid, "~r~Truck is empty, return to the stock house", 5000, 1);
    format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    return 1;
    }
    for(new i = 0; i < sizeof(BizzInfo); i++)
    {
    if (PlayerToPoint(10, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
    {
    //printf("Found House :%d",i);
    for(new l = PlayerHaul[tmpcar][pLoad]; l > 0; l--)
    {
    if(BizzInfo[i][bProducts] == BizzInfo[i][bMaxProducts])
    {
    GameTextForPlayer(playerid, "~r~Our stores are full", 5000, 1);
    format(string, sizeof(string), "Cash Earned $%d.", cashmade);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    return 1;
    }
    if(BizzInfo[i][bPriceProd] > BizzInfo[i][bTill])
    {
    GameTextForPlayer(playerid, "~r~We Cant Afford The Deal", 5000, 1);
    format(string, sizeof(string), "Cash Earned $%d.", cashmade);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    return 1;
    }
    PlayerHaul[tmpcar][pLoad]--;
    BizzInfo[i][bProducts]++;
    cashmade = cashmade+BizzInfo[i][bPriceProd];
    ConsumingMoney[playerid] = 1;
    GivePlayerMoney(playerid,BizzInfo[i][bPriceProd]);
    BizzInfo[i][bTill] -= BizzInfo[i][bPriceProd];
    if(PlayerHaul[tmpcar][pLoad] == 0)
    {
    GameTextForPlayer(playerid, "~r~Truck is empty, return to the stock house", 5000, 1);
    format(string, sizeof(string), "Cash Earned $%d.", cashmade);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    return 1;
    }
    }
    OnPropUpdate();
    return 1;
    }
    }
    }
    for(new i = 0; i < sizeof(SBizzInfo); i++)
    {
    if (PlayerToPoint(10, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
    {
    //printf("Found House :%d",i);
    for(new l = PlayerHaul[tmpcar][pLoad]; l > 0; l--)
    {
    if(SBizzInfo[i][sbProducts] == SBizzInfo[i][sbMaxProducts])
    {
    GameTextForPlayer(playerid, "~r~Our stores are full", 5000, 1);
    format(string, sizeof(string), "Cash Earned $%d.", cashmade);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    return 1;
    }
    if(SBizzInfo[i][sbPriceProd] > SBizzInfo[i][sbTill])
    {
    GameTextForPlayer(playerid, "~r~We Cant Afford The Deal", 5000, 1);
    format(string, sizeof(string), "Cash Earned $%d.", cashmade);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    return 1;
    }
    PlayerHaul[tmpcar][pLoad]--;
    SBizzInfo[i][sbProducts]++;
    cashmade = cashmade+SBizzInfo[i][sbPriceProd];
    ConsumingMoney[playerid] = 1;
    GivePlayerMoney(playerid,SBizzInfo[i][sbPriceProd]);
    SBizzInfo[i][sbTill] -= SBizzInfo[i][sbPriceProd];
    if(PlayerHaul[tmpcar][pLoad] == 0)
    {
    GameTextForPlayer(playerid, "~r~Truck ist leer, hole neue Materialien", 5000, 1);
    format(string, sizeof(string), "Cash Earned $%d.", cashmade);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    return 1;
    }
    }
    OnPropUpdate();
    return 1;
    }
    }
    GameTextForPlayer(playerid, "~r~To Far From A Business", 5000, 1);
    return 1;
    }

    Hallo,



    ich hab ein commend Bug bei dem Befehl /buyprods ist ein befehl für den Job Trucker...


    Zwar wenn ich den befehl ein tippe kommt da ein fehler "SERVER: Unknow Command"


    hier der PWN CODE


    if(strcmp(cmd, "/buyprods", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    new compcost = 1;
    if(PlayerToPoint(60.0, playerid, -1003.5001,-628.2230,31.5784))
    {
    if(IsATruck(tmpcar))
    {
    if(PlayerHaul[tmpcar][pLoad] < PlayerHaul[tmpcar][pCapasity])
    {
    new amount;
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Benutze: /buyprods [amount]");
    return 1;
    }
    amount = strval(tmp);
    if(amount < 1 || amount > 1500) { SendClientMessage(playerid, COLOR_GREY, " Can't buy less then 1 Product or more then 1500 !"); return 1; }
    new check= PlayerHaul[tmpcar][pLoad] + amount;
    if(check > PlayerHaul[tmpcar][pCapasity])
    {
    format(string, sizeof(string), " You went over the Truck Products Carry Limit of %d, you currently carry %d.",PlayerHaul[tmpcar][pCapasity],PlayerHaul[tmpcar][pLoad]);
    SendClientMessage(playerid, COLOR_GREY, string);
    return 1;
    }
    new cost = amount*compcost;
    if(GetPlayerMoney(playerid) >= cost)
    {
    PlayerHaul[tmpcar][pLoad] += amount;
    format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    format(string, sizeof(string), "You bought %d Products for $%d.", amount,cost);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    GivePlayerMoney(playerid,-cost);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    return 1;
    }
    else
    {
    format(string, sizeof(string), "You cant afford %d Products at $%d !", amount,cost);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    return 1;
    }
    }
    else
    {
    format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, TEAM_GROVE_COLOR, "This Vehicle does not deliver Products.");
    return 1;
    }
    }
    }
    return 1;
    }


    MFG

    So ich hoffe ich hab das richtige gepostet


    public OnPlayerRegister(playerid, password[])
    {
    if(IsPlayerConnected(playerid))
    {
    new string3[32];
    new playername3[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername3, sizeof(playername3));
    format(string3, sizeof(string3), "Accounts/%s.ini", playername3);
    new File: hFile = fopen(string3, io_write);
    if (hFile)
    {
    strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
    new var[32];
    format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);

    Also ich habe erst mal oben



    das hier gemacht



    #define pwchange 99


    und unter public OnDialogResponse(playerid, dialogid, response, listitem,inputtext[])


    if(dialogid == pwchange)
    {
    new string[128];
    PlayerInfo[playerid][pKey] = inputtext;
    format(string, 128, "Dein Passwort wurde erfolgreich auf \"%s\" geändert.", inputtext);
    SendClientMessage(playerid, COLOR_GREEN, string);
    }
    }
    }


    hier die erros




    mfg

    Hohaa ich habe





    mfg