SA-MP Forums Archive
Where shoukd i put this co ordinate?? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Where shoukd i put this co ordinate?? (/showthread.php?tid=130355)



Where shoukd i put this co ordinate?? - empty_full - 26.02.2010

#include <a_samp>
new gate;
forward gateTimer(playerid);

public OnFilterScriptInit()
{
gate = CreateObject(976, 211.22889709473, -1447.3885498047, 12.159649848938, 0, 0, 230.97595214844);
SetTimer("gateTimer", 1000, 1);
}


public gateTimer(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 10, 211.22889709473, -1447.3885498047, 12.15964984893)
{
MoveObject(gate, 205.57905578613, -1454.2342529297, 12.159649848938, 5);
}else{
MoveObject(gate, 211.22889709473, -1447.3885498047, 12.159649848938, 5);
}
}





i just use aGate Ganerator software

help!!!!


Re: Where shoukd i put this co ordinate?? - Torran - 26.02.2010

What coord? Everythings done for you


Re: Where shoukd i put this co ordinate?? - LuxurioN™ - 26.02.2010

From what I understand, you do not know where put?

Try:
In your script top:
pawn Код:
#include <a_samp>

new gate;
forward gateTimer(playerid);
In "OnFilterScriptInit":
pawn Код:
gate = CreateObject(976, 211.22889709473, -1447.3885498047, 12.159649848938, 0, 0, 230.97595214844);
SetTimer("gateTimer", 1000, 1);
In any place of your script
pawn Код:
public gateTimer(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 10, 211.22889709473, -1447.3885498047, 12.159649848938))
{
MoveObject(gate, 205.57905578613, -1454.2342529297, 12.159649848938, 5);
}else{
MoveObject(gate, 211.22889709473, -1447.3885498047, 12.159649848938, 5);
}
}



Re: Where shoukd i put this co ordinate?? - empty_full - 26.02.2010

that automatic gate coordinate idk where to put i

//Gate variable and forward
new gate;
forward gateTimer(playerid);

//Object and timer at OnGameModeInit/OnFilterScriptInit
gate = CreateObject(976, 211.22889709473, -1447.3885498047, 12.159649848938, 0, 0, 230.97595214844);
SetTimer("gateTimer", 1000, 1);
//Add this callback where you want but not inside another callback!!
public gateTimer()
{
if(IsPlayerInRangeOfPoint(playerid, 10, 211.22889709473, -1447.3885498047, 12.15964984893)
{
MoveObject(gate, 205.57905578613, -1454.2342529297, 12.159649848938, 5);
}else{
MoveObject(gate, 211.22889709473, -1447.3885498047, 12.159649848938, 5);
}
}



Re: Where shoukd i put this co ordinate?? - empty_full - 26.02.2010

it has error

D:\server new\pawno\hm.pwn(161) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Re: Where shoukd i put this co ordinate?? - VonLeeuwen - 26.02.2010

You use SAMP version 0.3?


Re: Where shoukd i put this co ordinate?? - Joe Staff - 26.02.2010

Go complain to whoever wrote that gate generator. The code is wrong, I have to say this every time someone makes an automatic gate post. That will only work for playerid 0.


Re: Where shoukd i put this co ordinate?? - empty_full - 26.02.2010

i has 0.2 server


Re: Where shoukd i put this co ordinate?? - empty_full - 27.02.2010

omg is that any other app for gate or can u make a auto gate for me it co ordinat is

gate closed:CreateObject(976, 211.22889709473, -1447.3885498047, 12.159649848938, 0, 0, 230.97595214844);
gate opended:CreateObject(976, 205.57905578613, -1454.2342529297, 12.159649848938, 0, 0, 230.97106933594);


if u wanna make plz make it for 0.2

thx