Hallo Community, ich habe ein Prob mit dem Trucker wenn ich in ein Truck einsteig steht da 0/0 Prods normaler weiße müsste da stehen 0/100 Prods oder so:)
hier mal alle cods
if(strcmp(cmd, "/load", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new tmpcar = GetPlayerVehicleID(playerid);
            if(!IsATruck(tmpcar))
            {
                GameTextForPlayer(playerid, "~r~Du musst in einem Lieferwagen sein", 5000, 1);
                return 1;
            }
            format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[tmpcar][pCLoad],PlayerHaul[tmpcar][pCapasity]);
            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
            format(string, sizeof(string), "TankInhalt: %d/%d.", PlayerHaul[tmpcar][pTLoad],PlayerHaul[tmpcar][pTankInhalt]);
            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
        }
        return 1;
    }
    if(strcmp(cmd, "/buyfuel", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new tmpcar = GetPlayerVehicleID(playerid);
            new compcost = 2;
            if(IsPlayerInRangeOfPoint(playerid,30, 276.3275,1465.2264,10.5859))
            {
                if(IsATruck(tmpcar))
                {
                    if(PlayerHaul[tmpcar][pTLoad] < PlayerHaul[tmpcar][pTankInhalt])
                    {
                        if(PlayerHaul[tmpcar][pCLoad] >=1 )
                        {
                            SendClientMessage(playerid, COLOR_GREY, " Du kannst nur Produkte ODER Benzin laden!");
							return 1;
						}
                        new amount;
                        tmp = strtok(cmdtext, idx);
                        if(!strlen(tmp))
                        {
                            SendClientMessage(playerid, COLOR_GRAD1, "FEHLER: /buyfuel [Menge]");
                            return 1;
                        }
                        amount = strval(tmp);
                        if(amount < 1 || amount > 10000) { SendClientMessage(playerid, COLOR_GREY, "   Die Menge muss zwischen 1 und 10000 sein !"); return 1; }
                        new check= PlayerHaul[tmpcar][pTLoad] + amount;
                        if(check > PlayerHaul[tmpcar][pTankInhalt])
                        {
                            format(string, sizeof(string), "Deine Gewählten Produkten von %d passt nicht in den Truck!, Die Maximal anzahl Beträgt: %d.",PlayerHaul[tmpcar][pTankInhalt],PlayerHaul[tmpcar][pTLoad]);
                            SendClientMessage(playerid, COLOR_GREY, string);
                            return 1;
                        }
                        new cost = amount*compcost;
                        if(PlayerMoney[playerid] >= cost)
                        {
                            PlayerHaul[tmpcar][pTLoad] += amount;
                            format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[tmpcar][pCLoad],PlayerHaul[tmpcar][pCapasity]);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            format(string, sizeof(string), "TankInhalt: %d/%d.", PlayerHaul[tmpcar][pTLoad],PlayerHaul[tmpcar][pTankInhalt]);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            format(string, sizeof(string), "Du hast %d Benzin für $%d gekauft.", amount,cost);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            PlayerMoney[playerid] = PlayerMoney[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][pTLoad],PlayerHaul[tmpcar][pTankInhalt]);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            return 1;
                    }
                }
                else
                {
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, "Dieses Fahrzeug kann kein Benzin ausliefern.");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, TEAM_GROVE_COLOR, "Du bist nicht an den Las Vegas bei der Benzin Fabrik [Roter Punkt auf Karte].");
                SetPlayerCheckpoint(playerid,276.3275,1465.2264,10.5859,30);
                return 1;
            }
        }
        return 1;
    }
    if(strcmp(cmd, "/buyprods", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new tmpcar = GetPlayerVehicleID(playerid);
            new compcost = 2;
            if(IsPlayerInRangeOfPoint(playerid,30, 2464.0186,-2546.4260,13.6534))
            {
                if(IsATruck(tmpcar))
                {
                    if(PlayerHaul[tmpcar][pCLoad] < PlayerHaul[tmpcar][pCapasity])
                    {
                        if(PlayerHaul[tmpcar][pTLoad] >=1 )
                        {
                            SendClientMessage(playerid, COLOR_GREY, " Du kannst nur Produkte ODER Benzin laden!");
							return 1;
						}
                        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[tmpcar][pCLoad] + 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][pCLoad]);
                            SendClientMessage(playerid, COLOR_GREY, string);
                            return 1;
                        }
                        new cost = amount*compcost;
                        if(PlayerMoney[playerid] >= cost)
                        {
                            PlayerHaul[tmpcar][pCLoad] += amount;
                            format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[tmpcar][pCLoad],PlayerHaul[tmpcar][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);
                            PlayerMoney[playerid] = PlayerMoney[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][pCLoad],PlayerHaul[tmpcar][pCapasity]);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            return 1;
                    }
                }
                else
                {
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, "Dieses Fahrzeug kann keine Produkte ausliefern.");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, TEAM_GROVE_COLOR, "Du bist nicht an den Los Angeles Docks [Roter Punkt auf Karte].");
                SetPlayerCheckpoint(playerid,2464.0186,-2546.4260,13.6534,30);
                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 musst in einem Lieferwagen sein", 5000, 1);
                return 1;
            }
            if(PlayerHaul[tmpcar][pCLoad] == 0)
            {
                GameTextForPlayer(playerid, "~r~Lieferwagen ist leer!", 5000, 1);
                format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[tmpcar][pCLoad],PlayerHaul[tmpcar][pCapasity]);
                SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                return 1;
            }
            for(new i = 0; i < sizeof(BizzInfo); i++)
            {
                if (IsPlayerInRangeOfPoint(playerid,10,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
                {
                    //printf("Found House :%d",i);
                    for(new l = PlayerHaul[tmpcar][pCLoad]; 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[tmpcar][pCLoad],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~Business ist Pleite", 5000, 1);
                            format(string, sizeof(string), "Einnahme: $%d.", cashmade);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[tmpcar][pCLoad],PlayerHaul[tmpcar][pCapasity]);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                            return 1;
                        }
                        PlayerHaul[tmpcar][pCLoad]--;
                        BizzInfo[i][bProducts]++;
                        cashmade = cashmade+BizzInfo[i][bPriceProd];
                        ConsumingMoney[playerid] = 1;
                        PlayerMoney[playerid] = PlayerMoney[playerid]+BizzInfo[i][bPriceProd];
                        BizzInfo[i][bTill] -= BizzInfo[i][bPriceProd];
                        if(PlayerHaul[tmpcar][pCLoad] == 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[tmpcar][pCLoad],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(IsPlayerInRangeOfPoint(playerid,10,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
            {
                if(IsAtGasStation(playerid))
                {
                    if(PlayerHaul[tmpcar][pCLoad] >= 1)
                    {
						SendClientMessage(playerid,COLOR_WHITE,"Die Tankstelle braucht Benzin keine Produkte!");
						return 1;
					}
				}
                //printf("Found House :%d",i);
                for(new l = PlayerHaul[tmpcar][pCLoad]; l > 0; l--)
                {
                    if(SBizzInfo[i][sbProducts] == SBizzInfo[i][sbMaxProducts])
                    {
                        GameTextForPlayer(playerid, "~r~Laden ist Voll", 5000, 1);
                        format(string, sizeof(string), "Verdienst $%d.", cashmade);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[tmpcar][pCLoad],PlayerHaul[tmpcar][pCapasity]);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        return 1;
                    }
                    if(SBizzInfo[i][sbPriceProd] > SBizzInfo[i][sbTill])
                    {
                        GameTextForPlayer(playerid, "~r~Business ist Pleite", 5000, 1);
                        format(string, sizeof(string), "Verdienst $%d.", cashmade);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[tmpcar][pCLoad],PlayerHaul[tmpcar][pCapasity]);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        return 1;
                    }
                    PlayerHaul[tmpcar][pCLoad]--;
                    SBizzInfo[i][sbProducts]++;
                    cashmade = cashmade+SBizzInfo[i][sbPriceProd];
                    ConsumingMoney[playerid] = 1;
                    PlayerMoney[playerid] = PlayerMoney[playerid]+SBizzInfo[i][sbPriceProd];
                    SBizzInfo[i][sbTill] -= SBizzInfo[i][sbPriceProd];
                    if(PlayerHaul[tmpcar][pCLoad] == 0)
                    {
                        GameTextForPlayer(playerid, "~r~Truck ist leer!", 5000, 1);
                        format(string, sizeof(string), "Verdienst $%d.", cashmade);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[tmpcar][pCLoad],PlayerHaul[tmpcar][pCapasity]);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        return 1;
                    }
                }
                OnPropUpdate();
                return 1;
            }
        }
        GameTextForPlayer(playerid, "~r~Kein Business in der Naehe", 5000, 1);
        return 1;
    }
    if(strcmp(cmd, "/sellfuel", true) == 0)
    {
		new cashmade;
		new tmpcar;
	    if(IsPlayerConnected(playerid))
	    {
	        tmpcar = GetPlayerVehicleID(playerid);
	        if(!IsATruck(tmpcar))
	        {
	            GameTextForPlayer(playerid, "~r~Du musst in einem Lieferwagen sein", 5000, 1);
	            return 1;
	        }
	        if(PlayerHaul[tmpcar][pTLoad] == 0)
    		{
	            GameTextForPlayer(playerid, "~r~Lieferwagen ist leer!", 5000, 1);
	            format(string, sizeof(string), "Benzin: %d/%d.", PlayerHaul[tmpcar][pTLoad],PlayerHaul[tmpcar][pTankInhalt]);
	            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
	            return 1;
	        }
		}
		for(new i = 0; i < sizeof(SBizzInfo); i++)
        {
            if(IsPlayerInRangeOfPoint(playerid,10,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
            {
                //printf("Found House :%d",i);
                for(new l = PlayerHaul[tmpcar][pTLoad]; l > 0; l--)
                {
                    if(SBizzInfo[i][sbProducts] == SBizzInfo[i][sbMaxProducts])
                    {
                        GameTextForPlayer(playerid, "~r~Laden ist Voll", 5000, 1);
                        format(string, sizeof(string), "Verdienst $%d.", cashmade);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "Benzin: %d/%d.", PlayerHaul[tmpcar][pTLoad],PlayerHaul[tmpcar][pTankInhalt]);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        return 1;
                    }
                    if(SBizzInfo[i][sbPriceProd] > SBizzInfo[i][sbTill])
                    {
                        GameTextForPlayer(playerid, "~r~Business ist Pleite", 5000, 1);
                        format(string, sizeof(string), "Verdienst $%d.", cashmade);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "Benzin: %d/%d.", PlayerHaul[tmpcar][pTLoad],PlayerHaul[tmpcar][pTankInhalt]);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        return 1;
                    }
                    PlayerHaul[tmpcar][pTLoad]--;
                    SBizzInfo[i][sbProducts]++;
                    cashmade = cashmade+SBizzInfo[i][sbPriceProd];
                    ConsumingMoney[playerid] = 1;
                    PlayerMoney[playerid] = PlayerMoney[playerid]+SBizzInfo[i][sbPriceProd];
                    SBizzInfo[i][sbTill] -= SBizzInfo[i][sbPriceProd];
                    if(PlayerHaul[tmpcar][pTLoad] == 0)
                    {
                        GameTextForPlayer(playerid, "~r~Truck ist leer!", 5000, 1);
                        format(string, sizeof(string), "Verdienst $%d.", cashmade);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[tmpcar][pTLoad],PlayerHaul[tmpcar][pTankInhalt]);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        return 1;
                    }
                }
                OnPropUpdate();
                return 1;
            }
        }
    }
if(IsATruck(vehicleid) && !ispassenger)
    {
        format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[vehicleid][pCLoad],PlayerHaul[vehicleid][pCapasity]);
        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
        format(string, sizeof(string), "TankInhalt: %d/%d.", PlayerHaul[vehicleid][pTLoad],PlayerHaul[vehicleid][pTankInhalt]);
        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
        SendClientMessage(playerid, COLOR_WHITE, "INFO: Du kannst mit diesem Fahrzeug Produkte ausliefern.");
        SendClientMessage(playerid, COLOR_WHITE, "INFO: Die Befehle lauten: /load /buyprods /buyfuel /sellprods");
    }
    new newcar = GetPlayerVehicleID(playerid);
    if(oldcar != 301)
    {
        if((housecar != oldcar && oldcar != 0) && (HireCar[playerid] != oldcar && newcar != housecar))
        {
            if(gLastDriver[oldcar] == playerid && oldcar != newcar)
            {
                gLastDriver[oldcar] = 300;
                gCarLock[oldcar] = 0;
                UnLockCar(oldcar);
            }
        }
    }
 
		 
		
		
	
