[Help] Input and output (Garages)
#1

Hello ... I would like to help me with this.

I have a garage system and have a problem at the entrance and exit.
I wish I configure this code so that the car can enter with the person. and leaving that little bit more outside the door.

I give reputation for this, of course thank you very much


Код:
for(new i = 0; i < sizeof(GarageInfo); i++){
    		if (IsPlayerInRangeOfPoint(playerid,3,GarageInfo[i][gExteriorX], GarageInfo[i][gExteriorY], GarageInfo[i][gExteriorZ])){
        			if(Info[playerid][pPgaragekey] == i || GarageInfo[i][gLock] == 0){
			        LoadObjects(playerid);
            		SetPlayerInterior(playerid,GarageInfo[i][gHInteriorWorld]);
            		Info[playerid][pInt] = GarageInfo[i][gHInteriorWorld];
            		Info[playerid][pVW] = i+6000;
            		SetPlayerVirtualWorld(playerid, i+6000);
            		if(GarageInfo[i][gCustomInterior] == 1){
            		    LoadObjects(playerid);
            		}
            		SetPlayerPos(playerid,GarageInfo[i][gInteriorX],GarageInfo[i][gInteriorY],GarageInfo[i][gInteriorZ]);//Vehiculo
            		SetPlayerFacingAngle(playerid,GarageInfo[i][gInteriorA]);
            		SetCameraBehindPlayer(playerid);
            		GameTextForPlayer(playerid, "~w~Bienvenido al Garage", 5000, 1);
					Streamer_UpdateEx(playerid, GarageInfo[i][gInteriorX],GarageInfo[i][gInteriorY],GarageInfo[i][gInteriorZ]);
        			}
        			else
					{
					GameTextForPlayer(playerid, "~r~El garage esta cerrado", 5000, 1);
					}
        			return 1;
        			}

        			if (IsPlayerInRangeOfPoint(playerid,3,GarageInfo[i][gInteriorX], GarageInfo[i][gInteriorY], GarageInfo[i][gInteriorZ]) && Info[playerid][pVW] == i+6000)
					{
					SetPlayerInterior(playerid,0);
            		Info[playerid][pInt] = 0;
            		if(GarageInfo[i][gCustomExterior]){LoadObjects(i);}
            		SetPlayerPos(playerid,GarageInfo[i][gExteriorX],GarageInfo[i][gExteriorY],GarageInfo[i][gExteriorZ]);//Vehiculo
            		SetPlayerFacingAngle(playerid, GarageInfo[i][gExteriorA]);
            		SetCameraBehindPlayer(playerid);
 			 		SetPlayerVirtualWorld(playerid, 0);
            		Info[playerid][pVW] = 0;
            		return Streamer_UpdateEx(playerid, GarageInfo[i][gExteriorX],GarageInfo[i][gExteriorY],GarageInfo[i][gExteriorZ]);
        			}
 				}
Reply
#2

What you need to to when entering the garage is get players CarID. Afterwards you teleport the car then the player and use PutPlayerInVehicle.
Reply
#3

Question : The garage is like the one in Signle Player which means close and you can't see, Or you are using another Interior ? Because I saw that you changed the Interior.
Reply
#4

Quote:
Originally Posted by Clad
Посмотреть сообщение
Question : The garage is like the one in Signle Player which means close and you can't see, Or you are using another Interior ? Because I saw that you changed the Interior.
--------------------------------------------------------------------------------------------------------------------------------------

Hello, interiors can be no matter who. That's the thing, I have command to customize the interior, where ever you are the character, but I mean it can enter the vehicle interior, and out, which is a good distance, I think the solution is to create the farther outside, but as I can do to enter the character + vehicle?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)