Я создал так открываются всё норм
[offtop]сначала в Forward
forward rmgate(); потом в New
new rmgate;
new OpenGate[MAX_PLAYERS];
потом в public OnGameModeInit()
rmgate = CreateObject(980,-2655.201,-221.333,6.012,0.0,0.0,0.0);//Ворота РМ
SetTimer("rmGate", 500, true);
Ну и создаю public
public rmGate()
public rmGate()
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(!IsPlayerConnected(i)) continue;
if (PlayerInfo[i][pLeader] == 12 || PlayerInfo[i][pMember] == 12)
{
if(PlayerToPoint(10.0, i, -2655.201,-221.333,6.012) && OpenGate[i] == 0)
{
MoveObject(rmgate, -2644.139,-221.393,5.972,5.0);
OpenGate[i] = 1;
}
else if(!PlayerToPoint(10.0, i, -2655.201,-221.333,6.012) && OpenGate[i] == 1)
{
MoveObject(rmgate, -2655.201,-221.333,6.012,5.0);
OpenGate[i] = 0;
}
}
}
}
[/offtop]
И ищё одни
[offtop]сначала в Forward
forward SWATgate();
потом в New
new SWATgate;
потом в public OnGameModeInit()
SWATGate = CreateObject(980,1535.144,-1451.227,15.159,0.0,0.0,0.0);//SWAT ворота
SetTimer("SWATgate", 500, true);
Ну и создаю public
public SWATGate()
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(!IsPlayerConnected(i)) continue;
if (PlayerInfo[i][pLeader] == 19 || PlayerInfo[i][pMember] == 19)
{
if(PlayerToPoint(10.0, i, 1535.144,-1451.227,15.159) && OpenGate[i] == 0)
{
MoveObject(SWATGate, 1545.217,-1451.308,15.175,5.0);
OpenGate[i] = 1;
}
else if(!PlayerToPoint(10.0, i, 1535.144,-1451.227,15.159) && OpenGate[i] == 1)
{
MoveObject(SWATGate, 1535.144,-1451.227,15.159,5.0);
OpenGate[i] = 0;
}
}
}
}
И вот такие ошибки
E:\Юры\SERVEK333\SERVEK333\gamemodes\GF.pwn(320) : error 021: symbol already defined: "OpenGate"
E:\Юры\SERVEK333\SERVEK333\gamemodes\GF.pwn(9100) : error 076: syntax error in the expression, or invalid function call
E:\Юры\SERVEK333\SERVEK333\gamemodes\GF.pwn(35815) : warning 235: public function lacks forward declaration (symbol "SWATGate")
E:\Юры\SERVEK333\SERVEK333\gamemodes\GF.pwn(35824) : error 076: syntax error in the expression, or invalid function call
E:\Юры\SERVEK333\SERVEK333\gamemodes\GF.pwn(35829) : error 076: syntax error in the expression, or invalid function call
E:\Юры\SERVEK333\SERVEK333\gamemodes\GF.pwn(35835) : warning 203: symbol is never used: "SWATgate"
[/offtop]
Помогите с меня плюс
Добавлено (08.11.2009, 00:49)
---------------------------------------------
Делал всё по примеру http://samp-rus.com/forum/17-10815-1