Morgeeen.
Und zwar folgendes..
Ich wollte Mehrere tore (derzeit sind es 3) mit /tor bediehnen. sprich /tor = auf /tor = zu.
Das Grün Makierte geht Vollkommen ohne probleme.
ocmd:tor(playerid,params[])
{
new frak = GetPVarInt(playerid,"Fraktion");
if(frak == 1||frak == 2||frak == 11||frak == 13||frak == 14||frak == 15)
{
/*if(Ator == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,20,1544.3000488281, -1626.5, 13.199999809265))return 1;
MoveObject(ator,1544.3000488281, -1626.5, 13.199999809265-10,5);
Ator = 1;
}
else
{
if(!IsPlayerInRangeOfPoint(playerid,20,1544.3000488281, -1626.5, 13.199999809265))return 1;
MoveObject(ator,1544.3000488281, -1626.5, 13.199999809265,5);
Ator = 0;
}*/
if(Btor == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,20,209.89999389648, 1875.5, 12.300000190735))return 1;
MoveObject(btor,209.89999389648, 1875.5, 12.300000190735-10,5);
Btor = 1;
}
else
{
if(!IsPlayerInRangeOfPoint(playerid,20,209.89999389648, 1875.5, 12.300000190735))return 1;
MoveObject(btor,209.89999389648, 1875.5, 12.300000190735,5);
Btor = 0;
}
if(Ctor == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,20,96.800003051758, 1920.5, 19))return 1;
MoveObject(ctor,96.800003051758, 1920.5, 19,-10,5);
Ctor = 1;
}
else
{
if(!IsPlayerInRangeOfPoint(playerid,20,96.800003051758, 1920.5, 19))return 1;
MoveObject(ctor,96.800003051758, 1920.5, 19,5);
Ctor = 0;
}
}
return 1;
}
Definirung der Tore:
new ator;
new btor;
new ctor;
new Ator;
new Btor;
new Ctor;
und die Objekte:
ator = CreateObject(979, 1544.3000488281, -1626.5, 13.199999809265, 0, 0, 90);
btor = CreateObject(976, 209.89999389648, 1875.5, 12.300000190735, 0, 0, 0);
ctor = CreateObject(989, 96.800003051758, 1920.5, 19, 284, 89.999816894531, 268.24975585938);
nur btor und ctor gehen nicht.. ich hab jetzt 30 mins rumgefuchtelt, und weiß nicht weißer