Also möchte nen Timer reinhaben das das Tor nach 5 sec schliest ..
Aktuell siehts so aus:
So öffnet es:
ocmd:lspd(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,10,1584.6560058594, -1638.4405517578, 12.339740753174))
{
if(isPlayerInFrakt(playerid,1) ||isPlayerInFrakt(playerid,2) || isPlayerInFrakt(playerid,10) ||isPlayerInFrakt(playerid,11) ||isPlayerInFrakt(playerid,12))
{
MoveObject(tor0,1584.6560058594, -1638.4405517578, 12.3397407531741-10,5);
return 1;
}
return SendClientMessage(playerid,ROT,"Du bist nicht in der richtigen Fraktion.");
}
if(IsPlayerInRangeOfPoint(playerid,100,1584.6560058594, -1638.4405517578, 12.339740753174))
{
if(isPlayerInFrakt(playerid,1) ||isPlayerInFrakt(playerid,2) || isPlayerInFrakt(playerid,10) ||isPlayerInFrakt(playerid,11) ||isPlayerInFrakt(playerid,12))
{
MoveObject(tor0,1584.6560058594, -1638.4405517578, 12.339740753174-10,5);
return 1;
}
return SendClientMessage(playerid,ROT,"Du bist nicht in richtigen Fraktion.");
}
return SendClientMessage(playerid,ROT,"Nicht in der Nähe von einem Tor.");
}
So schliess es:
ocmd:lspdzu(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,100,1584.6560058594, -1638.4405517578, 12.339740753174))
{
if(isPlayerInFrakt(playerid,1) ||isPlayerInFrakt(playerid,2) || isPlayerInFrakt(playerid,10) ||isPlayerInFrakt(playerid,11) ||isPlayerInFrakt(playerid,12))
{
MoveObject(tor0,1584.6560058594, -1638.4405517578, 12.339740753174,5);
return 1;
}
return SendClientMessage(playerid,ROT,"Du bist nicht in der richtigen Fraktion!");
}
if(IsPlayerInRangeOfPoint(playerid,100,1584.6560058594, -1638.4405517578, 12.339740753174))
{
if(isPlayerInFrakt(playerid,1))
{
MoveObject(tor0,1584.6560058594, -1638.4405517578, 12.339740753174,5);
return 1;
}
return SendClientMessage(playerid,ROT,"Du bist nicht in der richtigen Fraktion!");
}
return SendClientMessage(playerid,ROT,"Nicht in der Nähe von einem Tor.");
}