mint3d Posted July 8, 2013 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 ) Skype: Jordan_Nymph
iMr.3a[Z]eF Posted July 8, 2013 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 To Visit Us Press Here: mtasa://5.9.206.180:22002
iMr.3a[Z]eF Posted July 8, 2013 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 To Visit Us Press Here: mtasa://5.9.206.180:22002
iPrestege Posted July 8, 2013 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
mint3d Posted July 8, 2013 Author 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 Skype: Jordan_Nymph
iPrestege Posted July 8, 2013 Posted July 8, 2013 if string.find ( getPlayerName ( thePlayer ),'CZ' ) then
iMr.3a[Z]eF Posted July 8, 2013 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 To Visit Us Press Here: mtasa://5.9.206.180:22002
mint3d Posted July 8, 2013 Author 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 Skype: Jordan_Nymph
iPrestege Posted July 8, 2013 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!
iMr.3a[Z]eF Posted July 8, 2013 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! To Visit Us Press Here: mtasa://5.9.206.180:22002
iPrestege Posted July 8, 2013 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
mint3d Posted July 8, 2013 Author Posted July 8, 2013 I mean the gate dosent spawn Skype: Jordan_Nymph
iMr.3a[Z]eF Posted July 8, 2013 Posted July 8, 2013 There is none where you want the gates dimension? To Visit Us Press Here: mtasa://5.9.206.180:22002
mint3d Posted July 8, 2013 Author Posted July 8, 2013 In Lv at the big parking lot next to where the mechanic job is in CIT and CSG Skype: Jordan_Nymph
mint3d Posted July 8, 2013 Author Posted July 8, 2013 and i think the marker needs to be there for it to go down Skype: Jordan_Nymph
iMr.3a[Z]eF Posted July 8, 2013 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? To Visit Us Press Here: mtasa://5.9.206.180:22002
mint3d Posted July 8, 2013 Author Posted July 8, 2013 its ok i just fixed just had to remove marker Skype: Jordan_Nymph
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