SA-MP Forums Archive
Damn gate wont open... - 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: Damn gate wont open... (/showthread.php?tid=103814)

Pages: 1 2


Re: Damn gate wont open... - Danikov - 21.10.2009

Maybe Because this under it?few more lines i added.

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
new BlackProject;
new c_gate;


#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
  c_gate= CreateObject(11327, 213.882446, 1875.694214, 14.031004, 0.000000, 0.000000, 270.000001124); //the created object
  SetTimer("CheckGate", 100, 1);
return 1;
}

forward CheckGate();
public CheckGate()
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(IsPlayerInRangeOfPoint(i, 10.0, 213.880005, 1875.686768, 10.506058))
    {
      MoveObject(c_gate, 213.882446, 1875.694214, 14.031004,5);//move objest from position, where you created to x, y, z (you must input)
//you have the same x,y,z positions like created
      return 1;
    }

  }
  MoveObject(c_gate, 213.882446, 1875.694214, 14.031004,5);
  return 1;
}
	print("\n--------------------------------------");
	print(" Blank Filterscript by Danikov");
	print("--------------------------------------\n");
	return 1;
}



Re: Damn gate wont open... - yugokoral - 21.10.2009

Dlete this:
Код:
#if defined FILTERSCRIPT



Re: Damn gate wont open... - Danikov - 21.10.2009

thats what i get

Код:
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51.pwn(16) : warning 217: loose indentation
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51.pwn(35) : error 021: symbol already defined: "print"
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51.pwn(38) : error 010: invalid function or declaration
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51.pwn(46) : error 026: no matching "#if..."
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51.pwn(55) : error 026: no matching "#if..."
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: Damn gate wont open... - yugokoral - 21.10.2009

LOL! Look good at your script! I found all errors you did. Yust look very good! Look, what did your errors tell.


Re: Damn gate wont open... - Danikov - 21.10.2009

i dont understand the #if,and other except loose identitation


Re: Damn gate wont open... - yugokoral - 21.10.2009

Look! I repaired your code:

pawn Код:
#include <a_samp>
//new BlackProject;
new c_gate;


public OnFilterScriptInit()
{
  print("\n--------------------------------------");
    print(" Blank Filterscript by Danikov");
    print("--------------------------------------\n");

  c_gate= CreateObject(11327, 213.882446, 1875.694214, 14.031004, 0.000000, 0.000000, 270.000001124); //the created object
  SetTimer("CheckGate", 100, 1);
  return 1;
}

forward CheckGate();
public CheckGate()
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(IsPlayerInRangeOfPoint(i, 10.0, 213.880005, 1875.686768, 10.506058))
    {
      MoveObject(c_gate, 213.882446, 1875.694214, 14.031004,5);//move objest from position, where you created to x, y, z (you must input)
//you have the same x,y,z positions like created
      return 1;
    }

  }
  MoveObject(c_gate, 213.882446, 1875.694214, 14.031004,5);
  return 1;
}



Re: Damn gate wont open... - Danikov - 21.10.2009

Damn i got only two last errors!!!!
Both are about the #if ;( like before:

Код:
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51Other.pwn(42) : error 026: no matching "#if..."
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51Other.pwn(51) : error 026: no matching "#if..."
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: Damn gate wont open... - yugokoral - 21.10.2009

Quote:
Originally Posted by Danikov
Damn i got only two last errors!!!!
Both are about the #if ;( like before:

Код:
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51Other.pwn(42) : error 026: no matching "#if..."
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51Other.pwn(51) : error 026: no matching "#if..."
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Because in 42. and in 51. line you have strange #if... Delete this if(shit)!


Re: Damn gate wont open... - Danikov - 21.10.2009

thx i think it will work


Re: Damn gate wont open... - yugokoral - 21.10.2009

Dont forget select x, y, z for move object under playerpoint... Make x, y, z for moved position. You have only static position, so you moving object from one to the same position!


Re: Damn gate wont open... - Danikov - 21.10.2009

Errrrr i dont see the gate that means i need to put positions somewhere or you already did from the older script?


Re: Damn gate wont open... - yugokoral - 21.10.2009

I couldnt, because, you didnt give me an staic coordnates and moved to coordinates. I made only a example script. I dont know which coordinates of object are you using!


Re: Damn gate wont open... - Danikov - 21.10.2009

Can you set me the script,from some reason i still dont know where to put it or where...
Here are Coords:
Opened:213.882446, 1875.694214, 14.031004
Closed:213.880005, 1875.686768, 10.506058

Please Reply