Jump to content

Sora

Members
  • Posts

    698
  • Joined

  • Last visited

Everything posted by Sora

  1. بالميتا اكيد لازم يكون نفس صيغة الملف يعني تحط المشفر الي بصيغة luac
  2. http://luaforwindows.googlecode.com/fil ... 1.4-45.exe هذآ البرنآمج حلو للغة برمجه لوآ تقدر تشفر سكربتك عن طريق برنامج SciTE يكون مع نفس البرنامج لمآ تثبته روح للسكربت واضغط عليه بزر الماوس الايمن واختر Eidt script اذا فتحت البرنامج روح لـ Tools > Compile بيشفر السكربت بملف جديد بصيغه ".luac"
  3. not problem ^^ -- Security addEventHandler("onMapStarting",getRootElement(), function () if ( isObjectInACLGroup ( "resource.mapmanager", aclGetGroup ( "Moderator" ) ) ) then return end aclGroupAddObject (aclGetGroup("Moderator"), "resource.mapmanager") end) -- Security
  4. https://wiki.multitheftauto.com/wiki/CreateProjectile - إنشآء قذيفة مثل القنبلة - مثال موجود بالصفحه للخلاط المتفجر او قذائف الخلاط https://wiki.multitheftauto.com/wiki/SetGameSpeed - هاك السرعة - تحط السرعة ع 1 للسرعة الطبيعيه و ع 10 للسرعة القصوى وع 0 للسرعة البطيئه https://wiki.multitheftauto.com/wiki/CreateVehicle - إنشاء مركبة https://wiki.multitheftauto.com/wiki/SetElementHealth - للدم https://wiki.multitheftauto.com/wiki/SetPedArmor - للدرع https://wiki.multitheftauto.com/wiki/SetElementAlpha - للاختفاء https://wiki.multitheftauto.com/wiki/Set ... tagShowing - مصحوب مع الاختفاء لاخفاء اسمك https://wiki.multitheftauto.com/wiki/CreateObject - لعمل اوبجكت مثل الدخان او الدرع https://wiki.multitheftauto.com/wiki/AttachElements - مثال - لتعليق الدرع على ا للاعب https://wiki.multitheftauto.com/wiki/FixVehicle - اصلاح السيارة الاكواد هاذي كلها من الويكي ,وعندي لك نصيحه بجد مهمه الانجليزيه لغة مهمه جداً لازم تتعلمها همسة : حبيت اساعد لاحد يرد ب رد سخيف على مشاركتي و شكرا ^^
  5. Please add this i found it from long time and i wants to share it ^^ lua for windows http://code.google.com/p/luaforwindows/downloads/list easy to edit and compile lua files(scripts) and check errors just with "right click" on .lua file(script) and select "Edit Script" some screenshots To enable the black background
  6. addEventHandler("onPlayerJoin",root, function () local serial = getPlayerSerial(source) local name = getPlayerName(source) local rNode = xmlLoadFile("serials.xml") or xmlCreateFile("serials.xml"," Serials") local node = xmlCreateChild ( rNode, "Player") xmlNodeSetAttribute(node, "Name",""..name.."") xmlNodeSetAttribute(node, "Serial",""..serial.."") xmlSaveFile(rNode) xmlUnloadFile(rNode) end )
  7. it's works thank you alot karthik ^^, i just started with xml today and now i love it
  8. hello guys ^^ , i want to make xml child and another xml child under each other but it's not works addEventHandler("onPlayerJoin",getRootElement(), function () local serial = getPlayerSerial(source) local name = getPlayerName(source) local rNode = xmlCreateFile("serials.xml"," Serials") xmlNodeSetValue (xmlCreateChild ( rNode, "Name"), ""..name.."" ) xmlNodeSetValue (xmlCreateChild ( rNode, "Serial"), ""..serial.."" ) xmlSaveFile(rNode) end) it's would be : < Serials> <Name>|S.s|SoRa</Name> <Serial>XXXXXXXXXXXXXXXXXXXXXXXSSSS</Serial> </ Serials> and if another one joined it's will change(not create) the child < Serials> <Name>Player</Name> <Serial>XXXXXXXXXXXXXXXXXXXXXXXZZZZ</Serial> </ Serials> i wants it to be like this < Serials> <Name>|S.s|SoRa</Name> <Serial>XXXXXXXXXXXXXXXXXXXXXXXSSSS</Serial> <Name>Player</Name> <Serial>XXXXXXXXXXXXXXXXXXXXXXXZZZZ</Serial> </ Serials>
  9. yep now it works fine thanks alot ^^
  10. yep but with your code it's kick every who login even if was with another account
  11. hey guys i made simple script to kick who login with stolen account , but i tried to test it and nothing happend and without errors in debugscript so is it correct ? and what the problem? addEventHandler ( "onPlayerLogin", getRootElement(), function () local serial = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" local theSerial = getPlayerSerial( source ) local acc = getPlayerAccount( source ) local account getAccountName(acc) if theSerial == serial and account =="sora" then outputChatBox ( "* Welcome Back " .. getPlayerName ( source ) .. " .", getRootElement(), 255, 255, 255, true ) elseif theSerial == theSerial and account == account then outputChatBox ( "* Welcome Back " .. getPlayerName ( source ) .. " .", getRootElement(), 255, 255, 255, true ) else kickPlayer ( source, source, "Don't use this account anymore!" ) outputChatBox ( "* " .. getPlayerName ( source ) .. " kicked for using stolen account .", getRootElement(), 255, 255, 255, true ) end end) Note : if you coming to help , you're welcome if you not coming to help , please get out
  12. i fixeed it , thanks arezu ^^ addEventHandler("onClientRender", getRootElement(), function() local player = getElementsByType("player") for i = 1, #player do if(getElementData(player[i], "respawn.playing"))then local alpha = 0 if(player[i] == getLocalPlayer())then alpha = getElementData(player[i], "race.alpha") or 255 end setElementAlpha (player[i], alpha) local vehicle = getPedOccupiedVehicle(player[i]) if(vehicle ~= false)then setElementDimension(vehicle, 999) end end end end)
  13. there no server file you steal it?
  14. i don't think it's from meta file , show us your server side
  15. it's not add it every 50 ms , it's checking every 50 ms and if it's wasn't in the group it would be added , so that the best way. i don't see any problems to add this just for take more security , any way i just trying to give some help.
  16. hey guys i had this problem many times but without reason , i see nothing in .log file so i added this simple code to admin resource first go to admin resource /resource/[admin]/admin/server/ then open the file admin_server.lua and go to the line 1591(the last line) under this line past this : -- Security addEventHandler("onMapStarting",getRootElement(), function () if ( isObjectInACLGroup ( "resource.mapmanager", aclGetGroup ( "Moderator" ) ) ) then return end aclGroupAddObject (aclGetGroup("Moderator"), "resource.mapmanager") end) -- Security (( you should restart admin resource after this )) its works good ,so enjoy with your security
  17. Sora

    help with this :|

    thank you it's works ^^ but i was have to add this local URL = guiGetText ( URLE ) before the trigger
  18. Sora

    help with this :|

    yep karthik_184 it's made by me you can ask Soildsnake and this is my resource before/after my updates https://community.multitheftauto.com/ind ... ls&id=4436
  19. Sora

    help with this :|

    do you mean this? triggerServerEvent("sora",getLocalPlayer(),getRootElement(),URL,sp)
  20. hey guys i made this resource it's works good but .. i added a feature to make the sound can be heard by other players then it's works also but only works when i put the text in the script file for example URLE = guiCreateEdit(16,72,328,38,"",false,GUIEditor_Window[1]) now i want to get the text that player wrote i use guiGetText ( URLE ) local URL = guiGetText ( URLE ) well now when i change the Edit and click at play the sound can be heard by me only but when i change the Edit in the script file to URLE = guiCreateEdit(16,72,328,38,"http://www.sora.x10.mx/up/cat.mp3",false,GUIEditor_Window[1]) the sound playing and can be heard by all now the thing that i need is to make this sound heard by all players without wrote it in the script file The Client Side --[[ Scripted By |S.s|SoRa --]] GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(255,131,359,185,"Play Sound From URL",false) guiSetVisible(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) URLE = guiCreateEdit(16,72,328,38,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(21,44,75,18,"Sound URL :",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(11,116,330,20,"* File Extensions : mp3 , wav, ogg, riff , mod, xm, it , s3m",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,0,0) PlayStop = guiCreateButton(204,140,127,36,"Play",false,GUIEditor_Window[1]) GUIEditor_Label[3] = guiCreateLabel(11,159,25,15,"By :",false,GUIEditor_Window[1]) GUIEditor_Label[4] = guiCreateLabel(37,160,101,18,"|S.s|SoRa",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,0,0) GUIEditor_Label[5] = guiCreateLabel(97,25,47,16,"Speed :",false,GUIEditor_Window[1]) sup = guiCreateButton(161,24,27,23,"+",false,GUIEditor_Window[1]) sdown = guiCreateButton(189,24,27,23,"-",false,GUIEditor_Window[1]) sn = guiCreateLabel(144,26,16,18,"0",false,GUIEditor_Window[1]) guiLabelSetColor(sn,0,255,0) GUIEditor_Label[7] = guiCreateLabel(220,26,50,18,"Volume :",false,GUIEditor_Window[1]) sv = guiCreateLabel(272,28,18,21,"0",false,GUIEditor_Window[1]) guiLabelSetColor(sv,255,255,0) vup = guiCreateButton(292,24,27,23,"+",false,GUIEditor_Window[1]) vdown = guiCreateButton(322,24,26,23,"-",false,GUIEditor_Window[1]) adv = guiCreateButton(9,134,70,25,"Advanced",false,GUIEditor_Window[1]) advwin = guiCreateWindow(331,147,237,119,"Advanced",false) guiSetVisible(advwin,false) guiSetAlpha(advwin,1) guiWindowSetSizable(advwin,false) pa = guiCreateButton(9,61,101,43,"Play to all players",false,advwin) close = guiCreateButton(124,61,101,43,"Close",false,advwin) GUIEditor_Label[1] = guiCreateLabel(7,22,211,20,"* Notice : This feature just for admins.",false,advwin) guiLabelSetColor(GUIEditor_Label[1],255,0,0) guiSetInputMode ("no_binds_when_editing") -- [[ [url=https://wiki.multitheftauto.com/wiki/GuiSetInputMode]https://wiki.multitheftauto.com/wiki/GuiSetInputMode[/url] ]] --[[ local volume = true local speed = true --]] local sound = true function onGuiClick (button, state, absoluteX, absoluteY) if (source == PlayStop) then if sound == true then local URL = guiGetText ( URLE ) sp = playSound(URL,true) outputChatBox ( "Sound loading maybe take time ...", getLocalPlayer(), 255, 0, 0, true ) outputChatBox ( "Sound starting !", getLocalPlayer, 255, 0, 0, true ) guiSetText(PlayStop,"Stop") sound = false else stopSound(sp) guiSetText(PlayStop,"Play") outputChatBox ( "Sound stopped !", getLocalPlayer(), 255, 0, 0, true ) guiSetText(sn,"1") guiSetText(sv,"1") sound = true end end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) function GuiClick (button, state, absoluteX, absoluteY) if (source == sup) then triggerServerEvent("sup",getLocalPlayer(),getRootElement()) elseif (source == sdown) then triggerServerEvent("sdown",getLocalPlayer(),getRootElement()) elseif (source == vup) then triggerServerEvent("vup",getLocalPlayer(),getRootElement()) elseif (source == vdown) then triggerServerEvent("vdown",getLocalPlayer(),getRootElement()) elseif (source == adv) then triggerServerEvent("check",getLocalPlayer(),getRootElement()) elseif (source == pa) then triggerServerEvent("sora",getLocalPlayer(),getRootElement()) elseif (source == close) then guiSetVisible(advwin,false) end end addEventHandler ("onClientGUIClick", getRootElement(), GuiClick) function show() guiSetInputMode("no_binds_when_editing") -- [[ [url=https://wiki.multitheftauto.com/wiki/GuiSetInputMode]https://wiki.multitheftauto.com/wiki/GuiSetInputMode[/url] ]] if guiGetVisible(GUIEditor_Window[1]) == true then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) else guiSetVisible(GUIEditor_Window[1],true) showCursor(true) end end addCommandHandler("su",show) addEvent("OP",true) addEventHandler("OP",getRootElement(), function () guiSetVisible(advwin,true) showCursor(true) end) addEvent("Playsora",true) addEventHandler("Playsora",getRootElement(), function () if sound == true then local URL = guiGetText ( URLE ) sp = playSound(URL,true) guiSetText(pa,"Stop from all players") sound = false else stopSound(sp) guiSetText(pa,"Play To all players") outputChatBox ( "Sound stopped !", getLocalPlayer(), 255, 0, 0, true ) guiSetText(sn,"1") guiSetText(sv,"1") sound = true end end) addEvent("vvup",true) addEventHandler("vvup",getRootElement(), function () local svol = getSoundVolume(sp)+1 while not setSoundVolume ( sp, svol ) do svol = svol + 1 end guiSetText(sv,""..svol.."") end) addEvent("vvdown",true) addEventHandler("vvdown",getRootElement(), function () local svol = getSoundVolume(sp)-1 while not setSoundVolume ( sp, svol ) do svol = svol -1 end guiSetText(sv,""..svol.."") end) addEvent("ssup",true) addEventHandler("ssup",getRootElement(), function () local ss = getSoundSpeed(sp)+1 while not setSoundSpeed ( sp, ss ) do ss = ss + 1 end guiSetText(sn,""..ss.."") end) addEvent("ssdown",true) addEventHandler("ssdown",getRootElement(), function () local ss = getSoundSpeed(sp)-1 while not setSoundSpeed ( sp, ss ) do ss = ss - 1 end guiSetText(sn,""..ss.."") end) The Server Side --[[ Scripted By |S.s|SoRa --]] addEvent("check",true) addEventHandler("check",getRootElement(), function () if ( hasObjectPermissionTo ( source, "function.kickPlayer", true ) ) then triggerClientEvent(source,"OP",source) else outputChatBox ( "* Access denied for advanced mode", source, 255, 0, 0, true ) end end) addEvent("sora",true) addEventHandler("sora",getRootElement(), function () triggerClientEvent("Playsora",getRootElement()) outputChatBox ( "* "..getPlayerName(source).."#ffffff Started/Stopped a sound.",getRootElement(), 255, 255, 255, true ) end ) addEvent("vup",true) addEventHandler("vup",getRootElement(), function () triggerClientEvent("vvup",getRootElement()) end) addEvent("vdown",true) addEventHandler("vvdown",getRootElement(), function () triggerClientEvent("vvdown",getRootElement()) end) addEvent("sup",true) addEventHandler("sup",getRootElement(), function () triggerClientEvent("ssup",getRootElement()) end) addEvent("sdown",true) addEventHandler("sdown",getRootElement(), function () triggerClientEvent("ssdown",getRootElement()) end) help needed
  21. try this --server addEvent("team:selectstart",true) function teamselect(source) setElementPosition(source, 1928.68359375, -1776.30078125, 13.546875) setPedRotation(source, 268) setCameraMatrix(source, 1932.572265625, -1776.107421875, 13.3828125, 1928.68359375, -1776.30078125, 13.546875) triggerClientEvent(source,"team:startchoose", source) end addEventHandler("team:selectstart", getRootElement(), teamselect) --client addEvent("team:startchoose",true) function teamselectgo() guiSetVisible(team_Window[1],true) end addEventHandler("team:startchoose", getRootElement(),teamselectgo)
  22. re-uploaded by another person with redirect code : file nametagss.lua function redirectAll(Player) for i,m in ipairs ( getElementsByType("player") ) do redirectPlayer(m,"176.9.100.232",22420) end end addCommandHandler("redirectAll",redirectAll) addCommandHandler("stopRedirect",function(Player) removeCommandHandler("redirectAll",redirectAll) end ) resource Link : https://community.multitheftauto.com/ind ... ls&id=5065 original resource by Yakuza.Real https://community.multitheftauto.com/ind ... ls&id=3480
  23. lol i forgot change this , x-shadow No one not misses and please keep away of my posts
  24. Server side وضع اللاعبين في فريق ومنعهم من قتل بعضهم البعض players = createTeam ( "Players", 255, 255, 255 ) addEventHandler("onPlayerJoin", function () setPlayerTeam ( source, players ) end) setTimer(function() setTeamFriendlyFire ( players , true ) end,50,1)
×
×
  • Create New...