Beiträge von Joga

    Hmm, da mir niemand mehr helfen will/kann gehe ich davon aus, dass sich das niemand mehr nschauen wird. Wenn doch bitte Posten !!!


    MfG Joga

    Habs geändert, jedoch steht da bei jeweils /sellprods und /load Unknow Command und bei /buyprods passiert einfach gar nichts.
    Hoffe ihr wisst was Falsch ist.


    Weiß niemand den Fehler ? ;(


    MfG Joga

    Dan
    Jetzt geht das die Person nem anderen den Perso zeigt, jedoch sind die Daten nicht zu sehen, da Steht dann nut oben Personalausweis mehr nicht.
    Was ist noch falsch ?


    MfG Joga

    Hallo Leute,
    wollte mal meinen Befehl /showperso in ein Dialog umändern, jodoch funzt es nicht ganz. Wenn man /showperso ID macht, zeigt man sich selbst den perso -.- und es sind keine Daten vorhanden.


    if(strcmp(cmd,"/showperso",true)==0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "FEHLER: /showperso [playerid]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    if(PlayerInfo[playerid][pOwnPerso] == 0)
    {
    SendClientMessage(playerid, COLOR_GREY, "**Du besitzt keinen PersonalAusweis**");
    return 1;
    }
    if (ProxDetectorS(8.0, playerid, giveplayerid))
    {
    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Um deine Stats zu betrachten Tipp /stats!"); return 1; }
    new jtext[20];
    if(PlayerInfo[giveplayerid][pJob] == 1) { jtext = "Dedektiv"; }
    else if(PlayerInfo[giveplayerid][pJob] == 2) { jtext = "Anwalt"; }
    else if(PlayerInfo[giveplayerid][pJob] == 3) { jtext = "Hure"; }
    else if(PlayerInfo[giveplayerid][pJob] == 4) { jtext = "Drogen Dealer"; }
    else if(PlayerInfo[giveplayerid][pJob] == 5) { jtext = "Autodieb"; }
    else if(PlayerInfo[giveplayerid][pJob] == 6) { jtext = "News Reporter"; }
    else if(PlayerInfo[giveplayerid][pJob] == 7) { jtext = "KFZ Mechaniker"; }
    else if(PlayerInfo[giveplayerid][pJob] == 8) { jtext = "Bodyguard"; }
    else if(PlayerInfo[giveplayerid][pJob] == 9) { jtext = "Waffendealer"; }
    else if(PlayerInfo[giveplayerid][pJob] == 10) { jtext = "Autodealer"; }
    else if(PlayerInfo[giveplayerid][pJob] == 12) { jtext = "Boxer"; }
    else if(PlayerInfo[giveplayerid][pJob] == 14) { jtext = "Busfahrer"; }
    else if(PlayerInfo[giveplayerid][pJob] == 15) { jtext = "Zeitungs Junge"; }
    else if(PlayerInfo[giveplayerid][pJob] == 16) { jtext = "ZugFahrer"; }
    else { jtext = "None"; }
    new drank[20];
    if(PlayerInfo[giveplayerid][pDonateRank] == 1) { drank = "Bürger von SA"; }
    else if(PlayerInfo[giveplayerid][pDonateRank] >= 2) { drank = "Ehrenbürger"; }
    else if(PlayerInfo[giveplayerid][pDonateRank] >= 2) { drank = "Special User"; }
    else { drank = "Einwanderer"; }
    new name[MAX_PLAYER_NAME];
    new age = PlayerInfo[playerid][pAge];
    new crimes = PlayerInfo[playerid][pCrimes];
    new level = PlayerInfo[playerid][pLevel];
    GetPlayerName(playerid, name, sizeof(name));

    new string1[128],string2[128],string3[128],string4[128],string5[128],string6[128],mstring[1280];

    format(string, sizeof(string1),"Name: %s",name);

    format(string, sizeof(string2),"Alter: %d",age);

    format(string, sizeof(string3),"Level: %d",level);

    format(string, sizeof(string4),"Beruf: %s",jtext);

    format(string, sizeof(string5),"Status: %s",drank);

    format(string, sizeof(string6),"Verbrechen: %d",crimes);

    format(mstring, sizeof (mstring), "%s\n\n%s\n\n%s\n\n%s\n\n%s\n\n%s", string1,string2,string3,string4,string5,string6);
    ShowPlayerDialog(playerid,Perso,DIALOG_STYLE_MSGBOX,"Personalausweis",mstring,"Ok","Cancel");
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Spieler ist nicht in deiner Nähe !");
    return 1;
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist Offline !");
    return 1;
    }
    }
    return 1;
    }


    Wo ist der Fehler ?


    MfG Joga

    Kann mir da einer helfen ?


    //EDIT:Habs bisschen verändert geht trotzdem noch nicht -.-
    if(strcmp(cmd, "/load", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    if(!IsATruck(tmpcar))
    {
    GameTextForPlayer(playerid, "~r~Du bist nicht im Truck", 5000, 1);
    return 1;
    }
    format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    }
    return 1;
    }
    if(strcmp(cmd, "/buyprods", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    new compcost = 50;
    if(PlayerToPoint(60.0, playerid, 1760.8212,-2057.1130,13.5870))
    {
    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 [Summe]");
    return 1;
    }
    amount = strval(tmp);
    if(amount < 1 || amount > 500) { SendClientMessage(playerid, COLOR_GREY, " Produktvergabe 1 - 500"); return 1; }
    new check= PlayerHaul[tmpcar][pLoad] + amount;
    if(check > PlayerHaul[tmpcar][pCapasity])
    {
    format(string, sizeof(string), " Du brichst das Limit %d, Momentane Produkte: %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), "Produkte: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    format(string, sizeof(string), "Du kaufst %d Produkte Kosten: $%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), "Produkte: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, TEAM_GROVE_COLOR, " Dies ist kein Lieferwagen.");
    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~Du bist nicht im Lieferwagen", 5000, 1);
    return 1;
    }
    if(PlayerHaul[tmpcar][pLoad] == 0)
    {
    GameTextForPlayer(playerid, "~r~Fahrzeug ist Leer", 5000, 1);
    // format(string, sizeof(string), "Produkte: %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]))
    {
    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;
    }
    }
    }
    blablabla



    MfG Joga

    Also ich hab jetzt alles geändern. Es ist wieder ein Job nur jetzt hab ich das Problem das wenn ich /load oder /sellprods mache der Text kommt: Du musst in einem Lieferwagen sein. Bei /buyprods kommt immer Unknow Command.
    Hier die Befehle:
    if(strcmp(cmd, "/load", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new carid = GetPlayerVehicleID(playerid);
    if(IsATruck(carid))
    {
    GameTextForPlayer(playerid, "~r~Du musst in einem Lieferwagen sein", 5000, 1);
    return 1;
    }
    format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[carid][pLoad],PlayerHaul[carid][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    }
    return 1;
    }
    if(strcmp(cmd, "/buyprods", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new carid = GetPlayerVehicleID(playerid);
    new compcost = 50;
    if(PlayerToPoint(60.0, playerid, 1760.8212,-2057.1130,13.5870))
    {
    if(IsATruck(carid))
    {
    if(PlayerHaul[carid][pLoad] < PlayerHaul[carid][pCapasity])
    {
    new amount;
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "FEHLER: /buyprods [Menge]");
    return 1;
    }
    amount = strval(tmp);
    if(amount < 1 || amount > 100) { SendClientMessage(playerid, COLOR_GREY, " Die Menge muss zwischen 1 und 100 sein !"); return 1; }
    new check= PlayerHaul[carid][pLoad] + amount;
    if(check > PlayerHaul[carid][pCapasity])
    {
    format(string, sizeof(string), " Du hast das Limit mit %d Prods erreicht, Produkte: %d.",PlayerHaul[carid][pCapasity],PlayerHaul[carid][pLoad]);
    SendClientMessage(playerid, COLOR_GREY, string);
    return 1;
    }
    new cost = amount*compcost;
    if(GetPlayerMoney(playerid) >= cost)
    {
    PlayerHaul[carid][pLoad] += amount;
    format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[carid][pLoad],PlayerHaul[carid][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    format(string, sizeof(string), "Du hast %d Produkte für $%d gekauft.", 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), "Du kannst nicht %d Produkte für $%d anfordern!", amount,cost);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    return 1;
    }
    }
    else
    {
    format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[carid][pLoad],PlayerHaul[carid][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, TEAM_GROVE_COLOR, "Dieses Fahrzeug kann keine Produkte ausliefern.");
    return 1;
    }
    }
    }
    return 1;
    }
    if(strcmp(cmd, "/sellprods", true) == 0)
    {
    new cashmade;
    new carid;
    if(IsPlayerConnected(playerid))
    {
    carid = GetPlayerVehicleID(playerid);
    if(IsATruck(carid))
    {
    GameTextForPlayer(playerid, "~r~Du musst in einem Lieferwagen sein", 5000, 1);
    return 1;
    }
    if(PlayerHaul[carid][pLoad] == 0)
    {
    GameTextForPlayer(playerid, "~r~Lieferwagen ist leer!", 5000, 1);
    format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[carid][pLoad],PlayerHaul[carid][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[carid][pLoad]; l > 0; l--)
    {
    if(BizzInfo[i][bProducts] == BizzInfo[i][bMaxProducts])
    {
    GameTextForPlayer(playerid, "~r~Unser Geschaeft ist voll", 5000, 1);
    format(string, sizeof(string), "Einnahme: $%d.", cashmade);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[carid][pLoad],PlayerHaul[carid][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~Deal nicht möglich", 5000, 1);
    format(string, sizeof(string), "Einnahme: $%d.", cashmade);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[carid][pLoad],PlayerHaul[carid][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    return 1;
    }
    PlayerHaul[carid][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[carid][pLoad] == 0)
    {
    GameTextForPlayer(playerid, "~r~Lieferwagen ist leer!", 5000, 1);
    format(string, sizeof(string), "Einnahme: $%d.", cashmade);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[carid][pLoad],PlayerHaul[carid][pCapasity]);
    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    return 1;
    }
    }
    OnPropUpdate();
    return 1;
    }
    }
    }


    Hoffe ihr könnt mir sagen was der Fehler ist. Danke


    MfG Joga