Do_De<3 Posted July 10, 2014 Share Posted July 10, 2014 السسلآم عليكم ورحمة الله وبركاتهه اخبآركمم ؟ عسآكمم بخير شسمهه بغيت كود يجيب احدآثيآت الاوبجكت من ملف map يعني بدال مااحط اوبجكتات من نفسي ابغى يكون من ملف map مثل <object id="object (vgshseing28) (1)" doublesided="false" model="8558" interior="0" dimension="0" posX="1128.7954101563" posY="3712.3876953125" posZ="-0.049953460693359" rotX="0" rotY="0" rotZ="0" /> وشكرآ Link to comment
./BlackBird# Posted July 10, 2014 Share Posted July 10, 2014 * getMapData * The Syntax : string getMapData(string key1, string key2) * key1 : اسم الداتا الي بتجلب منها الداتا المطلوبه * key2 : اسم الداتا المطلوب جلبها من الداتا لها الوظيفه ذي تجلب الداتا الي داخل الداته المطلوبه بالماب المشتغل * client / server : function getMapData(data,valueData) if ( data and valueData ) then for i,v in ipairs(getElementsByType(data)) do if ( v ) then local value = getElementData(v,valueData) if ( value ) then return value else return outputDebugString("Bad Argument value data .",1) end else return outputDebugString("Bad Argument data .",1) end end else return outputDebugString("Please Add data / value data .",1) end end "1" pY="2" pZ="3" lX="4" lY="5" lZ="6" /> exampl ( client ) : addEventHandler("onClientRender",root,function() local xxx = getMapData("base","pX") if ( xxx ) then guiSetText(guiElement,""..xxx.."") end end) exampl ( server ) : addCommandHandler("Xmap",function(player) local pX = getMapData("base","pX") local pY = getMapData("base","pY") local pZ = getMapData("base","pZ") local lX = getMapData("base","lX") local lY = getMapData("base","lY") local lZ = getMapData("base","lZ") if ( pX and pY and pZ and lX and lY and lZ ) then outputChatBox(""..pX..","..pY..","..pZ..","..lX..","..lY..","..lZ.."",player,0,255,255,true) end end) Link to comment
./BlackBird# Posted July 10, 2014 Share Posted July 10, 2014 <object id="object (vgshseing28) (1)" doublesided="false" model="8558" interior="0" dimension="0" posX="1128.7954101563" posY="3712.3876953125" posZ="-0.049953460693359" rotX="0" rotY="0" rotZ="0" /> addCommandHandler("Xmap",function(player) local model = getMapData("object ","model") local interior = getMapData("object ","interior") local dimension = getMapData("object ","dimension") local Px = getMapData("object ","posX") local Py = getMapData("object ","posY") local Pz = getMapData("object ","posZ") local lX = getMapData("object ","rotX") local lY = getMapData("object ","posY") local lZ = getMapData("object ","rotZ") if ( model and interior and dimension and pX and pY and pZ and lX and lY and lZ ) then local obj = createObject(model,Px,Py,Pz,lX,lY,lZ) setElementInterior(obj,interior) setElementDimension(obj,dimension ) end end) 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