Furious^ONE! Posted December 24, 2013 Posted December 24, 2013 Hello, I just had a problem with my script, I try to added this: local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then The following script: vehicle1 = createVehicle( 602 , -1271.66724, -73.05603, 13.74060, 0, 0, 47.857765197754 ) vehicle = createVehicle( modelID, x, y, z, rotX, rotY, rotZ ) state = setVehicleDoorState ( vehicle, 1, 1 ) function lockPrivate( player, seat, jacked ) if ( source == vehicle1 ) then local account = getPlayerAccount( player ) local accountName = ( account and getAccountName ( account ) or "" ) if not( accountName == "riding07" ) then cancelEvent() outputChatBox("Cette voiture appartient au joueurs: ProDrift|Riding07 ", player, 0, 245, 82, false) else outputChatBox("Bienvenue dans ta voiture Bonne route!", player, 0, 255, 0, false) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate ) setVehicleDamageProof(vehicle, true) This gives it : vehicle1 = createVehicle( 602 , 2014.77124, 2250.16650, 17.36250, 0, 0, 95.29736328125 ) vehicle = createVehicle( modelID, x, y, z, rotX, rotY, rotZ ) state = setVehicleDoorState ( vehicle, 1, 1 ) function lockPrivate( player, seat, jacked ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then cancelEvent() outputChatBox("Cette voiture appartient au joueurs: Admin ", player, 0, 245, 82, false) else outputChatBox("Bienvenue dans ta voiture Bonne route!", player, 0, 255, 0, false) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate ) setVehicleDamageProof(vehicle, true) And the error is at line 14.I do not understand it or be able to come to the "end" Please help me [2013-12-24 16:37:45] ERROR: Loading script failed: 0-Voiture-Admin/veh-ACL.lua:14: '' expected near 'end'
Castillo Posted December 24, 2013 Posted December 24, 2013 vehicle1 = createVehicle ( 602 , 2014.77124, 2250.16650, 17.36250, 0, 0, 95.29736328125 ) vehicle = createVehicle ( modelID, x, y, z, rotX, rotY, rotZ ) state = setVehicleDoorState ( vehicle, 1, 1 ) setVehicleDamageProof ( vehicle, true ) function lockPrivate( player, seat, jacked ) local accName = getAccountName ( getPlayerAccount ( player ) ) if ( not isObjectInACLGroup ( "user."..accName, aclGetGroup ( "Admin" ) ) ) then cancelEvent ( ) outputChatBox ( "Cette voiture appartient au joueurs: Admin", player, 0, 245, 82, false ) else outputChatBox ( "Bienvenue dans ta voiture Bonne route!", player, 0, 255, 0, false ) end end addEventHandler ( "onVehicleStartEnter", vehicle1, lockPrivate ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted December 24, 2013 Posted December 24, 2013 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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