-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
حبيبي انا سويت هدا الكود البسيط بس مانفع يعني انت يمكن تخلص اصعب شئ واتفه واصغر شئ توحل فيه اتوقع اي شئ من الدنيا هادي وصلنا للزبده اطرح كودك
-
Try this: local randoms = { 'http://1in.kz/s/music/1313125085_one-direction-what-makes-you-beautiful.mp3', 'http://promodj.com/source/3080390/Eiffel_65_Blue_DJ_Pasha_Lee_DJ_Vitaco_remix.mp3' } function setRandomMusic() if isElement(sound) then destroyElement(sound) end index = #randoms > (index or 0) and (index or 0) + 1 or 1 sound = playSound3D(randoms[index], -2631, 1377, 7, true) setSoundVolume(sound, 1.0) setSoundMaxDistance(sound, 50) end addEventHandler("onClientResourceStart", resourceRoot, setRandomMusic) addEventHandler("onClientSoundStream", root, function(suc, length) if suc and length > 0 then setTimer(setRandomMusic, length*1000, 1) else setRandomMusic() end end)
-
This is the source of the map: http://code.opencoding.net/tilecache/tilecache.cgi/1.0.0/sa_map/ http://code.opencoding.net/tilecache/tilecache.cgi/1.0.0/sa_aerial_map/ None of these images seem to work.
-
مسوي قيم مود و ما تعرف تسوي ذا الكود البسيط؟
-
Example: weapons = {} function onShoot(wp) if weapons[wp] then weapons[wp] = weapons[wp] + 1 else weapons[wp] = 1 end end addEventHandler("onClientPlayerWeaponFire", localPlayer, onShoot) addCommandHandler("amount", function() for weaponID, bullet in pairs (weapons) do outputChatBox(weaponID..": "..bullet) end end)
-
GTA Sa map is not included in webmap resource as it look like it come from other source 'website', and this website may be dead? just guessing.
-
Not sure what you mean. Maybe this? https://wiki.multitheftauto.com/wiki/OnClientSoundStopped Edit: Maybe you mean the timer? Change 1 to 0 for infinite repetitions.
-
local randoms = { 'http://1in.kz/s/music/1313125085_one-direction-what-makes-you-beautiful.mp3', 'http://promodj.com/source/3080390/Eiffel_65_Blue_DJ_Pasha_Lee_DJ_Vitaco_remix.mp3' } function setRandomMusic() if isElement(sound) then destroyElement(sound) end sound = playSound3D(randoms[math.random(#randoms)], -2631, 1377, 7, true) setSoundVolume(sound, 1.0) setSoundMaxDistance(sound, 50) end setTimer(setRandomMusic, 10000, 1) addEventHandler("onClientResourceStart", resourceRoot, setRandomMusic)
-
Try. local screenW,screenH = guiGetScreenSize() local state = "Login" local phase = 0 function setSettings( s, p ) state = s or 'Login' phase = p or 0 lastTick = getTickCount() end function getProgress( addtick ) local now = getTickCount() local elapsedTime = now - lastTick local duration = lastTick+addtick - lastTick local progress = elapsedTime / duration return progress end function drawInterface () local InterfaceBreite = interpolateBetween(0,0,0,250,250,250,getProgress(500),"InOutQuad") dxDrawRectangle ( 0, 0, InterfaceBreite, screenH, tocolor ( 23, 23, 23, 255 ) ) showChat(false) end function drawInterfaceRender ( ) lastTick = getTickCount() addEventHandler("onClientRender", getRootElement(), drawInterface) end bindKey("F6","down",drawInterfaceRender)
-
This is worse.
-
What are you doing? if not player? wtf if the player does not exists then how the account will be exists? if not player then setAccountData(account,"GetPlayerMoney",0) end tostring(player)? is player even defined anywhere? setElementData(source,"GetPlayerMoney",tostring(player)) And then back to function GetPlayerMoney you're not using the function anywhere, you just used a variable called 'GetPlayerMoney'. Also you never set a data to the key 'Money'. And you never saved anything when the player quit from the server. This make no sense.
-
Your vehicle speed, vehicle health and gps is working fine, WHY YOU DON'T TAKE A LOOK AT THE CODE AND SEE HOW IT DONE AND DO THE SAME FOR THE PROGRESSBAR?
-
This was a reply to NssoR, it fit you as well.
-
حط عنوان مناسب للموضوع عشان ما ينحذف
-
^^^ You missed the comma. And i can't see where is the point of the element data with these numbers you put.
-
Vehicle created from server side can't be destroyed from the client side. @Perfect, check the wiki example, the example pass the string "Hello world" from the client to the server and then output it, in your case you will pass hitElement from the client side to the server side then destroy it, simply? https://wiki.multitheftauto.com/wiki/TriggerServerEvent
-
You must pass hitElement in the trigger from the client side to the server side. Where do destroyVehicle come from? root is predefined variable of getRootElement().
-
Client Side: function Dgun(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) if weapon == 24 and hitElement and dgunStatus then if getElementType(hitElement) == "vehicle" then -- trigger goes here. end end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), Dgun ) addCommandHandler("dgun", function() dgunStatus = not dgunStatus outputChatBox("Server: D-gun "..(dgunStatus and "On" or "Off").."!", 0, 255, 0, true) end) Server Side: -- Your turn to do it.
-
You can't put a shit in the code and expect it to work.
-
Your code make no sense. You should use the event onClientPlayerWeaponFire and the parameter hitElement, trigger to server side to destroy the vehicle.
-
local progress = 100 addEventHandler("onClientRender", root, function() dxDrawRectangle(316, 649, 615, 38, tocolor(13, 115, 0, 255), true) dxDrawRectangle(320, 653, 605, 29, tocolor(0, 0, 0, 255), true) dxDrawRectangle(320, 653, progress*6.08, 30, tocolor(229, 0, 0, 200), true) end )
-
Yes it doesn't seems to be support direct access, it will need some html or php.
