Garage teleport?
#1

Okay, well I was wondering how I would make a garage command. For example, if you are in the PD (reason for this) and you walk/drive up to a garage door and type /pdgarage it will teleport you to a location (I have it)
If on foot you will be teleported on foot, but if you are in a vehicle it will teleport you and the vehicle there, and you will still be in the vehicle (Passengers aswell) The script I am using is ZCMD.

(Cords for outside are: Interior: 0 620.584 -596.347 16.945)
(Cords for inside (garage) are: Interior 0 -1387.886 -134.092 5.727)
Reply
#2

pawn Код:
CMD:pdgarage( playerid, params[] )
{
    if( IsPlayerInRangeOfPoint( playerid, 5.0, 620.584, -596.347, 16.945 ) )
    {
        if( !IsPlayerInAnyVehicle( playerid ) )
        {
        SetPlayerInterior( playerid, 0 );
        SetPlayerPos( playerid, -1387.886, -134.092, 5.727 );
        }
        else return SetVehiclePos( GetPlayerVehicleID( playerid ), -1387.886, -134.092, 5.727 );
    }
    return 1;
}
This should work.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)