Gym with all equipment
#1

Hi All! I'm trying to make a Gym. The problem are the objects, every time I try to set the character using animation but the objects push the person, causing it to not be in the correct position, I tried in the bike and lifting machine, what is the solution for this?

[img width=858 height=768]/imageshack/img695/8897/hun.jpg[/img]

[img width=858 height=768]/imageshack/img138/3817/hun2.jpg[/img]

Thanks
Reply
#2

Use

Код:
TogglePlayerControllable(playerid,0);
when you activate the animation.
Reply
#3

I already used but the problems continues. the animation with the Controllable not make the move. The animation occurs but the character does not walk as normal.
Reply
#4

Код:
CreateObject(2913 ... ... ... ... ... ...);

ApplyAnimation(playerid,"benchpress","gym_bp_geton", 4.0, 0, 0, 0, 1, 0);
Reply
#5

No....
Reply
#6

Unique idea, as I said to you

Hmmm, possible solution maybe is to make the moving objects (bar, weights) have unique id reference.

I'll use the bar as an example.
Код:
new ObjBAR; // example ObjBAR=CreateObject( ......
new ObjBAR_ACTIVE=-1;
Then, a command. This is to start the weight lifting. (Also to prevent other people doing the same job/routine).
Код:
ObjBAR_ACTIVE=playerid; // good idea would be to add the playerid here
AttachObjectToPlayer, unsure what will happen, but if it reacts the same as single player it should be OK.
Perhaps use a timer too, a SetTimerEx to maintain the position of the one player (500 milliseconds, repeat).
The new IsPlayerInRangeOfPoint could also be used in the SetTimerEx, if range is over 2.0 away from the benchpress, kill the timer. SetObjectPos back to the benchpress, then set the value of ObjBAR_ACTIVE back to -1.

This is a new and unique feature, goodluck with it. Untested idea above, but it's what I would try.

EDIT: Just browsed the GTA Single Player code and found a function SA-MP doesn't have that would enable this.
Код:
0619: enable_actor $PLAYER_ACTOR collision_detection 0
Here is some code that might help you (might not though lol)
http://pastebin.com/m7a354d4f
Reply
#7

ATACH OBJECT to PLAYER not create object
Reply
#8

Quote:
Originally Posted by DRIFT_HUNTER
ATACH OBJECT to PLAYER not create object
No, move a object to player. But the problems continue...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)