Hallo.
Mein /sellprods funktionirt nicht wenn ich das eingebe kommt:
SERVER: Unknown command
if(strcmp(cmd, "/sellprods", true) == 0)
{
new cashmade;
new tmpcar;
new typ;
if(IsPlayerConnected(playerid))
{
tmpcar = GetPlayerVehicleID(playerid);
if(!IsATruck(tmpcar))
{
GameTextForPlayer(playerid, "~r~Du bist in keinem Lieferwagen", 5000, 1);
return 1;
}
typ=GetPlayerHaul(tmpcar);
if(PlayerHaul[typ][pLoad] == 0)
{
GameTextForPlayer(playerid, "~r~Der Truck ist leer, fahr wieder zum Lagerhaus", 5000, 1);
format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[typ][pLoad],PlayerHaul[typ][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[typ][pLoad]; l > 0; l--)
{
if(BizzInfo[i][bProducts] == BizzInfo[i][bMaxProducts])
{
GameTextForPlayer(playerid, "~r~Unsere Regale sind voll", 5000, 1);
format(string, sizeof(string), "Geld verdient $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[typ][pLoad],PlayerHaul[typ][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~Wir koennen uns diesen Deal nicht leisten", 5000, 1);
format(string, sizeof(string), "Geld verdient $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[typ][pLoad],PlayerHaul[typ][pCapasity]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
return 1;
}
PlayerHaul[typ][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[typ][pLoad] == 0)
{
GameTextForPlayer(playerid, "~r~Der Truck ist leer, fahr wieder zum Lagerhaus", 5000, 1);
format(string, sizeof(string), "Geld verdient $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[typ][pLoad],PlayerHaul[typ][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~Unsere Läden sind voll", 5000, 1);
format(string, sizeof(string), "Du hast %d$ verdient.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Produkte: %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~Wir können uns den Deal nicht leisten", 5000, 1);
format(string, sizeof(string), "Du hast %d$ verdient.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Produkte: %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~Der Truck ist leer. Fülle ihn wieder auf.", 5000, 1);
format(string, sizeof(string), "Du hast %d$ verdient.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
}
OnPropUpdate();
return 1;
}
}
GameTextForPlayer(playerid, "~r~Du bist zu weit von einem Geschäft entfernt.", 5000, 1);
return 1;
}
Ich weiß nicht warum das nicht geht?