Habe diese Wie folgt bei OnGameModeInit erstellt:
fdtor[0] = SetObjectMaterial(CreateObject(2957, -257.95999, 1210.00000, 20.37000, 0.00000, 0.00000, 0.00000), 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0xFFFFFFFF);
fdtor[1] = SetObjectMaterial(CreateObject(2957, -251.85001, 1210.00000, 20.37000, 0.00000, 0.00000, 0.00000), 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0xFFFFFFFF);
fdtor[2] = SetObjectMaterial(CreateObject(2957, -245.74001, 1210.00000, 20.37000, 0.00000, 0.00000, 0.00000), 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0xFFFFFFFF);
Und dann diesen Code geschrieben wenn man die Taste H Ingame drückt.
if(IsPlayerInRangeOfPoint(playerid,6,-257.95999, 1210.00000, 20.37000))
{
if(GetPVarInt(Server1,"fdtor1") == 0)
{
MoveObject(fdtor[0],-257.95999, 1210.00000, 20.37000-3.5,0.50);
SetPVarInt(Server1,"fdtor1",1);
SendClientMessage(playerid,GRÜN,"Fire Department Tor 1 geöffnet.");
return 1;
}
if(GetPVarInt(Server1,"fdtor1") == 1)
{
MoveObject(fdtor[0],-257.95999, 1210.00000, 20.37000,0.50);
SetPVarInt(Server1,"fdtor1",0);
SendClientMessage(playerid,GRÜN,"Fire Department Tor 1 geschlossen.");
return 1;
}
}
if(IsPlayerInRangeOfPoint(playerid,6,-251.85001, 1210.00000, 20.37000))
{
if(GetPVarInt(Server1,"fdtor2") == 0)
{
MoveObject(fdtor[1],-251.85001, 1210.00000, 20.37000-3.5,0.50);
SetPVarInt(Server1,"fdtor2",1);
SendClientMessage(playerid,GRÜN,"Fire Department Tor 2 geöffnet.");
return 1;
}
if(GetPVarInt(Server1,"fdtor2") == 1)
{
MoveObject(fdtor[1],-251.85001, 1210.00000, 20.37000,0.50);
SetPVarInt(Server1,"fdtor2",0);
SendClientMessage(playerid,GRÜN,"Fire Department Tor 2 geschlossen.");
return 1;
}
}
if(IsPlayerInRangeOfPoint(playerid,6,-245.74001, 1210.00000, 20.37000))
{
if(GetPVarInt(Server1,"fdtor3") == 0)
{
MoveObject(fdtor[2],-245.74001, 1210.00000, 20.37000-3.5,0.50);
SetPVarInt(Server1,"fdtor3",1);
SendClientMessage(playerid,GRÜN,"Fire Department Tor 3 geöffnet.");
return 1;
}
if(GetPVarInt(Server1,"fdtor3") == 1)
{
MoveObject(fdtor[2],-245.74001, 1210.00000, 20.37000,0.50);
SetPVarInt(Server1,"fdtor3",0);
SendClientMessage(playerid,GRÜN,"Fire Department Tor 3 geschlosen.");
return 1;
}
}
Warum gehen nun die Tore nicht runter ?