04.01.2016, 17:33
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;
}
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.