/exit cmd.
#1

Hello there i realy need to fix this cmd so i gonna ask here again.

Here is an explain about a problem:

[ame="http://www.youtube.com/watch?v=JcjHXzrVP_A"]http://www.youtube.com/watch?v=JcjHXzrVP_A[/ame]

bizz exit part:

Код HTML:
			if(BizzEntered[playerid] != 9999)
		    {
		        new i = BizzEntered[playerid];

				if (IsPlayerInRangeOfPoint(playerid, 3,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
				{
				    SafeSetPlayerInterior(playerid,0);
					SetPlayerVirtualWorld(playerid, 0);
					OnPlayerExitFood(playerid);
					SafeSetPlayerPos(playerid,BizzInfo[i][bEntranceX],[bEntranceY],BizzInfo[i][bEntranceZ]);
					SetPlayerVirtualWorld(playerid, 0);
					BizzEntered[playerid] = 9999;
				}
			}
bizz enter part:

Код HTML:
			for(new i = 0; i < sizeof(BizzInfo); i++)
			{
				if (IsPlayerInRangeOfPoint(playerid, 5,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
				{
					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;
							}
							if(BizzInfo[i][bProducts] == 0)
							{
								GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
								return 1;
							}
							SafeGivePlayerMoney(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]);
							BizzInfo[i][bProducts]--;
							OnPropUpdate(2,i);
							GameTextForPlayer(playerid, string, 5000, 3);
						}
						PlayerInfo[playerid][pInteriorNr] = BizzInfo[i][bInteriorNr];
						SetPlayerVirtualWorld(playerid,BizzInfo[i][bVirWorld]);
						SafeSetPlayerInterior(playerid,BizzInfo[i][bInterior]);
						SafeSetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
						new dood[MAX_PLAYER_NAME];
						GetPlayerName(playerid, dood, sizeof(dood));
						BizzEntered[playerid] = i;
						new h,mi,s,y,m,d;
						getdate(y,m,d);
						gettime(h,mi,s);
						format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s payed $%d to enter biz %d",d,m,y,h,mi,s, dood, BizzInfo[i][bEntranceCost], i);
						printf("%s", string);
						PayLog(string);
						if(BizzInfo[i][bVirWorld] == 0 || BizzInfo[i][bVirWorld] == 1)
						{
						    OnPlayerEnterFood(playerid, 1);
						}
						else if(BizzInfo[i][bVirWorld] == 2 || BizzInfo[i][bVirWorld] == 3)
						{
						    OnPlayerEnterFood(playerid, 2);
						}
						else if(BizzInfo[i][bVirWorld] == 4 || BizzInfo[i][bVirWorld] == 5)
						{
						    OnPlayerEnterFood(playerid, 3);
						}
						else if(BizzInfo[i][bVirWorld] == 6)
						{
						    OnPlayerEnterFood(playerid, 4);
						}
					}
					else
					{
						GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 1);
					}
				}
			}
If you guys need saving and loading code tell it.
Reply
#2

did you checked if there is another SetPlayerPos?
Reply
#3

there isnt another teleport
Reply
#4

bump.
Reply
#5

Bump plz help me i cant open server becouse of it... Can any one check it via teamewiwer or something?
Reply
#6

bump i cant fix it...
Reply
#7

when they exit the building just move the playerpos slightly forward, and maybe make a timer so it freezes the player and lets the map load for a second or two
Reply
#8

pawn Код:
SafeSetPlayerPos(playerid,BizzInfo[BizzEntered[playerid]][bEntranceX], BizzInfo[BizzEntered[playerid]][bEntranceY],BizzInfo[BizzEntered[playerid]][bEntranceZ]);
Reply
#9

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
pawn Код:
SafeSetPlayerPos(playerid,BizzInfo[BizzEntered[playerid]][bEntranceX], BizzInfo[BizzEntered[playerid]][bEntranceY],BizzInfo[BizzEntered[playerid]][bEntranceZ]);
This helps a a lot since he has stock of your function SafeSetplayerPos</sarcasm>
Reply
#10

Freeze the player when the use /exit and then set a 3 second timer or so, which will then unfreeze them after the time is up.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)