So i'm trying to make multiple gates that work under the same command, But completely different gates. E.G i have a fbi gate, and some police gates.
I want them to all be able to work with the command /gate as long as they are close enough.
Код:
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#if defined FILTERSCRIPT
#define ORANGE 0xF97804FF
#endif
enum PLAYERS
{
group
}
new Player[MAX_PLAYERS][PLAYERS];
new Gate[4];//0 counts as 1
new bool:OPEN1;
new bool:OPEN2;
new bool:OPEN3;
new bool:OPEN4;
public OnFilterScriptInit()
{
Gate[0] = CreateObject(989,1428.6284, 241.9930, 20.3020,359.2969, 0.7000, 172.9962, 0.0);
Gate[1] = CreateObject(989,-1701.4600, 687.8000, 24.7900, 0, 0, 0.0);
Gate[2] = CreateObject(10184,-1572.2261, 658.6411, 7.0000, 0, 0, 0);
Gate[3] = CreateObject(-2436.9724, 495.3655, 29.6797, 0, 0, 0);
return 1;
}
CMD:gate(playerid,params[])
{
if(!IsPlayerInRangeOfPoint(playerid,10,1428.6456, 242.0033, 20.3020))
{
if(Player[playerid][group] == 9)
{
if(OPEN1 == false)
{
MoveObject(Gate[0],1428.6456, 242.0033, 20.3020,4);
OPEN1 = true;
}
if(OPEN1 == true)
{
MoveObject(Gate[0],1426.5259, 237.4716, 20.3020,4);
OPEN1 = false;
}
}
}
if(!IsPlayerInRangeOfPoint(playerid,10,1428.6456, 242.0033, 20.3020))
{
else if(Player[playerid][group] == 1)
{
if(OPEN2 == false)
{
MoveObject(Gate[1],-1701.4600, 687.8000, 24.7900,4);
OPEN2 = true;
}
if(OPEN2 == true)
{
MoveObject(Gate[1],-1701.4441, 687.7974, 24.7900,4);
OPEN2 = false;
}
}
}
if(!IsPlayerInRangeOfPoint(playerid,10,1428.6456, 242.0033, 20.3020))
{
else if(Player[playerid][group] == 1)
{
if(OPEN3 == false)
{
MoveObject(Gate[2],-1572.2261, 658.6411, 7.0000,4);
OPEN3 = true;
}
if(OPEN3 == true)
{
MoveObject(Gate[2],-1572.4937, 657.3914, 7.0000,4);
OPEN3 = false;
}
}
}
if(!IsPlayerInRangeOfPoint(playerid,10,1428.6456, 242.0033, 20.3020))
{
else if(Player[playerid][group] == 7)
{
if(OPEN4 == false)
{
MoveObject(Gate[3],-2436.8125, 495.4688, 29.6797,4);
OPEN3 = true;
}
if(OPEN4 == true)
{
MoveObject(Gate[3],-2436.9724, 495.3655, 29.6797,4);
OPEN3 = false;
}
}
}
return 1;
}
Код:
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Untitled.pwn(28) : warning 213: tag mismatch
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Untitled.pwn(28) : warning 202: number of arguments does not match definition
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Untitled.pwn(52) : error 029: invalid expression, assumed zero
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Untitled.pwn(52) : warning 215: expression has no effect
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Untitled.pwn(52) : error 001: expected token: ";", but found "if"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Untitled.pwn(68) : error 029: invalid expression, assumed zero
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Untitled.pwn(68) : warning 215: expression has no effect
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Untitled.pwn(68) : error 001: expected token: ";", but found "if"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Untitled.pwn(84) : error 029: invalid expression, assumed zero
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Untitled.pwn(84) : warning 215: expression has no effect
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Untitled.pwn(84) : error 001: expected token: ";", but found "if"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Untitled.pwn(98) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Errors.
I couldn't find any filter scripts for dynamic gates and I'm only a beginner, thanks for your time.
Can you highlight the lines that are getting errors? Or post the lines for us?