Need help
#1

i want to create a garage object and Open Auto
is there a CodE ?
Reply
#2

You want to say a gate? with /opengate and the object moving and 'opene auto'
Reply
#3

No, this this Garage http://imgur.com/4k6seDI
it's auto open/close see: http://imgur.com/TFpIzUo
Reply
#4

Bumb?
Reply
#5

You want to have your custom garage, where you will get close to it and it's going to open automatically when you are near it?
Reply
#6

Yess
Reply
#7

pawn Код:
#include    <a_samp>

new GarageDoor;

public OnGameModeInit()
{
    GarageDoor = CreateObject(...); // Check for function parameters on SA-MP's Wiki.
    return 1;
}

public OnPlayerUpdate(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, ...))
    {
        // OPEN.
        MoveObject(GarageDoor, ...);
    }
   
    else
    {
        // CLOSE.
        MoveObject(GarageDoor, ...);
    }
    return 1;
}
This is the most I can give you. Check function(s) parameters at SA-MP's Wiki page. When you create object make sure you have your object created in CLOSED garage door position, and YOU MUST HAVE garage door OPENED position as well, because you gonna need it for MoveObject in // OPEN. section in the code.

That's all you really need, if you want to open garage nicely, then you have to do RotX, RotY, RotZ with X, Y, Z. All those parameters are explained at SA-MP's Wiki. Give it some time, play around with it, try it.. got error? ****** it, try again.. Stuck for hours? Come back and ask. Not after 5 minutes.
Reply
#8

Thnx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)