10.12.2011, 17:34
I created a gate and made it so you press "F" it opens, but it only open if you hold F.
Код:
if(newkeys & 16)// at lv houses { if(IsPlayerInRangeOfPoint(playerid, 2.0, 1574.45000000,666.05000000,11.31000000))// { if(checkgate[playerid] == 0) { MoveObject(housegate, 1567.17000000,663.53000000,6.37000000, 2.0); GameTextForPlayer(playerid, "Gate ~g~opening", 5000, 6); PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0); ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 10.0, 0, 0, 0, 0, 0); checkgate[playerid]=1; } } } else { if(checkgate[playerid] == 1) { MoveObject(housegate, 1567.18000000,663.51000000,12.47000000, 2.0); GameTextForPlayer(playerid, "Gate ~r~closing", 5000, 6); checkgate[playerid]=0; PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0); ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 10.0, 0, 0, 0, 0, 0); } } return 1; }