Hallo,
ich woltle paar schranken machen und habe so gemacht
forward KH1();
forward KH2();
forward KH3();
forward KH4();
new Gate1;
new Gate2;
new Gate3;
new Gate4;
Gate1 = CreateObject(968, -2562.931640625, 579.763671875, 14.194566726685, 0, 270.08624267578, 0);//Schranke 1 ZU
Gate2 = CreateObject(968, -2603.451171875, 578.5966796875, 14.228128433228, 0, 270, 0);//Schranke 2 ZU
Gate3 = CreateObject(968, -2670.4091796875, 579.2392578125, 14.103130340576, 0, 88.680023193359, 0);//Schranke 3 ZU
Gate4 = CreateObject(968, -2608.927734375, 693.83203125, 27.637502670288, 0, 89.725158691406, 0);//Schranke 4 ZU
if(strcmp(cmdtext, "/tor", true) == 0)
{
if(PlayerToPoint(20.0, playerid, -2562.931640625, 579.763671875, 14.194566726685))
{
SetObjectRot(Gate1, 0, 0, 0);
SetTimer("KH1",5000,0);
return 1;
}
}
else if(PlayerToPoint(20.0, playerid, -2603.451171875, 578.5966796875, 14.228128433228))
{
{
SetObjectRot(Gate2, 0, 0, 0);
SetTimer("KH2",5000,0);
return 1;
}
}
else if(PlayerToPoint(20.0, playerid, -2670.4091796875, 579.2392578125, 14.103130340576))
{
{
SetObjectRot(Gate3, 0, 0, 0);
SetTimer("KH3",5000,0);
return 1;
}
}
else if(PlayerToPoint(20.0, playerid, -2608.927734375, 693.83203125, 27.637502670288))
{
{
SetObjectRot(Gate4, 0, 0, 0);
SetTimer("KH4",5000,0);
return 1;
}
}
return 1;
}
public KH1()
{
SetObjectRot(Gate1, 0, 270.08624267578, 0);
return 1;
}
public KH2()
{
SetObjectRot(Gate2, 0, 270, 0);
return 1;
}
public KH3()
{
SetObjectRot(Gate3, 0, 88.680023193359, 0);
return 1;
}
public KH4()
{
SetObjectRot(Gate4, 0, 89.725158691406, 0);
return 1;
}
Aber es Funktioniert Nicht ..
und ja ich bin in dem Range
lg Marci