19.07.2010, 07:18
Okay i added these gates in.... And there are no Warning/Errors In the Complier Log when the script is compiled. I have plugged in my cordinet but yet when i walk to the gate there is no movement. And also i made sure the Faction i was in was set to type 1.
top of script
Actual Coding
top of script
Код:
forward LSPDFGateTimer(playerid);//lspd front gate forward LSPDGGateTimer(playerid);//lspd garage gate forward LSPDFGateClose();//lspd front gate timer forward LSPDGGateClose();//lspd garge gate timer //==================================================
Код:
public LSPDFGateTimer(playerid)//lspd front entrance autogates
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 35, 1541.4320,-1627.3322,13.3828))
{
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
{
MoveObject(LSPDFRONT,1542.3559570313, -1627.8432617188, 10.699661254883, 8.0);
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Please be patient while the gate to this facility is opening.");
SetTimer("LSPDFGateClose", 1000, 0);
}
}
}
return 1;
}
public LSPDFGateClose()
{
MoveObject(LSPDFRONT, 1542.3559570313, -1627.8432617188, 14.099655151367, 8);
return 1;
}//end of lspd front gate
public LSPDGGateTimer(playerid)//lspd garage
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 35, 1588.0067 , -1636.1232 , 13.3828))
{
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
{
MoveObject(LSPDGARAGE, 1592.837890625, -1638.1611328125, 9.7574806213379, 8.0);
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Please be patient while the gate to this facility is opening.");
SetTimer("LSPDGateClose", 1000, 0);
}
}
}
return 1;
}
public LSPDGGateClose()
{
MoveObject(LSPDGARAGE, 1592.837890625, -1638.1611328125, 9.7574806213379, 8.0);
return 1;
}//end of lspd garage


