Skripta : CL edit
Problem : e vako imam ovaj posao i sada pogledajte problem
Kada kucam bilo gdje /kupiprodukte pise da nisam na mjestu
A kada odem na to mjesto pise Server Unknow Command
Mozete pomoc?
if(strcmp(cmd, "/kupiprodukte", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmpcar = GetPlayerVehicleID(playerid);
new compcost = 20;
if(PlayerToPoint(5.0, playerid, 959.3959,-1273.8577,14.9065))
{
if(IsATruck(tmpcar))
{
if(PlayerHaul[tmpcar][pLoad] < PlayerHaul[tmpcar][pCapasity])
{
new amount;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Koriscenje: /buyprods [amount]");
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[tmpcar][pLoad] + amount;
if(check > PlayerHaul[tmpcar][pCapasity])
{
format(string, sizeof(string), " Presli ste preko limita za kamion od %d, sada vozite %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), "Produkti: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
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[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
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;
}
Slika :
(http://www.zaslike.com/files/ihggkw56x6sbe7ybbx4d.png)
Evo poslje kada odem na mjesto
(http://www.zaslike.com/files/uzhx4mstklpccvr53lvi.png)
Daj komandu /kupiprodukte
Ne radi ti to uopce, ne znam zasto.. Ja sam pokusao popraviti na bezbroj nacina.. Preveo na ZCMD, uzeo kod iz ravensa koji valja al opet se nista ne dogaÄ'a... Jednostavno obrisi taj posao
eto komanda gore...
Pa de kako cu onda imati u firmama produkte :S
Hah, pa lijepo.. Napravis da drugacije kupuju produkte ;)
Kako cu :S ? Zelim nesto u obliku posla ... ili moze organizacija..