SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 20/10/2009, 01:10 PM   #1
Danikov
Big Clucker
 
Join Date: Oct 2009
Posts: 143
Reputation: 0
Default Auto Gates

i did the next thing for Auto Gates
Code:
public CheckGate()
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(!IsPlayerConnected(i)) continue;
    if(PlayerToPoint(10.0, i, 213.880005, 1875.686768, 10.506058) && OpenGate[i] == 0)
    {
      MoveObject(c_gate, 213.882446, 1875.694214, 14.031004);
      OpenGate[i] = 1;
    }
    else if(!PlayerToPoint(10.0, i, 213.880005, 1875.686768, 10.506058) && OpenGate[i] == 1)
    {
      MoveObject(c_gate, 213.880005, 1875.686768, 10.506058);
      OpenGate[i] = 0;
    }
  }
}
and i get this after compling

Code:
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51.pwn(243) : warning 202: number of arguments does not match definition
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51.pwn(248) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.
Help please ?
Danikov is offline  
Old 20/10/2009, 01:14 PM   #2
MB@
Huge Clucker
 
Join Date: Jul 2009
Posts: 203
Reputation: 1
Default Re: Auto Gates

Code:
public CheckGate()
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(!IsPlayerConnected(i)) continue;
    if(PlayerToPoint(10.0, i, 213.880005, 1875.686768, 10.506058) && OpenGate[i] == 0)
    {
      c_gate = MoveObject(213.882446, 1875.694214, 14.031004);
      OpenGate[i] = 1;
    }
    else if(!PlayerToPoint(10.0, i, 213.880005, 1875.686768, 10.506058) && OpenGate[i] == 1)
    {
      c_gate = MoveObject(213.880005, 1875.686768, 10.506058);
      OpenGate[i] = 0;
    }
  }
}

Uum try this
MB@ is offline  
Old 20/10/2009, 01:16 PM   #3
Danikov
Big Clucker
 
Join Date: Oct 2009
Posts: 143
Reputation: 0
Default Re: Auto Gates

LOL I GET MORE WARNING

Code:
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51.pwn(243) : warning 213: tag mismatch
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51.pwn(243) : warning 202: number of arguments does not match definition
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51.pwn(243) : warning 202: number of arguments does not match definition
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51.pwn(248) : warning 213: tag mismatch
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51.pwn(248) : warning 202: number of arguments does not match definition
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51.pwn(248) : warning 202: number of arguments does not match definition
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51.pwn(249) : warning 217: loose indentation
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\A51.pwn(248) : warning 204: symbol is assigned a value that is never used: "c_gate"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


8 Warnings.
Danikov is offline  
Old 20/10/2009, 01:17 PM   #4
Danikov
Big Clucker
 
Join Date: Oct 2009
Posts: 143
Reputation: 0
Default Re: Auto Gates

But its fixable
Danikov is offline  
Old 20/10/2009, 01:21 PM   #5
Danikov
Big Clucker
 
Join Date: Oct 2009
Posts: 143
Reputation: 0
Default Re: Auto Gates

((SORRY FOR THIS BUMP))

I Managed to fix only 1 warning the rest i dont know how =/
Can someone else help me ?
Danikov is offline  
Old 20/10/2009, 01:29 PM   #6
thuron
Huge Clucker
 
Join Date: May 2008
Posts: 215
Reputation: 0
Default Re: Auto Gates

Code:
public CheckGate()
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(!IsPlayerConnected(i)) continue;
    if(PlayerToPoint(10.0, i, 213.880005, 1875.686768, 10.506058) && OpenGate[i] == 0)
    {
      MoveObject(c_gate, 213.882446, 1875.694214, 14.031004,5); //You didn't add the speed. See the 5 as last.
      OpenGate[i] = 1;
    }
    else if(!PlayerToPoint(10.0, i, 213.880005, 1875.686768, 10.506058) && OpenGate[i] == 1)
    {
      MoveObject(c_gate, 213.880005, 1875.686768, 10.506058,5); //You didn't add the speed. See the 5 as last.
      OpenGate[i] = 0;
    }
  }
}
thuron is offline  
Old 20/10/2009, 01:31 PM   #7
Danikov
Big Clucker
 
Join Date: Oct 2009
Posts: 143
Reputation: 0
Default Re: Auto Gates

Thx
Danikov is offline  
Old 20/10/2009, 01:32 PM   #8
thuron
Huge Clucker
 
Join Date: May 2008
Posts: 215
Reputation: 0
Default Re: Auto Gates

np
thuron is offline  
Old 20/10/2009, 01:35 PM   #9
Danikov
Big Clucker
 
Join Date: Oct 2009
Posts: 143
Reputation: 0
Default Re: Auto Gates

And one last thing the gate is not opening cause i still didnt put any changes in the radius could you help me,i dont know what parameters to do
Danikov is offline  
Old 20/10/2009, 01:37 PM   #10
thuron
Huge Clucker
 
Join Date: May 2008
Posts: 215
Reputation: 0
Default Re: Auto Gates

try it like this:

Code:
public CheckGate()
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(!IsPlayerConnected(i)) continue;
    if(PlayerToPoint(10.0, i, 213.880005, 1875.686768, 10.506058) && OpenGate[i] == 0)
    {
      MoveObject(c_gate, 213.882446, 1875.694214, 14.031004,5); //You didn't add the speed. See the 5 as last.
      OpenGate[i] = 1;
    }
    else if(!PlayerToPoint(10.0, i, 213.880005, 1875.686768, 10.506058) && OpenGate[i] == 1)
    {
      OpenGate[i] = 0;
    }
  }
}
thuron is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] [INC] t-Auto Gates Toad Includes 131 13/04/2014 09:01 AM
LVPD Gates v2 Now with Auto Gates!! SlashPT Filterscripts 37 16/03/2010 03:59 PM
auto gates need cssbart Help Archive 8 18/02/2010 01:45 PM
Auto gates ;) GaGlets(R) Help Archive 7 25/11/2009 04:01 PM
[HELP] t-Auto Gates joeri55 Help Archive 2 02/06/2009 08:50 AM


All times are GMT. The time now is 10:59 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.