Skripta koju koristim: nesto ja i drug poksuavamo 😄
Opis problema: e ovkao stalno mi stoji za produkte 0/0 kad kucam /buyprods 50 npr opet 0/0 pokusao sam svasta al nisam usepo
Deo skripte: ako treba nesto stavicu
Slika: http: http://ultraphoto.org/viewer.php?file=9ur99utnn4h7e7dzk3aq.png
Unapred Hvala 😄
[Pomoc] Posao Kamiondzija
597
pregleda
14
postova
pre 13 godina
Evo
if(strcmp(cmd, "/buyprods", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmpcar = GetPlayerVehicleID(playerid);
new compcost = 20;
if(PlayerToPoint(70.0, playerid, 2468.4919,-2092.9902,13.5469))
{
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);
SafeGivePlayerMoney(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;
}
pre 13 godina
if(strcmp(cmd, "/buyprods", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmpcar = GetPlayerVehicleID(playerid);
new compcost = 20;
if(PlayerToPoint(70.0, playerid, 2468.4919,-2092.9902,13.5469))
{
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);
SafeGivePlayerMoney(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(IsPlayerConnected(playerid))
{
new tmpcar = GetPlayerVehicleID(playerid);
new compcost = 20;
if(PlayerToPoint(70.0, playerid, 2468.4919,-2092.9902,13.5469))
{
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);
SafeGivePlayerMoney(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;
}
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava