Ayy64 Posted January 24, 2015 Share Posted January 24, 2015 (edited) Hi, i am using this gate script but i don't know how to allow only a group to open this gate. So can you guys please help me ? Or if you know a gate script that would open on command and it would work only for a group that i would put down could you write it below? col = createColTube (-2078.1000976563, 1405, 6.1, 10, 3) -- enter your cooderates here for your colshape please note 10 and 3 is to do with the size of the shape. root = getRootElement () door = createObject ( 972, -2080.3999023438, 1409.25, 5, 0, 0, 270) -- enter the ID of the object followed by the coordinates -- note the rotx y and z may not be required so you just remove these. x y and z is where you would put your cordinates. addEvent ( "Open", true ) function Open ( pla ) if getElementType ( pla ) == "player" then if vehicle or not vehicle then aclGroupListACL ( aclgroup, Admin ) if --here you can alter the group from Admin to whatever you require in your server but remember the rest must be the same i.e change everything where it says Admin to your desired group and add the users to that group. isObjectInACLGroup ( "user."..getPlayerName(pla), aclGetGroup ( "Staff" ) ) then moveObject (door, 2200, -2080.3999023438, 1409.25, -1.3) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent. else return 0 end end end end addEventHandler ( "onColShapeHit", col, Open) addEventHandler ( "Open", root, Open) function Close ( pla ) if getElementType ( pla ) == "player" then if vehicle or not vehicle then aclGroupListACL ( aclgroup, Admin ) if isObjectInACLGroup ( "user."..getPlayerName(pla), aclGetGroup ( "Staff" ) ) then moveObject (door, 2951, -2080.3999023438, 1409.25, 5) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. else return 0 end end end end addEventHandler ( "onColShapeLeave", col, Close ) addEventHandler ( "Close", root, Close) Edited January 24, 2015 by Guest Link to comment
rtx Posted January 24, 2015 Share Posted January 24, 2015 You need to make the objects client side. After you verify that the player who has hit the colshape is indeed allowed to open the gate you need to trigger a client event. triggerClientEvent ( player, "yourOpenTheGateEvent", player ) A better way to do it would be to make it fully client sided. For that you could store the player's login info when he logs in/ out client side (by using triggerClientEvent upon onPlayerLogin/onPlayerLogout). Link to comment
Ayy64 Posted January 24, 2015 Author Share Posted January 24, 2015 Do you guys know any other gate script that would be for command (Open) and (Close) and it would only work for the whole group and nobody else ? Link to comment
xeon17 Posted January 24, 2015 Share Posted January 24, 2015 There are a lot of those scripts on the forum , just use the seach button and you'll find. Link to comment
Ayy64 Posted January 24, 2015 Author Share Posted January 24, 2015 I can't find any :c Link to comment
xeon17 Posted January 24, 2015 Share Posted January 24, 2015 Because you didn't seached , viewtopic.php?f=91&t=83465&p=759129&hilit=gate+team#p759129 Link to comment
Ayy64 Posted January 24, 2015 Author Share Posted January 24, 2015 But i asked for gate on command... Link to comment
Enargy, Posted January 24, 2015 Share Posted January 24, 2015 you forgot addEvent("Close", true) Link to comment
Ayy64 Posted January 24, 2015 Author Share Posted January 24, 2015 Ok i sloved it, i forgot to add acl group x.x 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