SA-MP Forums Archive
Automatic Moving object. - 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: Automatic Moving object. (/showthread.php?tid=83805)



Automatic Moving object. - MarqueZ92 - 27.06.2009

Well, i want that when people do /paytoll at a place, the Gate opens, but automaticly closes after 20 Seconds or something.


Re: Automatic Moving object. - gta-mikezz - 27.06.2009

https://sampwiki.blast.hk/wiki/Automatic_Gates


Re: Automatic Moving object. - MarqueZ92 - 27.06.2009

Quote:
Originally Posted by gta-mikezz
Thanks, but thats not exactly what i wanted. I want a timer in it.


Re: Automatic Moving object. - Moustafa - 27.06.2009

Oh i think i know it, wait until i edit this post..!


Re: Automatic Moving object. - MarqueZ92 - 28.06.2009

Quote:
Originally Posted by Moustafa
Oh i think i know it, wait until i edit this post..!
Okay, thanks mustafa. Are you turkish?


Re: Automatic Moving object. - Grim_ - 28.06.2009

Something like this
pawn Код:
//top of script
forward ClosePoll();

//onplayercommandtext
if(strcmp(cmdtext, "/paytoll", true) == 0)
{
  if(GetPlayerMoney(playerid) >= /*Money Amount*/)
  {
   MoveObject(/*opened pos*/);
   SetTimer("ClosePoll", 20000, 0);
   return 1;
  }
  else return SendClientMessage(playerid, color, "Not enough money);
}

//below main()
public ClosePoll()
{
  MoveObject(/*closed pos*/);
}



Re: Automatic Moving object. - MarqueZ92 - 28.06.2009

I put:

Quote:

public CloseTollA() (I got 4 Tolls, A-D)
{
MoveObject(goldentolla, -2672.407227, 1284.912354, 54.591599, 1.500000);
}

instead of

Quote:

public ClosePoll()
{
MoveObject(/*closed pos*/);
}

And got those Errors:

Quote:

C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(165 : warning 235: public function lacks forward declaration (symbol "CloseTollA")
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1707) : error 004: function "CrimProxDetector" is not implemented
C:\Users\Pwnz0rr\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1711) : error 004: function "CrimProxDetector" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1715) : error 004: function "CrimProxDetector" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1719) : error 004: function "CrimProxDetector" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1723) : error 004: function "CrimProxDetector" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1727) : error 004: function "CrimProxDetector" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1731) : error 004: function "CrimProxDetector" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1735) : error 004: function "CrimProxDetector" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1739) : error 004: function "CrimProxDetector" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1743) : error 004: function "CrimProxDetector" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1747) : error 004: function "CrimProxDetector" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1763) : error 004: function "BestPlayer" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1769) : error 004: function "BestPlayer" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1774) : error 004: function "BestPlayer" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1779) : error 004: function "DMPlayer" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1785) : error 004: function "DMPlayer" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1791) : error 004: function "DMPlayer" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1797) : error 004: function "RaceSpec" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1803) : error 004: function "RaceSpec" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1809) : error 004: function "RaceSpec" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1815) : error 004: function "PenDelay" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1821) : error 004: function "PenDelay" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1827) : error 004: function "PenDelay" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1833) : error 004: function "SpeedDelay" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1839) : error 004: function "SpeedDelay" is not implemented
C:\Users\Pwnz0r\Desktop\GTA StrikerZ Server\GTA StrikerZ Server\gamemodes\PENSF.pwn(1845) : error 004: function "SpeedDelay" is not implemented

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.




Re: Automatic Moving object. - Grim_ - 28.06.2009

To fix the warning: : warning 235: public function lacks forward declaration (symbol "CloseTollA")
pawn Код:
//above main()
forward CloseTollA();
The rest are errors from your script itself.


Re: Automatic Moving object. - MarqueZ92 - 28.06.2009

Quote:
Originally Posted by Swift_
To fix the warning: : warning 235: public function lacks forward declaration (symbol "CloseTollA")
pawn Код:
//above main()
forward CloseTollA();
The rest are errors from your script itself.
The Errors gone after i removed the Code you gave me. :/


Re: Automatic Moving object. - Grim_ - 28.06.2009

Then you forgot a bracket or something, because as you know, the code I gave you never uses those functions.