Error With Vehicles
#1

Hello, Im breaking a bit the head with a problem I am having and I fail to see where it comes from.

The problem is that I have a set of doors that pressing the button and enter an interior, and then exit with the same method.

I have an teleport system who teleport the user to an interior. and he can back again pressing Y.

Then when car is near of these positions and this teleport is used by multiple users, some cars changed his position, sometimes the positions of all nearby vehicles are changed.

Greetings

Ranslsad
Reply
#2

can we see the commands of the Y enter and Exit as you said ?
Reply
#3

Yes, its dynamic gate.

Код:
//**********************************************************************
		for(new i = 0; i <MAX_PUERTAS; i++) //Puertas Dinamicas
		{
		    new playerState = GetPlayerState(playerid);
			if(playerState == PLAYER_STATE_ONFOOT)
			{
				if(IsPlayerInRangeOfPoint(playerid,2.0,Puerta[i][PEnterX],Puerta[i][PEnterY],Puerta[i][PEnterZ]))
				{
				    //if(IsPlayerInAnyVehicle(playerid)) return 1;
					if(Puerta[i][PCerrado] == 1) return SendClientMessage(playerid, COLOR_RED, "La puerta esta cerrada.");
					SetPlayerVirtualWorld(playerid, Puerta[i][PExitVW]);
					SetPlayerPos(playerid, Puerta[i][PExitX], Puerta[i][PExitY], Puerta[i][PExitZ]);
					SetPlayerInterior(playerid, Puerta[i][PExitInt]);
					return 1;
				}
				if(IsPlayerInRangeOfPoint(playerid,2.0,Puerta[i][PExitX],Puerta[i][PExitY],Puerta[i][PExitZ]))
				{
				    //if(IsPlayerInAnyVehicle(playerid)) return 1;
					if(Puerta[i][PCerrado] == 1) return SendClientMessage(playerid, COLOR_RED, "La puerta esta cerrada.");
					SetPlayerVirtualWorld(playerid, Puerta[i][PEnterVW]);
					SetPlayerPos(playerid, Puerta[i][PEnterX], Puerta[i][PEnterY], Puerta[i][PEnterZ]);
					SetPlayerInterior(playerid, Puerta[i][PEnterInt]);
					return 1;
				}
			}
		}
I still have this error.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)