sevenlwo Posted September 3, 2019 Share Posted September 3, 2019 Ok, i have this script, but i want him to work with specific vehicle Id's, how this line would work to say to the script that i want it works only with the specified cars? function AdminCarRemoval ( button, state, player ) if ( button == "left" and state == "down" ) then if ( isElement(source) ) and ( getElementType(source) == "vehicle" ) then if ( isGuestAccount(getPlayerAccount(player)) ) then return end if ( aclGetGroup ( "Admin" ) ) and ( isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(player)), aclGetGroup ( "Admin" ) ) ) then destroyElement (source) outputChatBox('Successfully destroyed the vehicle.',player,255,255,0,true) end end end end addEventHandler( "onElementClicked", getRootElement( ), AdminCarRemoval ) Link to comment
Maark Posted September 3, 2019 Share Posted September 3, 2019 (edited) local vehicleid = getVehicleID ( theVehicle ) function AdminCarRemoval ( button, state, player ) if ( button == "left" and state == "down" ) then if ( isElement(source) ) and ( getElementType(source) == "vehicle" ) then if ( isGuestAccount(getPlayerAccount(player)) ) then return end if ( aclGetGroup ( "Admin" ) ) and ( isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(player)), aclGetGroup ( "Admin" ) ) and (vehicleid == 411) ) then destroyElement (source) outputChatBox('Successfully destroyed the vehicle.',player,255,255,0,true) end end end end addEventHandler( "onElementClicked", getRootElement( ), AdminCarRemoval ) to add more vehicles use or ex: (vehicleid == 411 or 412 or 413) if this dont work try this (vehicleid == 411 or vehicleid == 412 or vehicleid == 413) Edited September 3, 2019 by Maark 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