Unique23 Posted November 13, 2013 Share Posted November 13, 2013 Hello lads, I know how to make moving gates and marker for teleporting I have some questions. I want to make moving gates for the teams , How can i makle that? My teleporting system just teleport players but I want to make this script, "If someone hits the marker , He sees a black screen then teleports somewhere. I have an idea too.Imagine, I'm in Admin team and When I join the game or spawn as Admin , I want to hear a sound " Welcome " (If that's possible , can you help me about that?) Here is the example script of my gate blastdoor1=createObject(2929,215.8994140625,1875.5999755859,13.89999961853) blastdoor2=createObject(2927,211.9,1875.5999755859,13.89999961853) blastdoorzone=createColSphere(213.80000305176,1876.1999511719,12.1, function openblastdoors() moveObject(blastdoor1,5000,219.95,1875.5999755859,13.89999961853) moveObject(blastdoor2,5000,207.9,1875.6,13.89999961853) end function closeblastdoors() moveObject(blastdoor1,5000,215.69999694824,1875.5999755859,13.89999961853) moveObject(blastdoor2,5000,211.69999694824,1875.5999755859,13.89999961853) end Here is the example script of teleporting markerinside=createMarker(265.2,1915.7,19,"arrow",1,200,200,200,255,getRootElement()) marerinsidecol=createColSphere(264.2,1915.2,17,1) markeroutside=createMarker(271.8,1926.8,19,"arrow",1,200,200,200,255,getRootElement()) markeroutsidecol=createColSphere(272,1927,17,1) function warpout(player) setElementPosition(player,273,1929,17) end function warpin(player) setElementPosition(player,263,1913,17) end addEventHandler("onColShapeHit",marerinsidecol,warpout) addEventHandler("onColShapeHit",markeroutsidecol,warpin) Link to comment
K4stic Posted November 13, 2013 Share Posted November 13, 2013 Use there Functions: playSound getPlayerTeam fadeCamera Link to comment
Unique23 Posted November 13, 2013 Author Share Posted November 13, 2013 Thanks for helping, I'm trying make that at the moment. P.S.:I learnt how to lock gates for the teams Link to comment
tosfera Posted November 13, 2013 Share Posted November 13, 2013 Goodluck, all you have to do is check if the players team matches with the one that you asked for. Link to comment
Unique23 Posted November 17, 2013 Author Share Posted November 17, 2013 Hello again I always use this script for the gates. local gate = createObject(16775, 286.29998779297, 2056.8000488281, 19, 0, 0, 90 ) local alan = createMarker(286,2057,17,"cylinder",5,255,255,255,0) function Opengate(p) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(p)), aclGetGroup("Admin")) then moveObject(gate, 2000, 286.29998779297, 2056.8000488281, 13, 0, 0, 90) end end addEventHandler( "onMarkerHit", alan, Opengate ) function Closegate(p) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(p)), aclGetGroup("Admin")) then moveObject(gate, 2000,286.29998779297, 2056.8000488281, 19, 0, 0, 90 ) end end addEventHandler( "onMarkerLeave", alan, Closegate ) But It sometimes doesn't work Here is the example video: (That nigga skin ;p) Link to comment
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