z24d Posted November 2, 2015 Share Posted November 2, 2015 السلام عليكم وشسالفة addEventHandler('onPlayerVehicleEnter',veh[source], function() local acc = getPlayerAccount(client) if( isObjectInACLGroup("user."..getAccountName(acc),aclGetGroup("VIP"))) then outputChatBox('Welcome To Your Vehicle ',source,255,255,0) else cancelEvent() end end ) ابي الي معهم فيب يركبونها بس شلونن Link to comment
ALw7sH Posted November 2, 2015 Share Posted November 2, 2015 المفروض تستخدم ايفنت onVehicleStartEnter + عندك بسطر 3 كلاينت ماهو معرف Link to comment
z24d Posted November 2, 2015 Author Share Posted November 2, 2015 veh = {} addEvent('xMasterLoop',true) addEventHandler('xMasterLoop',root, function(zz) if not isElement(veh[source]) then xr,yr,zr = getElementRotation(source) x,y,z = getElementPosition(source) veh[source] = createVehicle(getVehicleIDFromName(zz),x,y,z+1,xr,yr,zr) warpPedIntoVehicle(source,veh[source]) setElementInterior(veh[source],getElementInterior(source)) setElementDimension(source,getElementDimension(source)) MyMarker() else MyMarker() xr,yr,zr = getElementRotation(source) x,y,z = getElementPosition(source) destroyElement(veh[source]) veh[source] = createVehicle(getVehicleIDFromName(zz),x,y,z+1,xr,yr,zr) warpPedIntoVehicle(source,veh[source]) setElementInterior(veh[source],getElementInterior(source)) setElementDimension(source,getElementDimension(source)) end end ) function MyMarker ( ) if isElement(blipa) then destroyElement(blipa) return end if isElement(arrowMarker) then destroyElement(arrowMarker) return end local arrowMarker = createMarker ( 0, 0, 0, "arrow", 0.70, 255, 100, 0, 150 ) setElementData ( source, "MyCar", veh[source] ) attachElements ( arrowMarker, veh[source], 0, 0, 2.1 ) blipa = createBlipAttachedTo ( arrowMarker, 55 ) end addEventHandler("onElementDestroy", veh[source], function () destroyElement(arrowMarker) destroyElement(blipa) end ) Serials = { ["**"] = true, } addEventHandler ( "onVehicleStartEnter", root, function( player ) if ( source == veh[source] ) then local Ps = getPlayerSerial( player ) if ( Serials[Ps] ) then outputChatBox ( "** Welcome "..getPlayerName( player ).." To your car ^", player, 0, 255, 255, true ) else cancelEvent ( true ) outputChatBox ( "** This privately owned vehicle", player, 0, 255, 255, true ) end end end ) استعملت كود زاحف وماضبط Link to comment
Rockyz Posted November 3, 2015 Share Posted November 3, 2015 addEventHandler ( "onVehicleStartEnter", resourceRoot, function ( thePlayer ) if ( source == car ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if ( isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP" ) ) ) then outputChatBox ( "Welcome To Your Vehicle ", thePlayer, 255, 255, 0, true ) else cancelEvent ( ) outputChatBox ( "You Must Be In VIP Group ", thePlayer, 255, 255, 0, true ) end end end ) Link to comment
z24d Posted November 3, 2015 Author Share Posted November 3, 2015 Thanks but this is not what I need i make it before 10 minutes 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