Auto Gates - 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: Auto Gates (
/showthread.php?tid=103532)
Auto Gates -
Danikov - 20.10.2009
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

?
Re: Auto Gates -
MB@ - 20.10.2009
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
Re: Auto Gates -
Danikov - 20.10.2009
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.
Re: Auto Gates -
Danikov - 20.10.2009
But its fixable
Re: Auto Gates -
Danikov - 20.10.2009
((SORRY FOR THIS BUMP))
I Managed to fix only 1 warning the rest i dont know how =/
Can someone else help me

?
Re: Auto Gates -
thuron - 20.10.2009
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;
}
}
}
Re: Auto Gates -
Danikov - 20.10.2009

Thx
Re: Auto Gates -
thuron - 20.10.2009
np
Re: Auto Gates -
Danikov - 20.10.2009
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
Re: Auto Gates -
thuron - 20.10.2009
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;
}
}
}