-
Posts
868 -
Joined
-
Last visited
Posts posted by hassan.k.s.a
-
-
-
جرب
-- client
edit = guiCreateEdit(20,20,20,20,"",false) button = guiCreateButton(20,40,20,20,"Create",false) addEventHandler("onClientGUIClick",guiRoot,function() if source == button then triggerServerEvent("CreateTeam",localPlayer,guiGetText(edit)) end end)
-- server
addEvent("CreateTeam",true) addEventHandler("CreateTeam",getRootElement(),function(edit) createTeam(tostring(edit)) setPlayerTeam(source,getTeamFromName(tostring(edit))) end)
-
-
سو مود وحط فيه ذي الاكواد
addCommandHandler("pos", function (player) local x,y,z = getElementPosition(localPlayer) setClipboard('' .. x .. ',' .. y .. ',' .. z .. '') outputChatBox("* x : " .. x .. " y : " .. y .. " z : " .. z .. "",0,255,0,true) end )
وكتب ب اف8 pos
وحط الاحدثيات
-- server
addCommandHandler("pos", function (player) local x,y,z = getElementPosition(player) outputChatBox("* x : " .. x .. " y : " .. y .. " z : " .. z .. "",root,0,255,0,true) end )
-
سكربت جميل وفيه تطور , لاهنت على الطر .. بالتوفيق ~#
-
أنا ما أعرف لذا المود
بس مو كل أمثلة الويكي صحيحة
بعضها بس يوريك وظيفة الفنكشن أو الإيفنت
سلامات مو كلها صحيحة !
وريني مثال فيه خطأ
-
بدايه جميله .. بالتوفيق ~ُ#
-
-
مو لازم عالم وهمي
-
ممكن اسويه لك بـ مقابل
-
-
جرب
-- Server
addEvent("XX",true) addEventHandler("XX",getRootElement(),function(e1,e2) local file = xmlLoadFile("FileName.xml") or xmlCreateFile("FileName.xml"," Says") xmlNodeSetValue(xmlCreateChild(file, "Says"), ""..e1.."") xmlNodeSetValue(xmlCreateChild(file, "Says"), ""..e2.."") xmlSaveFile(file) xmlUnloadFile(file) end)
-- اذا تبغى يجي الي بالفراغ الاول + الي بالفراغ الثاني + اسم الاعب بـ سطر واحد
addEvent("XX",true) addEventHandler("XX",getRootElement(),function(e1,e2) local file = xmlLoadFile("FileName.xml") or xmlCreateFile("FileName.xml"," Says") xmlNodeSetValue(xmlCreateChild(file, "Says"), "Name Player : "..getPlayerName(source).." **** "..e1.." ***** "..e2.."") xmlSaveFile(file) xmlUnloadFile(file) end)
-- Client
addEventHandler("onClientGUIClick",guiRoot,function() if source == اسم الزر then triggerServerEvent("XX",localPlayer,guiGetText(للفراغ ألأولEditاسم ال),guiGetText(للفراغ الثانيEditاسم ال)) end end)
-
سكربت جميل ومفيد لاهنت على الطرح
-
-
-
مافهمت وضح اكثر
-
-
setCameraTarget (source, source)
مو بأي حآله تستخدم
source
على حسب موقعها .
-
خخخخخخخخخخخخخ حتى الكفره نسخ بالعقل ولصق بالكتابه !
-
-
-
جرب ذا احسن
-- Client
function getElementSpeed(element,unit) if unit == nil then unit = 0 end if isElement ( element ) then local x,y,z = getElementVelocity ( element ) if ( unit == "mph" or unit == 1 or unit == "1" ) then return ( x^2 + y^2 + z^2 ) ^ 0.5 * 100 else return ( x^2 + y^2 + z^2 ) ^ 0.5 * 1.61 * 100 end else return false end end setTimer(function() local Veh = getPedOccupiedVehicle(localPlayer) local Speed = getElementSpeed(Veh,"kmh") if Speed > 120 then if isElement(sound) then destroyElement(sound) end local sound = playSound("name.mp3") setSoundVolume(sound,0.9) else setSoundVolume(sound,0) end end,700,0)
-
-
جرب
-- Client
addEventHandler("onClientRender",getRootElement(),function() triggerServerEvent("getSpeed",localPlayer) end) addEvent("StartSound",true) addEventHandler("StartSound",getRootElement(),function() local sound = playSound("name.mp3") setSoundVolume(sound,0.9) end) addEvent("StopSound",true) addEventHandler("StopSound",getRootElement(),function() destroyElement(sound) end)
-- Server
function getElementSpeed(element,unit) if unit == nil then unit = 0 end if isElement ( element ) then local x,y,z = getElementVelocity(element) if ( unit == "mph" or unit == 1 or unit == "1" ) then return ( x^2 + y^2 + z^2 ) ^ 0.5 * 100 else return ( x^2 + y^2 + z^2 ) ^ 0.5 * 1.61 * 100 end else return false end end addEvent("getSpeed",true) addEventHandler("getSpeed",getRootElement(),function() local Veh = getPedOccupiedVehicle(source) local Speed = getElementSpeed (Veh,"kmh") if Speed > 120 then triggerClientEvent(source,"StartSound",source) else triggerClientEvent(source,"StopSound",source) end end)
طلب شرحح
in البرمجة
Posted
هذا يخلي الشاشه سوداء حمراء زرقاء يرجعها عيديه ..~#
--
ذاه راح يوجه الكامرا من جهه لجهه
راح ياخذ احداثيات ال
وبـ النسبه لـ
اتوقع راح يوجه الكامرا على ألغرفه الي مو في
interior 0
--
هذا راح ياخذ انت في اي غرفه موجهه كاميرتك ..~#