Automatic 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: Automatic Gates (
/showthread.php?tid=114045)
Automatic Gates -
xLowrider - 17.12.2009
I was scripting in some gates, This is my frist time attempting to do it, I know why i'm getting these warnings, i just don't know how to get rid of them.
Код:
C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(2321) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(2326) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
And on those lines i have this.
Код:
public CheckGate()
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(!IsPlayerConnected(i)) continue;
if(PlayerToPoint(10.0, i, 1011.927734, -1130.173828, 24.334110) && OpenGate[i] == 0)
{
MoveObject(c_gate, 1071.103882, -1130.173828, 24.334110);
OpenGate[i] = 1;
}
else if(!PlayerToPoint(10.0, i, 1011.927734, -1130.173828, 24.334110) && OpenGate[i] == 1)
{
MoveObject(c_gate, 1011.927734, -1130.173828, 24.334110);
OpenGate[i] = 0;
}
}
}
Re: Automatic Gates -
[NYRP]Mike. - 17.12.2009
your MoveObjects gate should have a speed on them like this:
pawn Код:
MoveObject(c_gate, 1071.103882, -1130.173828, 24.334110, 3.0);
Re: Automatic Gates -
Lajko1 - 17.12.2009
ye where u ahve ''MoveObject'' u forgot the speed
MoveObject(c_gate, 1071.103882, -1130.173828, 24.334110, 3.0);
explain:
MoveObject(ur object that u create under on gamemode init, X , Y , Z ,speed when will start object moving);