public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == (KEY_SPRINT))
{
if(PlayerToPoint(10, playerid, 321.276489, -1488.561523, 25.355247) && PlayerInfo[playerid][pMember] == 7||PlayerInfo[playerid][pLeader] == 7&& PlayerToPoint(10, playerid, 321.276489, -1488.561523, 25.355247))
{
MoveObject(SStor,321.400757, -1488.661743, 28.782866, 3.5);
SetTimer("SStor1", 5000, 0);
PlayerPlaySound(playerid, 1002 , 0.0, 0.0, 0.0);
}
else if(PlayerToPoint(10, playerid, 1539.519531, -1628.430786, 14.203618) && PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pLeader] == 7||PlayerInfo[playerid][pMember] == 7||PlayerInfo[playerid][pLeader] == 3||PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 2||PlayerInfo[playerid][pMember] == 2&& PlayerToPoint(10, playerid, 1539.519531, -1628.430786, 14.203618))
{
MoveObject(PDtor,1539.522217, -1623.206055, 14.203618, 3.5);
SetTimer("PDtor1", 5000, 0);
PlayerPlaySound(playerid, 1002 , 0.0, 0.0, 0.0);
}
}
Das Tor öffnet sich folgender maßen:
- Egal von wo.
- Wenn ich in einem Fahrzeug bin und fahre.
Es soll sich öffnen:
- Wenn ich im Umkreis die Sprint Taste drücke.
Sehe da im Code eig keinen Fehler? Oder doch?