Auto Gates
#1

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 © 1997-2006, ITB CompuPhase


2 Warnings.
Help please ?
Reply
#2

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
Reply
#3

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 © 1997-2006, ITB CompuPhase


8 Warnings.
Reply
#4

But its fixable
Reply
#5

((SORRY FOR THIS BUMP))

I Managed to fix only 1 warning the rest i dont know how =/
Can someone else help me ?
Reply
#6

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

Thx
Reply
#8

np
Reply
#9

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
Reply
#10

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;
    }
  }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)