Jump to content

iPrestege

Members
  • Posts

    10,056
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by iPrestege

  1. iPrestege

    Script Help

    manve1 code should work i think the problem in the MySQL Server .
  2. g_Root = getRootElement() g_ResRoot = getResourceRootElement(getThisResource()) g_PlayerData = {} g_VehicleData = {} local chatTime = {} local lastChatMessage = {} g_ArmedVehicles = { [425] = true, [447] = true, [520] = true, [430] = true, [464] = true, [432] = true } g_Trailers = { [606] = true, [607] = true, [610] = true, [590] = true, [569] = true, [611] = true, [584] = true, [608] = true, [435] = true, [450] = true, [591] = true } g_RPCFunctions = { addPedClothes = { option = 'clothes', descr = 'Modifying clothes' }, addVehicleUpgrade = { option = 'upgrades', descr = 'Adding/removing upgrades' }, fadeVehiclePassengersCamera = true, fixVehicle = { option = 'repair', descr = 'Repairing vehicles' }, giveMeVehicles = { option = 'createvehicle', descr = 'Creating vehicles' }, giveMeWeapon = { option = 'weapons.enabled', descr = 'Getting weapons' }, givePedJetPack = { option = 'jetpack', descr = 'Getting a jetpack' }, killPed = { option = 'kill', descr = 'Killing yourself' }, removePedClothes = { option = 'clothes', descr = 'Modifying clothes' }, removePedFromVehicle = true, removePedJetPack = { option = 'jetpack', descr = 'Removing a jetpack' }, removeVehicleUpgrade = { option = 'upgrades', descr = 'Adding/removing upgrades' }, setElementAlpha = { option = 'alpha', descr = 'Changing your alpha' }, setElementPosition = true, setElementInterior = true, setMyGameSpeed = { option = 'gamespeed.enabled', descr = 'Setting game speed' }, setMySkin = { option = 'setskin', descr = 'Setting skin' }, setPedAnimation = { option = 'anim', descr = 'Setting an animation' }, setPedFightingStyle = { option = 'setstyle', descr = 'Setting fighting style' }, setPedGravity = { option = 'gravity.enabled', descr = 'Setting gravity' }, setPedStat = { option = 'stats', descr = 'Changing stats' }, setTime = { option = 'time.set', descr = 'Changing time' }, setTimeFrozen = { option = 'time.freeze', descr = 'Freezing time' }, setVehicleColor = true, setVehicleHeadLightColor = true, setVehicleOverrideLights = { option = 'lights', descr = 'Forcing lights' }, setVehiclePaintjob = { option = 'paintjob', descr = 'Applying paintjobs' }, setVehicleRotation = true, setWeather = { option = 'weather', descr = 'Setting weather' }, spawnMe = true, warpMe = { option = 'warp', descr = 'Warping' } } g_OptionDefaults = { alpha = true, anim = true, clothes = true, createvehicle = true, gamespeed = { enabled = true, min = 0.0, max = 3 }, gravity = { enabled = true, min = 0, max = 0.1 }, jetpack = true, kill = true, lights = true, paintjob = true, repair = true, setskin = true, setstyle = true, spawnmaponstart = true, spawnmapondeath = true, stats = true, time = { set = true, freeze = true }, upgrades = true, warp = true, weapons = { enabled = true, vehiclesenabled = true, disallowed = {} }, weather = true, welcometextonstart = true, vehicles = { maxidletime = 60000, idleexplode = true, maxperplayer = 2, disallowed = {} } } function getOption(optionName) local option = get(optionName:gsub('%.', '/')) if option then if option == 'true' then option = true elseif option == 'false' then option = false end return option end option = g_OptionDefaults for i,part in ipairs(optionName:split('.')) do option = option[part] end return option end addEventHandler('onResourceStart', g_ResRoot, function() table.each(getElementsByType('player'), joinHandler) end ) function joinHandler(player) if not player then player = source 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 outputChatBox('Welcome to Freeroam', player, 0, 255, 0) outputChatBox('Press F1 to show/hide controls', player, 0, 255, 0) end end addEventHandler('onPlayerJoin', g_Root, joinHandler) addEvent('onLoadedAtClient', true) addEventHandler('onLoadedAtClient', g_ResRoot, function(player) if getOption('spawnmaponstart') and isPedDead(player) then clientCall(player, 'showWelcomeMap') end end, false ) addEventHandler('onPlayerWasted', g_Root, function() if not getOption('spawnmapondeath') then return end local player = source setTimer( function() if isPedDead(player) then clientCall(player, 'showMap') end end, 2000, 1 ) end ) addEvent('onClothesInit', true) addEventHandler('onClothesInit', g_Root, function() local result = {} local texture, model -- get all clothes result.allClothes = {} local typeGroup, index for type=0,17 do typeGroup = {'group', type = type, name = getClothesTypeName(type), children = {}} table.insert(result.allClothes, typeGroup) index = 0 texture, model = getClothesByTypeIndex(type, index) while texture do table.insert(typeGroup.children, {id = index, texture = texture, model = model}) index = index + 1 texture, model = getClothesByTypeIndex(type, index) end end -- get current player clothes { type = {texture=texture, model=model} } result.playerClothes = {} for type=0,17 do texture, model = getPedClothes(source, type) if texture then result.playerClothes[type] = {texture = texture, model = model} end end triggerClientEvent(source, 'onClientClothesInit', source, result) end ) addEvent('onPlayerGravInit', true) addEventHandler('onPlayerGravInit', g_Root, function() triggerClientEvent('onClientPlayerGravInit', source, getPedGravity(source)) end ) function setMySkin(skinid) if isPedDead(source) then local x, y, z = getElementPosition(source) if isPedTerminated(source) then x = 0 y = 0 z = 3 end local r = getPedRotation(source) local interior = getElementInterior(source) spawnPlayer(source, x, y, z, r, skinid) setElementInterior(source, interior) setCameraInterior(source, interior) else setElementModel(source, skinid) setElementHealth(source, 100) end setCameraTarget(source, source) setCameraInterior(source, getElementInterior(source)) end function spawnMe(x, y, z) if not x then x, y, z = getElementPosition(source) end if isPedTerminated(source) then repeat until spawnPlayer(source, x, y, z, 0, math.random(9, 288)) else spawnPlayer(source, x, y, z, 0, getPedSkin(source)) end setCameraTarget(source, source) setCameraInterior(source, getElementInterior(source)) end function warpMe(targetPlayer)
  3. Just post the fr_server.lua code
  4. Hmm... i see that you said you have a freeroam can you post the server side code?
  5. Will if i can help you can see this new pastebin ; http://pastebin.com/eKmFYzVB * Note : on the arabic gta sa forum in the "MTA" Section we have much problems like my problem what you think is that? a bug from mta ?
  6. I Think there's another resource with "onPlayerChat" Event handler .
  7. Yes this work's fine thank you problem fixed .
  8. -- Client Side -- addEventHandler( "onClientGUIClick", start, function ( ) guiSetVisible(gui,false) showCursor (false ) guiSetInputEnabled(false) triggerServerEvent ( "m", localPlayer ) end,false ) -- Server Side -- addEvent("m",true) addEventHandler("m",root, function ( ) car = createVehicle ( 437, 1716.0732421875,-1341.9677734375,13.3828125 ) if ( car ) then warpPedIntoVehicle ( source,car) end end )
  9. يسوي getCameraMatrix ويسوي شرط اذا وصل لـ كذا يسوي سباون ..
  10. https://forum.multitheftauto.com/viewtopic.php?f=91&t=44551&p=446759&hilit=cameraMoveSoft#p446759 نظام سوي فيهآ مآيمشي ^
  11. حقك شوي بيخبص ^ ومآيجي صح فهمت اللي تبية سوية كذآ وبتصير الكآميرآ تروح فوق : addEventHandler ( "onClientRender", getRootElement (), function () local x,y,z,xl,yl,zl = getCameraMatrix() setCameraMatrix ( x,y,z +0.5,xl,yl,zl ) end ) مثل التآيمر
  12. Is the event already canceled? "onPlayerChat" ? cancelEvent
  13. يعني زي التايمر الكود اللي طرحتة يسوي كلام متكرر بدون تايمر عرفت بالشات؟
  14. addEventHandler("onClientRender",getRootElement(), -- الايفنت function ( ) -- وظيفة local random = math.random(1,5000) -- ارقام عشوائية بالشات outputChatBox(tostring(random),math.random(255),math.random(255),math.random(255)) -- شات متكرر من الايفت تلقائي بدون تايمر end -- اغلاق ) -- اغلاق
  15. هذآ يطلع اللي يشغل آي مود يعني مآتفرق ^^
  16. اكيد ! لها استخدامات كثيرة! وهي مثلا زي التايمر والافضل لـو توفرت تستخدمها بدال التايمر ! من نآحية الاق وآحيآنآ مآتصير وتضطر تستخدم التايمر ! يعني الحين لو تسوي لون الدي اكس رآندوم ! مآيحتاج تآيمر عشان الايفنت الرندر !
  17. لازم تسوي حوسة بس كيفكـ getWorldFromScreenPosition dxDrawImage "onClientRender"
  18. Ok but i don't want to change the touchpad driver if you remember we change it in another topic and the touchpad not work's fine am waiting for you and i won't instal any driver now ..
  19. لازم تستخدمها بالدي اكس صدقني لو تفتح الويكي تفهم كل شيء بتحصلها وبتحصل كل اللي سألت (( =
  20. تقدر تسوي فوقكـ آنت وفوق الماركر سيارهـ طآل عمركـ شف هالمثال وتعلم منة .. سويتة لكـ مع الشرح .. -- مخالف
  21. attachElements ماتصلح للصور #
  22. وكيف بتفهم بعدين ؟ هذي الاشياء تسمح لك كل شيء لة شيء مثلا تحط اكواد هيكس الوان # وتخلي الدي اكس مايغطي الشيء النافذهـ ..ألخ center or center هذي وين موقعه يعني بالنص الخ ولازم تجرب دايم وتتعلم ^
  23. Sorry but i need one knows what he say as Town or any mta admin .
×
×
  • Create New...