gate fix
#1

hi, i`ve made my gate myselve but can someone make it automatic for me?

CreateObject( 985 , 2494.270751 , 2350.783447 , 10.867918 , 0.000000 , 0.000000 , 0.000000 );
Reply
#2

Use this, hope it helps
Click here!
Reply
#3

PlayerToPoint. In other words link: https://sampwiki.blast.hk/wiki/Automatic_Gates
Reply
#4

well i meaned thet may you guys couldt make it for me...
Reply
#5

We're not here to do it for you, if you are that lazy go to the script request thread
Reply
#6

Quote:
Originally Posted by laser50
well i meaned thet may you guys couldt make it for me...
Try read instead! It ain't so hard!
Reply
#7

Quote:
Originally Posted by laser50
well i meaned thet may you guys couldt make it for me...
If you learn how to script and such, it'll be much easier for you to make scripts, believe me.
Reply
#8

im twelve, please make the one thing for me, btw i got a new Object please make the newer one instead of the old one above.

CreateObject( 985 , 2494.270751 , 2350.783447 , 10.867918 , 0.000000 , 0.000000 , 0.000000 );

please make it a gate if you can.

i wil learn scriting but im 12 and from holland so i dont understand shiit
Reply
#9

Try this but change the end cords!! And post any errors warnings! Its not tested!


forward GateCheck(); // add this at rhe top of the script...
new gate; // add this at rhe top of the script...

SetTimer("GateCheck", 1000, 1 ); // add this in public OnGameModeInit()
gate = CreateObject( 985 , 2494.270751 , 2350.783447 , 10.867918 , 0.000000 , 0.000000 , 0.000000 ); // add this in public OnGameModeInit()


Код:
public GateCheck()
{
  for(new i = 0; i <= MAX_PLAYERS; i++)
  {
  if(IsPlayerConnected(i))
  {
  if(PlayerToPoint(25.0, i,1708.531250, 1616.638062, 10.721598))
  {
  MoveObject(gate,1708.531250, 1616.638062, 10.721598, 4.0); // Chnge the cords to the end position here...
  }
 else
  {
  MoveObject(gate, 2494.270751 , 2350.783447 , 10.867918, 4.0);
  }
  }
  }
  return 1;
}

PlayerToPoint(Float:radius, playerid, Float:X, Float:Y, Float:Z)
{
  for(new i = 0; i <= MAX_PLAYERS; i++)
  {
  if(IsPlayerConnected(i))
  {
  #pragma unused playerid
  new Float:oldpos[3], Float:temppos[3];
  GetPlayerPos(i, oldpos[0], oldpos[1], oldpos[2]);
  temppos[0] = (oldpos[0] -X);
  temppos[1] = (oldpos[1] -Y);
  temppos[2] = (oldpos[2] -Z);
  if(((temppos[0] < radius) && (temppos[0] > -radius)) && ((temppos[1] < radius) && (temppos[1] > -radius)) && ((temppos[2] < radius) && (temppos[2] > -radius)))
  {
  return true;
  }
  }
  }
  return false;
}
Reply
#10

Quote:
Originally Posted by laser50
i wil learn scriting but im 12 and from holland so i dont understand shiit
Does that make a difference?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)