Automatic Moving object.
#1

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

https://sampwiki.blast.hk/wiki/Automatic_Gates
Reply
#3

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

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

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

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*/);
}
Reply
#7

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.

Reply
#8

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.
Reply
#9

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. :/
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)