gate fix -
laser50 - 13.05.2009
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 );
Re: gate fix -
matrix_smq - 13.05.2009
Use this, hope it helps
Click here!
Re: gate fix -
Cabby - 13.05.2009
PlayerToPoint. In other words link:
https://sampwiki.blast.hk/wiki/Automatic_Gates
Re: gate fix -
laser50 - 13.05.2009
well i meaned thet may you guys couldt make it for me...
Re: gate fix -
Weirdosport - 13.05.2009
We're not here to do it for you, if you are that lazy go to the script request thread
Re: gate fix -
Cabby - 13.05.2009
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!
Re: gate fix -
Dak_Cobain - 13.05.2009
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.
Re: gate fix -
laser50 - 13.05.2009
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
Re: gate fix -
robanswe - 13.05.2009
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;
}
Re: gate fix -
Cabby - 13.05.2009
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?