command /kupi (/buy)
#1

i want help:

Thus elkora come in and write /kupi(/buy)to me and buy sold out, and then buy elkora and look and the products are 1000/1000 because I was so satvio to localhost or to come to any trogvinu it is also.

Код:
CMD:kupi(playerid, params[])
{
	new x;
	for(new i; i < MAX_FIRMI; i++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 25.0, Firme[i][fIzlazX], Firme[i][fIzlazY], Firme[i][fIzlazZ]) && GetPlayerVirtualWorld(playerid) == Firme[i][fVW])
        {
        	if(Firme[i][fVrsta] == VRSTA_PRODAVNICA)
       		{
       		    x++;
       		    if(Firme[EntID[playerid]][fProizvodi] <= 0) return GameTextForPlayer(playerid, "~r~Rasprodato", 5000, 1);
       		    new str1[230], str2[230];
       		    format(str1, 230, "{00a2f5}Bon od $100\t{FFFFFF}$100\n{00a2f5}Tel. imenik\t{FFFFFF}$150\n{00a2f5}Torba\t\t{FFFFFF}$2000\n{00a2f5}Uze\t\t{FFFFFF}$50\n{00a2f5}Zice\t\t{FFFFFF}$700\n{00a2f5}Naocare\t{FFFFFF}$1000\n{00a2f5}Pizza\t\t{FFFFFF}$50\n");
				format(str2, 230, "{00a2f5}Cvece\t\t{FFFFFF}$100\n{00a2f5}Kanister\t{FFFFFF}$500\n{00a2f5}Bejzbol palica\t{FFFFFF}$130\n{00a2f5}Pakla cigara\t{FFFFFF}$28\n{00a2f5}Upaljac\t\t{FFFFFF}$8\n{00a2f5}Bokser\t\t{FFFFFF}$220");
				format(CmdString, 430, "%s%s", str1, str2);
			   	SPD(playerid, 124, DIALOG_STYLE_LIST, "Kupovina", CmdString, "Kupi", "Izadji");
       		    break;
			}
			else if(Firme[i][fVrsta] == VRSTA_SEXSHOP)
			{
			    x++;
       		    if(Firme[EntID[playerid]][fProizvodi] <= 0) return GameTextForPlayer(playerid, "~r~Rasprodato", 5000, 1);
			    SPD(playerid, 125, DIALOG_STYLE_LIST, "Kupovina", "{F7BBEE}Ljubicasti vibrator\t{FFFFFF}$120\n{F7BBEE}Mali beli vibrator\t{FFFFFF}$70\n{F7BBEE}Veliki beli vibrator\t{FFFFFF}$150\n{F7BBEE}Sivi vibrator\t\t{FFFFFF}$100\n{F7BBEE}Cvece\t\t\t{FFFFFF}$100", "Kupi", "Izadji");
       		    break;
			}
			else if(Firme[i][fVrsta] == VRSTA_GUNSHOP)
			{
			    x++;
       		    if(Firme[EntID[playerid]][fProizvodi] <= 0) return GameTextForPlayer(playerid, "~r~Rasprodato", 5000, 1);
			    SPD(playerid, 126, DIALOG_STYLE_LIST, "Kupovina", "{FF0000}Noz\t\t{FFFFFF}$30\n{FF0000}Padobran\t{FFFFFF}$80\n{FF0000}Pistol 9mm\t{FFFFFF}$150\n{FF0000}Desert Eagle\t{FFFFFF}$300\n{FF0000}Shotgun\t{FFFFFF}$320\n{FF0000}MP5\t\t{FFFFFF}$380\n{FF0000}AK-47\t\t{FFFFFF}$550\n{FF0000}M4\t\t{FFFFFF}$600\n{FF0000}Country Rifle\t{FFFFFF}$900\n{FF0000}Alat za obijanje\t{FFFFFF}$2999", "Kupi", "Izadji");
       		    break;
			}
			else if(Firme[i][fVrsta] == VRSTA_ELKOR)
			{
			    x++;
       		    if(Firme[113][fProizvodi] <= 0) return GameTextForPlayer(playerid, "~r~Rasprodato", 5000, 1);
			    SPD(playerid, 197, DIALOG_STYLE_LIST, "Kupovina", "Mobilni telefon\nGPS uredjaj\nAlarm za vozilo\nAlarm za kucu", "Odaberi", "Izadji");
       		    break;
			}
		}
	}
	for(new i = 22; i < 34; i++)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 10.0, JFirme[i][jfUlazX], JFirme[i][jfUlazY], JFirme[i][jfUlazZ]))
	    {
	        x++;
	        kioskblizu[playerid] = i;
	        SPD(playerid, 265, DIALOG_STYLE_LIST, "Kupovina", "Bon od $10\nBon od $50\nBon od $100\nNaocare\t$1000\nPizza\t\t$50\nPakla cigara\t$28\nUpaljac\t\t$8", "Odaberi", "Izadji");
			break;
		}
	}
	if(x == 0) return SCM(playerid, GRAD2, "{FF0000}(Greљka){FFFFFF} Ne moћete koristiti tu komandu na ovom mestu!");
	return 1;
}
Reply
#2

nevalja ti prevoditelj haha... xD ponovo napisi da ljudi mogu razumit :S
Reply
#3

I don't understand what you said, or anything, but I took a look at the codes, an I saw that your loop has a fail in
Change this
pawn Код:
for(new i; i < MAX_FIRMI; i++)
to
pawn Код:
for(new i = 0; i < MAX_FIRMI; i++)
If you really want help, post in your language section, because ****** translator isn't so good.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)