Moin,
das mit dem ersten habe ich hin bekommen nun hänge ich am 2. fest.
Habe es bisher so gemacht.
new fbitor2;
new fbitorvar2;
fbitor2 = CreateObject(971, 365, -1469.5999755859, 31.39999961853, 0, 0, 217.74829101563);
if(strcmp(cmd,"/fbitor2",true) == 0)
{
if(IsACop(playerid))
{
if(fbitorvar2 == 0)
{
MoveObject(fbitor2, -1469.5999755859, 31.39999961853, 0, 0, 217.74829101563-10,5.0);
SendClientMessage(playerid, COLOR_GREEN, "Tor geöffnet");
PlaySoundForPlayer(playerid,1035);
SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
fbitorvar = 1;
}
else
{
MoveObject(fbitor2, -1469.5999755859, 31.39999961853, 0, 0, 217.74829101563,5.0);
SendClientMessage(playerid, COLOR_RED, "Tor geschlossen");
PlaySoundForPlayer(playerid,1035);
SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
fbitorvar2 = 0;
}
}
else SendClientMessage(playerid,COLOR_RED," Du bist kein Beamter");
return 1;
}
so aber wenn ich ingame bin und diesen Befehl eingebe Passiert nix es geht nicht runter und mein altes tor auch nicht also dieses tor hier
if(strcmp(cmd,"/fbitor",true) == 0)
{
if(IsACop(playerid))
{
if(fbitorvar == 0)
{
MoveObject(fbitor, 310.89999389648, -1554.9000244141, 31.39999961853-10,5.0);
SendClientMessage(playerid, COLOR_GREEN, "Tor geöffnet");
PlaySoundForPlayer(playerid,1035);
SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
fbitorvar = 1;
}
else
{
MoveObject(fbitor, 310.89999389648, -1554.9000244141, 31.39999961853,5.0);
SendClientMessage(playerid, COLOR_RED, "Tor geschlossen");
PlaySoundForPlayer(playerid,1035);
SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
fbitorvar = 0;
}
}
else SendClientMessage(playerid,COLOR_RED," Du bist kein Beamter");
return 1;
}