JasperRieken Posted December 24, 2010 Posted December 24, 2010 (edited) I made the script it works fine but i want to make it just opening for me this is the script local gate4 = createObject(971,1539.0588378906,-1451.3624267578,15.952730178833,0,0,0) local gate5 = createObject(971,1530.3012695313,-1451.3624267578,15.952730178833,0,0,180) local marker4 = createMarker(1534.7189941406,-1451.9150390625,12.6328125,"cylinder",10,255,0,0,0) function openGate(hitPlayer) moveObject (gate4,1000,1545.0588378906,-1451.3624267578,15.952730178833) moveObject (gate5,1000,1523.3012695313,-1451.3624267578,15.952730178833) end addEventHandler("onClientMarkerHit",marker4,openGate) function closeGate(hitPlayer) moveObject (gate4,1000,1539.0588378906,-1451.3624267578,15.952730178833) moveObject (gate5,1000,1530.3012695313,-1451.3624267578,15.952730178833) end addEventHandler("onClientMarkerLeave",marker4,closeGate) If you can help me that would be nice Edited December 24, 2010 by Guest
Kenix Posted December 24, 2010 Posted December 24, 2010 I did not realize you want to do what only you can open the door?
JasperRieken Posted December 24, 2010 Author Posted December 24, 2010 yes i want to be able that only me can't open it not everyone els
[DKR]Jake Posted December 24, 2010 Posted December 24, 2010 I made the script it works fine but i want to make it just opening for me this is the script local gate4 = createObject(971,1539.0588378906,-1451.3624267578,15.952730178833,0,0,0) local gate5 = createObject(971,1530.3012695313,-1451.3624267578,15.952730178833,0,0,180) local marker4 = createMarker(1534.7189941406,-1451.9150390625,12.6328125,"cylinder",10,255,0,0,0) function openGate(hitPlayer) moveObject (gate4,1000,1545.0588378906,-1451.3624267578,15.952730178833) moveObject (gate5,1000,1523.3012695313,-1451.3624267578,15.952730178833) end addEventHandler("onClientMarkerHit",marker4,openGate) function closeGate(hitPlayer) moveObject (gate4,1000,1539.0588378906,-1451.3624267578,15.952730178833) moveObject (gate5,1000,1530.3012695313,-1451.3624267578,15.952730178833) end addEventHandler("onClientMarkerLeave",marker4,closeGate) If you can help me that would be nice You want it so the gate only opens for you? Add a commandHandler, and don't tell anybody the command, simple.
JasperRieken Posted December 24, 2010 Author Posted December 24, 2010 No thats to simple just for a person not for a code
Aibo Posted December 24, 2010 Posted December 24, 2010 local gate4 = createObject(971,1539.0588378906,-1451.3624267578,15.952730178833,0,0,0) local gate5 = createObject(971,1530.3012695313,-1451.3624267578,15.952730178833,0,0,180) local marker4 = createMarker(1534.7189941406,-1451.9150390625,12.6328125,"cylinder",10,255,0,0,0) function openGate(hitPlayer) if getPlayerName(hitPlayer) ~= "JasperRieken" then return end moveObject (gate4,1000,1545.0588378906,-1451.3624267578,15.952730178833) moveObject (gate5,1000,1523.3012695313,-1451.3624267578,15.952730178833) end addEventHandler("onClientMarkerHit",marker4,openGate) function closeGate(hitPlayer) if getPlayerName(hitPlayer) ~= "JasperRieken" then return end moveObject (gate4,1000,1539.0588378906,-1451.3624267578,15.952730178833) moveObject (gate5,1000,1530.3012695313,-1451.3624267578,15.952730178833) end addEventHandler("onClientMarkerLeave",marker4,closeGate) you can change the name. or change it to check ACL group, team, serial, some custom player property, whatever.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now