Object moving automatically
#5

Well here is a small test:

Firstly you should Create a Gate:
Quote:

public OnGameModeInit()
{
new i = CreateObject(MODEL, POSITION X- Y- Z);
}

Now, we can do a stock, where the function can find the nearest Object, or just hold a Key...
If you use the Key-variant you should use the Variable or typing /pos to get the Position.

Quote:

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_CROUCH) || IsPlayerInRangeOfPoint(playerid, Position))// press c
{
MoveObject(Position);
SCM(playerid, 0xFFFFFF, "Object 1 Open.");
}
if (PRESSED(KEY_JUMP) || IsPlayerInRangeOfPoint(playerid, Position))// press jump
{
MoveObject(Position);
SCM(playerid, 0xFFFFFF, "Object 2 Close.");
}
return 1;
//edit failed at ||
Reply


Messages In This Thread
Object moving automatically - by Crazyboobs - 05.07.2012, 07:49
Re: Object moving automatically - by TheLazySloth - 05.07.2012, 08:01
Re: Object moving automatically - by Crazyboobs - 05.07.2012, 12:29
Re: Object moving automatically - by Crazyboobs - 05.07.2012, 13:36
AW: Object moving automatically - by Forbidden - 05.07.2012, 14:00
Re: Object moving automatically - by Crazyboobs - 05.07.2012, 14:05

Forum Jump:


Users browsing this thread: 1 Guest(s)