Jump to content
  • 0

Problema la biz cand dau F sa intru


AndrewTG01

Question

Problema intalnita (descriere): Cand incerc sa intru in biz pe tasta F ma spawneaza in acelasi loc, nu ma spawneaza in biz.
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu): 

if (PRESSED(KEY_SECONDARY_ATTACK))
	{
        for(new i = 0; i < sizeof(BizzInfo); i++)
	    {
			if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
			{
				//printf("Found House :%d",i);
				if(!IsACop(playerid) && i == 3)
				{
				    SendClientMessage(playerid, COLOR_GREY, "   Cops only !");
				    return 1;
				}
				if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
				{
					if(PlayerInfo[playerid][pPbiskey] != i)
					{
						if(BizzInfo[i][bLocked] == 1)
						{
							GameTextForPlayer(playerid, "~r~Closed", 5000, 1);
							return 1;
						}
						GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
						format(string, sizeof(string), "~r~-$%d~n~~w~type /exit~n~to get out", BizzInfo[i][bEntranceCost]);
						BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
						ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
						OnPropUpdate();
						GameTextForPlayer(playerid, string, 5000, 3);
					}
					SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
					SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
					PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
					SetPlayerVirtualWorld(playerid,BizzInfo[i][bVW]);
					PlayerInfo[playerid][pVirWorld] = BizzInfo[i][bVW];
					BizEntered[playerid] = i;
					PlayerInfo[playerid][pLocal] = i+99;
					new dood[MAX_PLAYER_NAME];
					GetPlayerName(playerid, dood, sizeof(dood));
					format(string, sizeof(string), "%s payed $%d to enter biz %d", dood, BizzInfo[i][bEntranceCost], i);
			 	    printf("%s", string);
					PayLog(string);
					//PlayerInfo[playerid][pLocal] = i;
				}
				else
				{
					GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 1);
				}
			}
		}
	}


Imagini / Video (optional): -
Ati incercat sa rezolvati singur?:  Da

  • Upvote 1
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);

Asta e toata pentru intrare nu? Pentru ca dupa datele din SetPlayerPos as zice ca ii setezi coordonatele exterioare, nu interioare ale bizului.

Edit: Sau nu cunosc eu cum merge treaba cu variabilele din rp/rpg , daca nu e asa cum am zis mai sus, atunci sa ma scuzi.

Edited by Banditul
Link to comment
Share on other sites

  • 0

Incearca sa pui dupa

PayLog(string)

un return 1

Poate dupa codul acesta ai alt cod care se apeleaza si iti seteaza pozitia

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

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.