Detaljan opis problema: pa evo testo sam skriptu posto znam da ima mnogo bugova i sad sam testo dostavljaca,i kad kucam neke njegove komande to su:/kupiprodukte /prodajprodukte i /load izbaci mi Server:Uknown command
Dio skripte:
if(strcmp(cmd, "/load", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmpcar = GetPlayerVehicleID(playerid);
if(!IsATruck(tmpcar))
{
GameTextForPlayer(playerid, "~r~Niste u kamionu za dostavu", 5000, 1);
return 1;
}
format(string, sizeof(string), "Produkti: %d/%d.", PlayerHaul,PlayerHaul);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
}
return 1;
}
if(strcmp(cmd, "/kupiprodukte", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmpcar = GetPlayerVehicleID(playerid);
new compcost = 20;
if(PlayerToPoint(70.0, playerid, 989.2015,-1356.8121,13.3787))
{
if(IsATruck(tmpcar))
{
if(PlayerHaul < PlayerHaul)
{
new amount;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Koriscenje: /buyprods ");
return 1;
}
amount = strval(tmp);
if(amount < 1 || amount > 500) { SendClientMessage(playerid, COLOR_GREY, " Ne mozete kupiti manje od 1 ni vise od 500 produkata!"); return 1; }
new check= PlayerHaul + amount;
if(check > PlayerHaul)
{
format(string, sizeof(string), " Presli ste preko limita za kamion od %d, sada vozite %d.",PlayerHaul,PlayerHaul);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
new cost = amount*compcost;
if(GetPlayerMoney(playerid) >= cost)
{
PlayerHaul += amount;
format(string, sizeof(string), "Produkti: %d/%d.", PlayerHaul,PlayerHaul);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Kupili ste %d Produkte za $%d.", amount,cost);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
GivePlayerCash(playerid,-cost);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
return 1;
}
else
{
format(string, sizeof(string), "Ne mozete da priustite %d Produkata za $%d!", amount,cost);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
}
else
{
format(string, sizeof(string), "Produkti: %d/%d.", PlayerHaul,PlayerHaul);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
}
else
{
SendClientMessage(playerid, TEAM_GROVE_COLOR, "Ne mozete vrsiti dostavu produkata sa ovim vozilom.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not in trucker place.");
return 1;
}
}
return 1;
}
if(strcmp(cmd, "/prodajprodukte", true) == 0)
{
new cashmade;
new tmpcar;
if(IsPlayerConnected(playerid))
{
tmpcar = GetPlayerVehicleID(playerid);
if(!IsATruck(tmpcar))
{
GameTextForPlayer(playerid, "~r~Niste u kamionu za dostavu", 5000, 1);
return 1;
}
if(PlayerHaul == 0)
{
GameTextForPlayer(playerid, "~r~Kamion je prazan, kupite produkte", 5000, 1);
format(string, sizeof(string), "Produkti: %d/%d.", PlayerHaul,PlayerHaul);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(10, playerid,BizzInfo, BizzInfo, BizzInfo))
{
//printf("Found House :%d",i);
for(new l = PlayerHaul; l > 0; l--)
{
if(BizzInfo == BizzInfo)
{
GameTextForPlayer(playerid, "~r~Nas biznis je fu;", 5000, 1);
format(string, sizeof(string), "Zaradili ste $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Produkti: %d/%d.", PlayerHaul,PlayerHaul);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
return 1;
}
if(BizzInfo > BizzInfo)
{
GameTextForPlayer(playerid, "~r~Ne mozemo platiti za produkte", 5000, 1);
format(string, sizeof(string), "Zaradili ste $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Produkti: %d/%d.", PlayerHaul,PlayerHaul);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
return 1;
}
PlayerHaul--;
BizzInfo++;
cashmade = cashmade+BizzInfo;
GivePlayerCash(playerid,BizzInfo);
BizzInfo -= BizzInfo;
if(PlayerHaul == 0)
{
GameTextForPlayer(playerid, "~r~Kamion je prazan, kupite produkte", 5000, 1);
format(string, sizeof(string), "Zaradili ste $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Produkti: %d/%d.", PlayerHaul,PlayerHaul);
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, SBizzInfo, SBizzInfo))
{
//printf("Found House :%d",i);
for(new l = PlayerHaul; l > 0; l--)
{
if(SBizzInfo == SBizzInfo)
{
GameTextForPlayer(playerid, "~r~Nas biznis je ful", 5000, 1);
format(string, sizeof(string), "Zaradili ste $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Produkti: %d/%d.", PlayerHaul,PlayerHaul);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
if(SBizzInfo > SBizzInfo)
{
GameTextForPlayer(playerid, "~r~Ne mozemo platiti za produkte", 5000, 1);
format(string, sizeof(string), "Zaradili ste $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Produkti: %d/%d.", PlayerHaul,PlayerHaul);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
PlayerHaul--;
SBizzInfo++;
cashmade = cashmade+SBizzInfo;
GivePlayerCash(playerid,SBizzInfo);
SBizzInfo -= SBizzInfo;
if(PlayerHaul == 0)
{
GameTextForPlayer(playerid, "~r~Kamion je prazan, kupite produkte", 5000, 1);
format(string, sizeof(string), "Zaradili ste $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Produkti: %d/%d.", PlayerHaul,PlayerHaul);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
}
OnPropUpdate();
return 1;
}
}
GameTextForPlayer(playerid, "~r~Predaleko ste od biznisa", 5000, 1);
return 1;
}Neke slike/video za lakse dobivanje pomoci(neobavezno):
Pomozite molim vas hitno ovo trebam popraviti
