mint3d Posted July 8, 2013 Share Posted July 8, 2013 Ok i have this script and i want to set it to check name for CZ so it only opens for people with CZ in there name,or with using a command like /gate a51gate1 = createObject ( 980, 2060.96484375, 2437.982421875, 10.8203125, 0, 0, 0 ) a51col = createColCircle ( 213.94564819336, 1875.40234375, 13.938992500305, 7 ) function opena51gates(thePlayer) if getElementModel( thePlayer ) == 287 then moveObject (a51gate1, 5000, 2060.96484375, 2437.982421875, 10.8203125 ) end end addEventHandler( "onColShapeHit", a51col, opena51gates ) function closea51gates(thePlayer) if getElementModel( thePlayer ) == 287 then moveObject (a51gate1, 5000, 2060.96484375, 2437.982421875, 5.8203125 ) end end addEventHandler( "onColShapeLeave", a51col, closea51gates ) Link to comment
iMr.3a[Z]eF Posted July 8, 2013 Share Posted July 8, 2013 (edited) with commands will be easier local a51gate1 = createObject ( 980, 2060.96484375, 2437.982421875, 10.8203125, 0, 0, 0 ) local a51col = createColCircle ( 213.94564819336, 1875.40234375, 13.938992500305, 7 ) function opena51gates(thePlayer) if getElementType(thePlayer) == "player" then if getElementModel( thePlayer ) == 287 then moveObject (a51gate1, 5000, 2060.96484375, 2437.982421875, 10.8203125 ) end end end addCommandHandler( "open", opena51gates) function closea51gates(thePlayer) if getElementType(thePlayer) == "player" then if getElementModel( thePlayer ) == 287 then moveObject (a51gate1, 5000, 2060.96484375, 2437.982421875, 5.8203125 ) end end end addCommandHandler( "close", closea51gates) Sorry Some mistakes edited! Edited July 8, 2013 by Guest Link to comment
iMr.3a[Z]eF Posted July 8, 2013 Share Posted July 8, 2013 What is the 'CZ' ? as far as i know he mean if maybe before the player name is [CZ]-->iMr.Pres[T]ege then he is allow to moveObject Link to comment
iPrestege Posted July 8, 2013 Share Posted July 8, 2013 What is the 'CZ' ? as far as i know he mean if maybe before the player name is [CZ]-->iMr.Pres[T]ege then he is allow to moveObject OK Don't double posts -_-" : string.find getPlayerName Link to comment
mint3d Posted July 8, 2013 Author Share Posted July 8, 2013 local a51gate1 = createObject ( 980, 1940.04175 2215.40015 10.7225, 0, 0, 0 ) local a51col = createColCircle ( 1940.04175 2215.40015 10.7225, 7 ) function opena51gates(thePlayer) if getElementType(thePlayer) == "player" then if getElementModel( thePlayer ) == 287 then moveObject (a51gate1, 5000, 1940.04175 2215.40015 10.7225 ) end end end addCommandHandler( "test", opena51gates) function closea51gates(thePlayer) if getElementType(thePlayer) == "player" then if getElementModel( thePlayer ) == 287 then moveObject (a51gate1, 5000, 1930.04175 2215.40015 10.7225 ) end end end addCommandHandler( "test1", closea51gates) i am using that and the gate dosent show up and i ment like find a name that had CZ in it Link to comment
iPrestege Posted July 8, 2013 Share Posted July 8, 2013 if string.find ( getPlayerName ( thePlayer ),'CZ' ) then Link to comment
iMr.3a[Z]eF Posted July 8, 2013 Share Posted July 8, 2013 local a51gate1 = createObject ( 980, 1940.04175 2215.40015 10.7225, 0, 0, 0 ) local a51col = createColCircle ( 1940.04175 2215.40015 10.7225, 7 ) function opena51gates(thePlayer) if getElementType(thePlayer) == "player" then if getElementModel( thePlayer ) == 287 then moveObject (a51gate1, 5000, 1940.04175 2215.40015 10.7225 ) end end end addCommandHandler( "test", opena51gates) function closea51gates(thePlayer) if getElementType(thePlayer) == "player" then if getElementModel( thePlayer ) == 287 then moveObject (a51gate1, 5000, 1930.04175 2215.40015 10.7225 ) end end end addCommandHandler( "test1", closea51gates) i am using that and the gate dosent show up and i ment like find a name that had CZ in it is your skin at 287? and if you want find a name that had CZ in it, so anyone can change it to CZ and enter Link to comment
mint3d Posted July 8, 2013 Author Share Posted July 8, 2013 The gate dosent show up at my pos and yes i have a DayZ script and they want the gate to open with there gang CZ which is in there name and or a code and the gate dosent show up and i want to remove it so you dont need the skin id Link to comment
iPrestege Posted July 8, 2013 Share Posted July 8, 2013 local a51gate1 = createObject ( 980, 1940.04175 2215.40015 10.7225, 0, 0, 0 ) local a51col = createColCircle ( 1940.04175 2215.40015 10.7225, 7 ) function opena51gates(thePlayer) if string.find ( getPlayerName ( thePlayer ),'CZ' ) then if getElementModel( thePlayer ) == 287 then moveObject (a51gate1, 5000, 1940.04175 2215.40015 10.7225 ) end end end addCommandHandler( "open", opena51gates) function closea51gates(thePlayer) if string.find ( getPlayerName ( thePlayer ),'CZ' ) then if getElementModel( thePlayer ) == 287 then moveObject (a51gate1, 5000, 1930.04175 2215.40015 10.7225 ) end end end addCommandHandler( "close", closea51gates) Commands : - open - close Server Side! Link to comment
iMr.3a[Z]eF Posted July 8, 2013 Share Posted July 8, 2013 iFahad you didn't removed the commands try this: local a51gate1 = createObject ( 980, 1940.04175 2215.40015 10.7225, 0, 0, 0 ) local a51col = createColCircle ( 1940.04175 2215.40015 10.7225, 7 ) function opena51gates(thePlayer) if string.find ( getPlayerName ( thePlayer ),'CZ' ) then if getElementModel( thePlayer ) == 287 then moveObject (a51gate1, 5000, 1940.04175 2215.40015 10.7225 ) end end end addEventHandler( "onColShapeHit", a51col, opena51gates ) function closea51gates(thePlayer) if string.find ( getPlayerName ( thePlayer ),'CZ' ) then if getElementModel( thePlayer ) == 287 then moveObject (a51gate1, 5000, 1930.04175 2215.40015 10.7225 ) end end end addEventHandler( "onColShapeLeave", a51col, closea51gates ) Edited! Link to comment
iPrestege Posted July 8, 2013 Share Posted July 8, 2013 (edited) local a51gate1 = createObject ( 980, 1940.04175 ,2215.40015 ,10.7225, 0, 0, 0 ) local a51col = createColCircle ( 1940.04175 ,2215.40015 ,10.7225 ) function opena51gates(thePlayer) if string.find ( getPlayerName ( thePlayer ),'CZ' ) then moveObject (a51gate1, 5000, 1940.04175 ,2215.40015 ,10.7225 ) end end addCommandHandler( "open", opena51gates) function closea51gates(thePlayer) if string.find ( getPlayerName ( thePlayer ),'CZ' ) then moveObject (a51gate1, 5000, 1930.04175 ,2215.40015 ,10.7225 ) end end addCommandHandler( "close", closea51gates) open - close Edited July 8, 2013 by Guest Link to comment
mint3d Posted July 8, 2013 Author Share Posted July 8, 2013 I mean the gate dosent spawn Link to comment
iMr.3a[Z]eF Posted July 8, 2013 Share Posted July 8, 2013 There is none where you want the gates dimension? Link to comment
mint3d Posted July 8, 2013 Author Share Posted July 8, 2013 In Lv at the big parking lot next to where the mechanic job is in CIT and CSG Link to comment
mint3d Posted July 8, 2013 Author Share Posted July 8, 2013 and i think the marker needs to be there for it to go down Link to comment
iMr.3a[Z]eF Posted July 8, 2013 Share Posted July 8, 2013 and i think the marker needs to be there for it to go down the marker and the object what is the Interior or the Dimension? Link to comment
mint3d Posted July 8, 2013 Author Share Posted July 8, 2013 its ok i just fixed just had to remove marker 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