-
Posts
570 -
Joined
-
Last visited
-
Days Won
4
Everything posted by #\_oskar_/#
-
اللي لاحظته في كودك انك حاطت engineReplaceAnimation مع التحقق اللي يظهر بالشات المفروض كنت حطيته تحت الاند حقة التحقق اذا مافهمت شوف هنا انت مسويه كيف ؟ يعني انت مسوي تحقق ان لو الملف ماهو موجود يطلع بالشات نص كيف تبي الانيمشن يشتغل وانت حاطه داخل التحقق؟ فهمت ؟
-
function engineReplaceAnimation_(path,name,anim) local customBlockName = "os" local IFP= engineLoadIFP ( path, customBlockName ) if not IFP then outputChatBox('#FF0000 Failed to load#FFFF00 ['..path..']' ,r,g,b,true) end engineReplaceAnimation( localPlayer, name, anim, customBlockName,anim) end --- engineReplaceAnimation_('walk.ifp','ped', 'sprint_civi') جرب كدا لان الوظيفه تعتمد ع نوع الحركه انا سويته لك كدا بحيث انه يكون سهل لك تستخدمه
-
you can use > getPedBonePosition Example Bribe = createObject(1242,0, 0, 0); setElementCollisionsEnabled(Bribe ,false) setObjectScale (Bribe,1.5) addEventHandler('onClientRender', root, function() if ( getPlayerArmor ( localPlayer )>= 1 ) then local sx, sy, sz = getPedBonePosition(localPlayer,3) local rx,ry,rz = getElementRotation(localPlayer) setElementPosition(Bribe ,sx-rx, sy-ry, sz+0.1) setElementRotation(Bribe,0,0,rz) end end)
-
build = {} function building(player, command) if command == "setBuild" then if isElement(build[player]) then destroyElement(build[player]) end xP, yP, zP = getElementPosition(player) build[player] = createObject(3374, xP, yP, zP) attachElements(build[player],player, 0, 3, 1) setElementAlpha(build[player], 150) elseif command == "detach" and isElement(build[player]) then detachElements(build[player] ) end end addCommandHandler("setBuild", building) addCommandHandler("detach",building) try
-
function Sound3D(sound3d,...) local wX, wY, wZ = getPedWeaponMuzzlePosition ( localPlayer ) local sound = playSound3D (sound3d,wX, wY, wZ, false ) attachElements (sound ,localPlayer , 0, 0, 2 ) setSoundMaxDistance(sound, 50) setElementDimension(sound,getElementDimension ( localPlayer )) setElementInterior(sound,getElementInterior( localPlayer ),...) return sound end local weapons = { [22] = "sounds/Colt45.wav", --[id] = "sound name", } -- setWorldSoundEnabled(5,false) function onClientPlayerWeaponFire ( weapon ) if weapons[weapon] then local x, y, z = getElementPosition ( localPlayer ) if isElement(sound ) then destroyElement(sound ) end sound = Sound3D(weapons[getPedWeapon(localPlayer)], x, y, z ) end end addEventHandler ( "onClientPlayerWeaponFire", getRootElement(), onClientPlayerWeaponFire ) is this what you want ?
-
local wX, wY, wZ = getPedWeaponMuzzlePosition ( getLocalPlayer() ) local sound = playSound3D ( "sounds/Colt45.wav",wX, wY, wZ , false ) and use isElement
-
--Client if hitPlayer == localPlayer then triggerServerEvent ("giveMoney", hitPlayer ) ---Server givePlayerMoney (source, 500) element playSound3D ( string soundURL, float x, float y, float z, [ bool looped = false, bool throttled = true ] ) where = pos (x , y , z) ?
-
local function OpenDx(...) local v = {...} if v[2] == true then removeEventHandler("onClientRender", root,v[1]) addEventHandler("onClientRender", root,v[1]) elseif v[2] == false then removeEventHandler("onClientRender", root,v[1]) end end function dx1() --- dxDraw(...) end OpenDx(dx1,true) -- show dx1 OpenDx(dx1,false) -- hide dx1 --/// function dx2() --- dxDraw(...) end OpenDx(dx2,true) -- show dx2 OpenDx(dx2,false) -- hide dx2
-
client Does the server see the player's money amount?
#\_oskar_/# replied to Moony's topic in Scripting
if you want to buy weapons By GUI you should use this functions #Client OnClientGUIClick triggerServerEvent #Server getPlayerMoney giveWeapon -
setelementinterior [HELP] Can't find the error in this teleport script.
#\_oskar_/# replied to Moony's topic in Scripting
source He is the marker not player if (source == infourdragons) then and here error on event hit marker addEventHandler("onHitMarker", player, "saythis") It must be like this addEventHandler("onMarkerHit", root, saythis) -
setelementinterior [HELP] Can't find the error in this teleport script.
#\_oskar_/# replied to Moony's topic in Scripting
outputChatbox replace it to outputChatBox -
np
-
@ReZurrecti0n line 16 : you forgot to add = if number == 3 then
-
Replacing the command with the marker. Please help me!
#\_oskar_/# replied to Turk-oghlan's topic in Scripting
What do you want me to do- 7 replies
-
- command
- setcommand
-
(and 4 more)
Tagged with:
-
مبدع الصراحه وظيفه جميله ومفيده ♥
-
what you want do?
-
use > getPlayerName for check your name
-
Replacing the command with the marker. Please help me!
#\_oskar_/# replied to Turk-oghlan's topic in Scripting
atmls1 = 2116, -1118.3000488281,24.89999961853,0,0,162 atmls2 = 1186.1999511719,-1374.3000488281, 13.199999809265 ,0,0,90 atmls3 = 1975.4000244141,-2176.1000976563, 13.199999809265 ,0,0,178 atmsf1 = -1571.0999755859,666.59997558594, 6.8000001907349 ,0,0,88 atmsf2 = -2655.8999023438,257.89999389648, 4 ,0,0,90 atmredcounty = -74.800003051758,1116.3000488281, 19.39999961853 ,0,0,90 atmlv1 = 1715.5999755859,1533.5, 10.39 ,0,0,92 atmlv2 = 2176.6000976563,2443.6999511719, 10.5 ,0,0,178 atmlv3 = 2159.5,950.79998779297, 10.699999809265 ,0,0,270 atmler = { { 2116, -1118.3000488281,24.89999961853,0,0,162 }, { 1186.1999511719,-1374.3000488281, 13.199999809265 ,0,0,90 }, { 1975.4000244141,-2176.1000976563, 13.199999809265 ,0,0,178 }, { -1571.0999755859,666.59997558594, 6.8000001907349 ,0,0,88 }, { -2655.8999023438,257.89999389648, 4 ,0,0,90 }, {-74.800003051758,1116.3000488281, 19.39999961853 ,0,0,90 }, { 1715.5999755859,1533.5, 10.39 ,0,0,92 }, { 2176.6000976563,2443.6999511719, 10.5 ,0,0,178 }, { 2159.5,950.79998779297, 10.699999809265 ,0,0,270 } } atm = {} function displayLoadedRes ( res ) for theKey,theAtm in ipairs(atmler) do atm[theAtm] = createObject ( 2942, theAtm [ 1 ], theAtm [ 2 ], theAtm [ 3 ], theAtm [ 4 ], theAtm [ 5 ], theAtm [ 6 ] ) atmx, atmy, atmz = getElementPosition (atm[theAtm]) atmMarker = createMarker ( atmx, atmy, atmz -1, "cylinder", 1.5, 100, 100, 200, 170 ) setElementData (atmMarker,"atm",true) atmBlip = createBlipAttachedTo ( atm[theAtm], 52 ) setBlipVisibleDistance (atmBlip,200) setElementCollisionsEnabled(atm[theAtm], false) end end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), displayLoadedRes ) function Bank_( hitElement,v ) if ((getElementType(hitElement) == "player")) then local acc = getPlayerAccount (hitElement) if (acc and not isGuestAccount (acc)) then local atmmi = getElementData (source,"atm") if (atmmi == v) then triggerClientEvent(hitElement, "bankaGuiAc", hitElement) end end end end --///////////// addEventHandler( "onMarkerHit", getRootElement(),function (hitElement ) Bank_(hitElement, true ) end) --///////////// addCommandHandler ( "Bank", function ( source, commandName) Bank_( source,false) end)- 7 replies
-
- 1
-
-
- command
- setcommand
-
(and 4 more)
Tagged with:
-
setTimer ( setVehicleEngineState, 100, 1 ,theVehicle, false)
-
x[ إستفسار ]x كيفية عمل صورة على اللوحه بـ الكامل ؟
#\_oskar_/# replied to Abu.M9L7's topic in البرمجة
Abu.M9L7 عندك طريقتين واختار اللي يعجبك اول طريقه end local r, g, b = math.random(50, 255), math.random(50, 255), math.random(50, 255) setPlayerNametagColor(player, r, g, b) g_PlayerData[player] = { vehicles = {} } g_PlayerData[player].blip = createBlipAttachedTo(player, 0, 2, r, g, b) if g_FrozenTime then clientCall(player, 'setTimeFrozen', true, g_FrozenTime[1], g_FrozenTime[2], g_FrozenWeather) end if getOption('welcometextonstart') then clearChatBox(player) outputChatBox('✦ » - سيرفر طرب الرسمي يرحب بكم - « ✦', player, 10, 137, 244) outputChatBox('✦ » - Welcome To Server T.5 - « ✦', player, 247, 6, 131) end end addEventHandler('onPlayerJoin', g_Root, joinHandler) ثاني طريقه end local r, g, b = math.random(50, 255), math.random(50, 255), math.random(50, 255) setPlayerNametagColor(player, r, g, b) g_PlayerData[player] = { vehicles = {} } g_PlayerData[player].blip = createBlipAttachedTo(player, 0, 2, r, g, b) if g_FrozenTime then clientCall(player, 'setTimeFrozen', true, g_FrozenTime[1], g_FrozenTime[2], g_FrozenWeather) end if getOption('welcometextonstart') then for i=1,20 do -- عدد الاسطر 20 outputChatBox( " " , player) end outputChatBox('✦ » - سيرفر طرب الرسمي يرحب بكم - « ✦', player, 10, 137, 244) outputChatBox('✦ » - Welcome To Server T.5 - « ✦', player, 247, 6, 131) end end addEventHandler('onPlayerJoin', g_Root, joinHandler) اول كود هو يمسح كل الشات مسح شامل الكود الثاني تحدد عدد الاسطر اللي تمسحها بالشات وهو يمسح 20 سطر -
x[ إستفسار ]x كيفية عمل صورة على اللوحه بـ الكامل ؟
#\_oskar_/# replied to Abu.M9L7's topic in البرمجة
-
عشان تتعلم برمجة اللوحات اول شئ لازم تفهم للقريد ليست بما انك تبي تسوي شراء سيارات او شوب اسلحه ودي شروحات ممكن تفيدك ان شاء الله * [ meta.xml ] شرح انشاء ملف الميتا وما يتعلق به x[ giveWeapon شرح وظيفة ]x x[ triggerServerEvent شرح وظيفة ]x * [ givePlayerMoney ] شرح درس ربط الكود بالزر @~# or شرح فتح لوحه بالزر بوتون عمل تريقر من كلين للسيرفر وضغط زر + اعطاء سلاح ~ مواضيع عن شرح القريد ليست شرح القريد ليست + طلب شرح ربط الكود بالقريد ليست + شرح الجريد لست انت لو بحثت هتلاقي شروحات كتير وان شاء الله تستفاد من المواضيع دي