Jump to content

Question

Posted

Salutare, am o problema la gamemode-ul pe care il folosesc, atunci cand folosesc comanda /sellbiz, biz-ul se vinde, dar se poate cumpara la pretul de 1$.

if(strcmp(cmd, "/sellbiz", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
			GetPlayerName(playerid, playername, sizeof(playername));
			if(PlayerInfo[playerid][pPbiskey] == 255)
			{
				SendClientMessage(playerid, COLOR_WHITE, "Nu detii o afacere.");
				return 1;
			}
			if(PlayerInfo[playerid][pPbiskey] >= 100 && strcmp(playername, SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbOwner], true) == 0)
			{
				new bouse = PlayerInfo[playerid][pPbiskey]-100;
				GivePlayerCash(playerid,SBizzInfo[bouse][sbTill]);
				SBizzInfo[bouse][sbBuyPrice] = 1;
				SBizzInfo[bouse][sbLocked] = 1;
				SBizzInfo[bouse][sbOwned] = 0;
				GetPlayerName(playerid, sendername, sizeof(sendername));
				strmid(SBizzInfo[bouse][sbOwner], "The State", 0, strlen("The State"), 255);
				strmid(SBizzInfo[bouse][sbExtortion], "No-one", 0, strlen("No-one"), 255);
				ConsumingMoney[playerid] = 1;
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				format(string, sizeof(string), "~w~Felicitari~n~ Ti-ai vandut afacerea pentru ~n~~g~$%d", SBizzInfo[bouse][sbTill]);
				GameTextForPlayer(playerid, string, 10000, 3);
				SBizzInfo[bouse][sbTill] = 0;
				PlayerInfo[playerid][pPbiskey] = 255;
				Update(playerid, pBizzx);
				OnPropUpdate();
				//OnPlayerUpdateEx(playerid);
				return 1;
			}

Va multumesc pentru ajutor!

3 answers to this question

Recommended Posts

Posted

  SBizzInfo[bouse][sbBuyPrice] = ; - Aici schimbi cu ce pret vrei sa arate.

                ConsumingMoney[playerid] = 1;-Aici pui cati bani consuma playerul,deci aici pui pretul bizzului.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.