(Pomoc) komanda /Buyprods /sellprods

Započeo Bobo
5. Mar. 2012. Zaključano
521
pregleda
3
postova
dogy
4
Enforcer
5. Mar. 2012.
Skripta koju koristim:larp preradeni
Detaljan opis problema:pa komanda nemogu kupiti produkte a ujedno nemogu testirati /sellprods pa bi molio pomoc ako moze,da mi netko rijesi to jer se mucim vec par dana..Hvala
Dio skripte:
Quote
if(strcmp(cmd, "/buyprods", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
new tmpcar = GetPlayerVehicleID(playerid);
if(PlayerToPoint(70.0, playerid, 2468.4919,-2092.9902,13.5469))
{
if(GetVehicleModel(tmpcar) == 414 || GetVehicleModel(tmpcar) == 456 || GetVehicleModel(tmpcar) == 499)
{
if(PlayerInfo < 200)
{
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "INFO: /buyprods ");
return 1;
}
new amount = strval(tmp);
if(amount < 1 || amount > 200) { SendClientMessage(playerid, COLOR_GREY, "  Can't buy less then 1 Product or more then 200 !"); return 1; }
new cost = amount*50;
if(GetPlayerMoney(playerid) > cost)
{
    PlayerInfo += amount;
                            format(string, sizeof(string), "You bought %d Products for $%d.", amount,cost);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
SafeGivePlayerMoney(playerid,-cost);
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), "Products: %d/%d.", PlayerHaul,PlayerHaul);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
}
else
{
SendClientMessage(playerid, TEAM_GROVE_COLOR, "This Vehicle does not deliver Products.");
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~Niste u vozilu za dostavljanje", 5000, 1);
return 1;
}
if(PlayerInfo == 0)
{
GameTextForPlayer(playerid, "~r~Kamion je prazan, vratite se i kupite produkte", 5000, 1);
                format(string, sizeof(string), "Produkti: %d.", PlayerInfo);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (IsPlayerInRangeOfPoint(playerid, 10,BizzInfo, BizzInfo, BizzInfo))
{
//printf("Found House :%d",i);
for(new l = PlayerHaul; l > 0; l--)
{
if(BizzInfo == BizzInfo)
{
GameTextForPlayer(playerid, "~r~Our stores are full", 5000, 1);
format(string, sizeof(string), "Cash Earned $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Products: %d.", PlayerInfo);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
return 1;
}
if(BizzInfo > BizzInfo)
{
GameTextForPlayer(playerid, "~r~We Cant Afford The Deal", 5000, 1);
format(string, sizeof(string), "Cash Earned $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            format(string, sizeof(string), "Products: %d.", PlayerInfo);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
return 1;
}
PlayerInfo--;
BizzInfo++;
cashmade = cashmade+BizzInfo;
//ConsumingMoney = 1;
SafeGivePlayerMoney(playerid,BizzInfo);
BizzInfo -= BizzInfo;
if(PlayerInfo == 0)
{
GameTextForPlayer(playerid, "~r~Truck is empty, return to the stock house", 5000, 1);
format(string, sizeof(string), "Cash Earned $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            format(string, sizeof(string), "Products: %d.", PlayerInfo);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
return 1;
}
}
OnPropUpdate(3,i);
return 1;
}
}
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
if (IsPlayerInRangeOfPoint(playerid, 10,SBizzInfo, SBizzInfo, SBizzInfo))
{
//printf("Found House :%d",i);
for(new l = PlayerHaul; l > 0; l--)
{
if(SBizzInfo == SBizzInfo)
{
GameTextForPlayer(playerid, "~r~Our stores are full", 5000, 1);
format(string, sizeof(string), "Cash Earned $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Products: %d/%d.", PlayerHaul,PlayerHaul);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
if(SBizzInfo > SBizzInfo)
{
GameTextForPlayer(playerid, "~r~We Cant Afford The Deal", 5000, 1);
format(string, sizeof(string), "Cash Earned $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Products: %d/%d.", PlayerHaul,PlayerHaul);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
PlayerHaul--;
SBizzInfo++;
cashmade = cashmade+SBizzInfo;
//ConsumingMoney = 1;
SafeGivePlayerMoney(playerid,SBizzInfo);
SBizzInfo -= SBizzInfo;
if(PlayerHaul == 0)
{
GameTextForPlayer(playerid, "~r~Truck is empty, return to the stock house", 5000, 1);
format(string, sizeof(string), "Cash Earned $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Products: %d/%d.", PlayerHaul,PlayerHaul);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
}
OnPropUpdate(3,i);
return 1;
}
}
GameTextForPlayer(playerid, "~r~To Far From A Business", 5000, 1);
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Deleted User
Obrisan korisnik
6. Mar. 2012.
De malo pojasni svoj problem, navodno ove komande sto si postavio nisu uredu, tj. nema efekta kada kucas ove komande?
dogy
4
Enforcer
6. Mar. 2012.
problem je u tome sto kada ja upisem /buyprods ne izbaci mi nista i kada dodem do ducana i /sellprods opet ne izbaci nista.Komandu sell jos nekako bi i rijesio imam ju ali stvar je u tome kada sam pokusavao komandu napraviti /buyprods uvijek mi pise produkti 0/0 pa ako mi se moze napraviti da igrac kada kuca /buyprods dobije produkte.pa cu poslje rijesavati /sellprods.

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha