05.10.2010, 17:25
already changed the code to this but it still doesn't works...
I also made it with a command, so I can at least drive through the gate, and the command works... it uses the same things as the function, just no the "IsPlayerInRangeOfPoint"...
anyway, I dislike the command so anyone knows how to fix this?
Код:
public ObjectPosCheck() { for(new i=0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i)){ new Float:x, Float:y, Float:z; GetPlayerPos(i, x, y, z); if(IsPlayerInRangeOfPoint(i, 1524.55212402,2773.19628906,10.67187500, 5.00)){ if(PlayerData[i][Level] >= 5){ if(ObjectData[lg1][down] == 0){ new objectid; MoveObject(lg1, 1524.55212402,2787.05566406,11.42187500, 2.00); MoveObject(lg2,1524.55212402,2758.96386719,11.42187500, 2.00); MoveObject(lg3,1524.55175781,2773.19628906,0.17187500, 2.00); objectid = lg1; SetTimerEx("ObjectMoveBack", MoveObject(lg1, 1524.55212402,2787.05566406,11.42187500, 2.00) + 2500, false, "i", objectid); ObjectData[lg1][down] = 1; } } } } return 1; }
anyway, I dislike the command so anyone knows how to fix this?