Automatic Gate Problem
#1

I used this guide to make my gate: http://forum.sa-mp.com/index.php?topic=54701.0

After it was compiled I got this

After I did this and Compiled it I got:
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1154) : error 052: multi-dimensional arrays must be fully initialized
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1381) : error 001: expected token: ";", but found "-identifier-"
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1827) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1831) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1843) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1847) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1851) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1855) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1859) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1863) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1867) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1879) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1883) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1887) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1891) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1895) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1907) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1911) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1915) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1927) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(1931) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(2177) : error 004: function "SendIRCMessage" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(2199) : error 004: function "SendIRCMessage" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(250 : error 004: function "OOCOff" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(2520) : error 004: function "OOCOff" is not implemented
C:\Documents and Settings\Hossein\My Documents\GTA\Server\gamemodes\gf.pwn(2540) : error 004: function "OOCOff" is not implemented

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.

My code is:

public isPlayerInArea()
{
new Float:X, Float:Y, Float:Z; //We use this to store player position
for(new i=0; i < MAX_PLAYERS; i++) //This line defines a name for all player, the name is "i"
{
GetPlayerPos(i, X, Y, Z); //Here we are storing the player position on the variables X, Y, and Z defined previously
if (X <= 270.2269 && X >= 252.8544 && Y <= -1201.8755 && Y >= ,-1257.3530?)
/* This line is the important one!. Here, is where you change those numbers, by the ones
you get from the /pos command. As you can see, those coordinates, are only the X and Y ones, the Z
doesn't matter*/

{
if( GetPlayerTeam(i) == TEAM_ADMIN) // tells the script to open the gate to Team Defense only.
{
MoveObject(maingate, 261.605, -1231.56, 63.8128, 3); // MoveObject(ObjectID, X, Y, Z, speed); - Object id is the "New"
}
else // else means that if nothing is in it, perform this action:
{
MoveObject(maingate, 261.605, -1231.56, 74.3128, 3); // This will close the gate
}
}
return 1;
Reply
#2

Use this guide: https://sampwiki.blast.hk/wiki/Automatic_Gates
It works perfect.
Reply
#3

Quote:
Originally Posted by Stevo127
Use this guide: https://sampwiki.blast.hk/wiki/Automatic_Gates
It works perfect.
Omg! Did you know that I was going to send him this link.. Haha!

Anyways, Follow that guide, And everything should be going good
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)