SA-MP Forums Archive
Business GET | DELIVER fail .. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Business GET | DELIVER fail .. (/showthread.php?tid=404886)



Business GET | DELIVER fail .. - playerid96 - 04.01.2013

hey

I wanted to make a system, where i can get the prods and deliver it at the buisness (its in german)

Код:
ocmd:produkte(playerid,params[])
{
	new MSG[200], Anzahl, Parameter[20], IstBeladenMitProds[MAX_PLAYERS];
	if(IsPlayerInAnyVehicle(playerid))
	{
	    if(sscanf(params, "si", Parameter , Anzahl))return SendClientMessage(playerid, FARBE_GRAU, "Fehler: /produkte [Get/Deliver] [Anzahl]");
	    for(new b = 1; b < MAX_ANZAHL_AN_BIZZ; b++)// b = 1 lassen wir wollen kein Biz miz ID 0 :D
	    {
				if(!strcmp(Parameter, "Get", true) && Anzahl < 501)
				{
				    format(MSG, 200, "Dein Car hat %i Produkte aufgeladen.", Anzahl);
				    SendClientMessage(playerid, FARBE_HELLBLAU, MSG);
					IstBeladenMitProds[playerid] = Anzahl;
					return 1;
				}
				if(!strcmp(Parameter, "Deliver", true) && IstSpielerBeiBiz(playerid) && BizInfo[b][bKasse] >= Anzahl * 750 && BizInfo[b][bProds] < 500 && Anzahl + BizInfo[b][bProds] <= 500)
				{
   					GivePlayerMoney(playerid, Anzahl * 750);
				    format(MSG, 200, "Du hast die Produkte abgeliefert. Dein Lohn: %i$.", Anzahl * 750);
				    SendClientMessage(playerid, FARBE_HELLBLAU, MSG);
				    BizInfo[b][bKasse] -= Anzahl * 750;
				    BizInfo[b][bProds] += Anzahl;
				    IstBeladenMitProds[playerid] = 0;
				    return 1;

				}
		}
	}
	return 1;
}
Get is ok, but deliver dont respones .......

Dear,
me