[POMOC]Oko biznisa


Započeo Sladjan96, Februar 16, 2013, 22:22:17 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Detaljan opis problema:Imam problem sa biznisima ne mogu podici novac ili ostaviti kad kucam /fostavi ili /fpodigni izbaci mi /fostavi kolicina ali kad kucam na primer /fostavi 20 izbaci da komanda ne postoji
Skripta koju koristim: Moja
Neke slike/video/kod za lakse dobivanje pomoci (npr.slika server.cfg, server log ili slično): //
if(strcmp(cmd, "/fpodigni", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
			new bouse = PlayerInfo[playerid][pPbiskey];
			if (bouse == 255)
			{SendClientMessage(playerid, COLOR_GRAD2, " Ne posjedujete firmu.");return 1;}
			
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				if (bouse >= 100)
				{
					format(string, sizeof(string), "Imate $%d u vasoj kasi.", SBizzInfo[bouse-100][sbTill]);
					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
				}
				else
				{
					format(string, sizeof(string), "Imate $%d u vasoj kasi.", BizzInfo[bouse][bTill]);
					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
				}
				SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /fpodigni [kolicina]");
				return 1;
			}
			new cashdeposit = strval(tmp);
			if(!strlen(tmp))
			{SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /fpodigni [kolicina]");return 1;}
			if (bouse >= 100)
			{
				if(cashdeposit > SBizzInfo[bouse-100][sbTill] || cashdeposit < 1)
				{SendClientMessage(playerid, COLOR_GRAD2, "Nemate toliko.");return 1;}
			}
			else
			{
				if (cashdeposit > BizzInfo[bouse][bTill] || cashdeposit < 1)
				{SendClientMessage(playerid, COLOR_GRAD2, "Nemate toliko.");return 1;}
			}
			
			if (bouse >= 100)
			{
				if(!PlayerToPoint(5, playerid,SBizzInfo[bouse][sbEntranceX],SBizzInfo[bouse][sbEntranceY],SBizzInfo[bouse][sbEntranceZ]))
				{SendClientMessage(playerid, COLOR_GRAD2, "Predaleko ste od vase firme!");return 1;}
				
				else
				{
					SafeJBC_GivePlayerMoney(playerid,cashdeposit);
					SBizzInfo[bouse-100][sbTill] -= cashdeposit;
					format(string, sizeof(string), "Uzeli ste $%d iz vase kase, Ukupno: $%d", cashdeposit,SBizzInfo[bouse-100][sbTill]);
					OnPropUpdate();
					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					return 1;
				}
			}

		}
		return 1;
	}



if(strcmp(cmd, "/fostavi", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
			new bouse = PlayerInfo[playerid][pPbiskey];
			if (bouse == 255)
			{SendClientMessage(playerid, COLOR_GRAD2, " Ne posjedujete firmu.");return 1;}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				if (bouse >= 100)
				{
					format(string, sizeof(string), "Imate $%d u vasoj kasi.", SBizzInfo[bouse-100][sbTill]);
					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
				}
				else
				{
					format(string, sizeof(string), "Imate $%d u vasoj kasi.", BizzInfo[bouse][bTill]);
					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
				}
				SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /fostavi [kolicina]");
				return 1;
			}
			new cashdeposit = strval(tmp);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /fostavi [kolicina]");
				SendClientMessage(playerid, COLOR_GRAD3, string);
				return 1;
			}
			if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
			{SendClientMessage(playerid, COLOR_GRAD2, "Nemate toliko.");return 1;}

			if (bouse >= 100)
			{
				if(!PlayerToPoint(5, playerid,SBizzInfo[bouse][sbEntranceX],SBizzInfo[bouse][sbEntranceY],SBizzInfo[bouse][sbEntranceZ]))
				{SendClientMessage(playerid, COLOR_GRAD2, "Predaleko ste od vase firme.");return 1;}
				else
				{
					SafeJBC_GivePlayerMoney(playerid,-cashdeposit);
					SBizzInfo[bouse-100][sbTill] += cashdeposit;
					ExtortionSBiz(bouse-100, cashdeposit);
					format(string, sizeof(string), "Stavili ste $%d u vasu kasu, Ukupno: $%d ", cashdeposit,SBizzInfo[bouse-100][sbTill]);
					OnPropUpdate();
					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					return 1;
				}
			}

		}
		return 1;
	}

Streetboy

*

I kada dođe do rasprave, neka su vam reči blage, a dokazi jaki. A ja, iz iskustva znam da su reči jače uvek, kada su dokazi slabi.