28.07.2010, 10:24
Okay im using YSI and it's loading the wrong object id and i have looked at the id over and over agian and it's right. Maybe there is somthing wrong with my code please look.
pawn Код:
// Forwards
forward GateCheck(playerid);
new LSPDFRONT;
new LSPDGARAGE;
new Fire1;
new Fire2;
new Fire3;
new DHS;
pawn Код:
public OnGameModeInit()
{
LSPDFRONT = CreateDynamicObject(7657,1542.53417969,-1628.02185059,14.09965515,0.00000000,0.00000000,268.95001221);
LSPDGARAGE = CreateDynamicObject(3055,1588.47082520,-1637.76013184,14.60885429,0.00000000,0.00000000,359.26498413); //
Fire1 = CreateDynamicObject(3055,1761.18432617,-1700.25061035,13.86814690,0.00000000,0.00000000,269.92495728); //
Fire2 = CreateDynamicObject(3055,1761.20532227,-1691.42797852,13.86814690,0.00000000,0.00000000,269.92309570); //
Fire3 = CreateDynamicObject(10671,1804.63793945,-1721.42211914,14.40002155,0.00000000,0.00000000,268.79998779); //
DHS = CreateDynamicObject(7657,135.36764526,1996.19384766,20.19108009,0.00000000,0.00000000,184.04498291); //
SetTimer("GateCheck",1000,1);
djson_GameModeInit();
pawn Код:
public GateCheck(playerid)
{
new LSPDFRONTOpen;
new LSPDGARAGEOpen;
new Fire1Open;
new Fire2Open;
new Fire3Open;
new DHSOpen;
{
if(IsPlayerInRangeOfPoint(playerid, 20.0,1542.5922851563, -1627.6103515625 , 14.099655151367))LSPDFRONTOpen=1;
if(IsPlayerInRangeOfPoint(playerid, 20.0,1589.2553710938, -1638.0535888672, 14.61079120636))LSPDGARAGEOpen=1;
if(IsPlayerInRangeOfPoint(playerid, 10.0,1761.1843261719, -1700.2506103516, 13.868146896362))Fire1Open=1;
if(IsPlayerInRangeOfPoint(playerid, 10.0,1761.2053222656, -1691.4279785156, 13.868146896362))Fire2Open=1;
if(IsPlayerInRangeOfPoint(playerid, 10.0,1804.6379394531, -1721.4221191406, 14.40002155304))Fire3Open=1;
if(IsPlayerInRangeOfPoint(playerid, 20.0,135.36764526367, 1996.1938476563, 20.191080093384))DHSOpen=1;
}
//LSPD FRONT
if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4)
if(LSPDFRONTOpen)MoveObject(LSPDFRONT,1542.5922851563, -1627.6103515625, 8.099655151367,5); //These are the coordinates of the gate if it were in it's opened state.
else MoveObject(LSPDFRONT,1542.5922851563, -1627.6103515625, 14.099655151367,5);//These are the coordinates of the gate if it were in it's closed state.
//LSPD GARAGE
if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4)
if(LSPDGARAGEOpen)MoveObject(LSPDGARAGE,1589.2553710938, -1638.0535888672, 8.61079120636,5); //These are the coordinates of the gate if it were in it's opened state.
else MoveObject(LSPDGARAGE, 1589.2553710938, -1638.0535888672, 14.61079120636,5);//These are the coordinates of the gate if it were in it's closed state.
//Fire1
if(Groups[Player[playerid][Group]][CommandTypes] == 3)
if(Fire1Open)MoveObject(Fire1,1761.1843261719, -1700.2506103516, 8.868146896362,5); //These are the coordinates of the gate if it were in it's opened state.
else MoveObject(Fire1,1761.1843261719, -1700.2506103516, 13.868146896362,5);//These are the coordinates of the gate if it were in it's closed state.
//Fire2
if(Groups[Player[playerid][Group]][CommandTypes] == 3)
if(Fire2Open)MoveObject(Fire2,1761.2053222656, -1691.4279785156, 8.868146896362,5); //These are the coordinates of the gate if it were in it's opened state.
else MoveObject(Fire2,1761.2053222656, -1691.4279785156, 13.868146896362,5);//These are the coordinates of the gate if it were in it's closed state.
//Fire3
if(Groups[Player[playerid][Group]][CommandTypes] == 3)
if(Fire3Open)MoveObject(Fire3, 1804.6379394531, -1721.4221191406, 8.40002155304,5); //These are the coordinates of the gate if it were in it's opened state.
else MoveObject(Fire3, 1804.6379394531, -1721.4221191406, 14.40002155304,5);//These are the coordinates of the gate if it were in it's closed state.
//DHS
if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4)
if(DHSOpen)MoveObject(DHS,135.36764526367, 1996.1938476563, 14.191080093384,5); //These are the coordinates of the gate if it were in it's opened state.
else MoveObject(DHS, 135.36764526367, 1996.1938476563, 20.191080093384,5);//These are the coordinates of the gate if it were in it's closed state.
}