MoveDynamicObject Issue -
nmader - 15.12.2012
Alright, for some reason my weakness in scripting seems to be MovingDynamicObject's. In the first bit of code included the gate will open, however it will not close for some reason:
pawn Код:
if(FrancePrisonGateStatus == 0)
{
MoveDynamicObject(FrancePrisonGate, 193.93, 113.22, 4.20, 2.0, 0.00, 0.00, 114.90);
FrancePrisonGateStatus = 1;
}
else
{
MoveDynamicObject(FrancePrisonGate, 191.8999939,117.5999985,4.1999998, 2.0, 0.0000000,0.0000000,114.8979187);
FrancePrisonGateStatus = 0;
}
Any help will be greatly appreciated, thanks.
~Nmader
Re: MoveDynamicObject Issue -
maramizo - 15.12.2012
The problem is in the call, it doesn't get called when it is supposed to close.
Re: MoveDynamicObject Issue -
nmader - 15.12.2012
...Kinda funny because if you payed the slightest bit attention you would have known that this was only a portion of the code as I came out and said it.
Re: MoveDynamicObject Issue -
maramizo - 16.12.2012
Quote:
Originally Posted by nmader
...Kinda funny because if you payed the slightest bit attention you would have known that this was only a portion of the code as I came out and said it.
|
You're asking for help, then you're making fun of a person that knows more than you?
You do not deserve to be helped, period.
Re: MoveDynamicObject Issue -
nmader - 16.12.2012
Quote:
Originally Posted by ******
Err, no you didn't. Anyway, we can't help you if we don't have all the code.
|
I've had this problem before and found the solution before but forgot to write the solution down. Now I am pretty sure the problem was in the lines givin.
I also said: In the first bit of code. That shows that I only given a portion of the code.
Re: MoveDynamicObject Issue -
Threshold - 16.12.2012
Try changing
to:
pawn Код:
else if(FrancePrisonGateStatus == 1)
Re: MoveDynamicObject Issue -
nmader - 16.12.2012
Quote:
Originally Posted by BenzoAMG
Try changing
to:
pawn Код:
else if(FrancePrisonGateStatus == 1)
|
Unfortunately I have tried that and it did not work either. I do have a working system for moving gates on another server I was working on, I tried comparing them however had little to know success:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 30, -2287.1353, -2758.3120, 43.8000))
{
if(fbgatestatus1 == 1)
{
MoveObject(fbgate1, -2287.1353, -2758.3120, 43.8000, 0.75, 0.0000, 0.0000, 61.9958);
fbgatestatus1 = 0;
return 1;
}
else
{
MoveObject(fbgate1, -2287.3826, -2758.9148, 45.7150, 0.75, 0.0000, -90.0000, 61.9958);
fbgatestatus1 = 1;
return 1;
}
}
I fail to see any difference in the code in which I provided at the time and to the one I just provided.
pawn Код:
if(FrancePrisonGateStatus == 0)
{
MoveDynamicObject(FrancePrisonGate, 193.93, 113.22, 4.20, 2.0, 0.00, 0.00, 114.90);
FrancePrisonGateStatus = 1;
return 1;
}
else
{
MoveDynamicObject(FrancePrisonGate, 191.8999939,117.5999985,4.1999998, 2.0, 0.0000000,0.0000000,114.8979187);
FrancePrisonGateStatus = 0;
return 1;
}