Jump to content

iiv03

Members
  • Posts

    476
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by iiv03

  1. iiv03

    Help on table

    I don't understand much in the table. this is the first time i use it could u tell me where wrong?
  2. iiv03

    Help on table

    i make other table but here in debugscript tell me table is nil local offsetY = 0 -- table with column local referees = { ["Status"] = { columns = { {"Running", "test"}, {"Free Round", "test"}, {"Waiting", "test"}, {"Paused", "test"}, {"Training", "test"}, } } -- to make loop of table for i, v in pairs(referees) do for i, column in pairs(v.columns) do column.height = referee.y * (tonumber(column[3]) or 0) end end -- render column when panel showing function referee.renderColumns(columns, offsetY) for i, column in ipairs (columns) do dxDrawText(column[2], referee.x + textmoveX + moveSide, referee.y + positionY, sizeX, sizeY + column.height,tocolor(255,255,255,255*referee.getPanelAlpha), referee.fontSize, referee.font, "center","top",false) offsetY = offsetY + column.height end end to 'iparis' (table expected, got nil) at line 20 (render column) where wrong?
  3. iiv03

    Help on table

    -- local nameTable = {"test1","test2"} -- -- in function local textmoveX = sX*0.3 local offsetX = 0 for i ,v in ipairs(nameTable) do dxDrawText(v, referee.x + textmoveX, referee.y, sizeX+offsetX, sizeY ,tocolor(255,255,255,255*referee.getPanelAlpha), referee.fontSize, referee.font, "center","top",false) end offsetX = referee.x + textmoveX --end hey stPatrick, there is no difference when i'm put iparis EDIT:: okay i did something wrong and I fixed it i put offsetX = etc. out loop so that's why not work ?
  4. iiv03

    Help on table

    hey, how do i make the table all the name on the right? i use: local nameTable = {"test1","test2"} ---- ---- local offsetX = 0 for i ,v in pairs(nameTable) do dxDrawText(v, referee.x*1.17, referee.y+20, sizeX+offsetX, sizeY ,tocolor(255,255,255,255*referee.getPanelAlpha), referee.fontSize, referee.font, "left","top",false) end offsetX = offsetX + referee.x i tried to move it on some coordinates and it didn't work
  5. الحين عندي سؤال كيف اسوي interpolateBetween في اخر شيئ يسوي لنص fade out local progress = math.min((getTickCount()-tick)/6500,1) position = interpolateBetween(from+450, 0, 0, to-550, 0, 0, progress, "Linear") --هذا يسوي النص fadeIn --العكس كيف ؟ fadeOut -- if progress > 1 then tick = math.max((getTickCount()+tick)/2500,tick) end مابغى استخدم ال removeEventHandler هناك عشان لو وصل الرقم علي حد يشيل الرندر
  6. هلا السلام عليكم ورحمة الله وبركاته معي مشكله هنا انه لو واحد خرج من منطقه يتكرر مرتين يعني علي حسب الاعبين موجودين ب سرفر ليه؟ --سرفر addEvent ("addText",true) addEventHandler ("addText",root, function (playerSource,element) outputChatBox("| #ff0000INFO:#ffffff "..getPlayerName(playerSource).."#ffffff has reached #ff0000MAP LIMIT!", getRootElement(), 255,255,255,true) end) --كلينت function back() if source == zone then removeEventHandler("onClientRender", root,zoneText) end end function leave(element) if source == zone then addEventHandler("onClientRender", root,zoneText) triggerServerEvent ("addText",localPlayer,element) end end addEventHandler ("onClientColShapeLeave",root,leave) addEventHandler ("onClientColShapeHit",root,back)
  7. well i was make table with function setWeather i'm tired to add table out function and connect to outputChatBox so my try: local weatherName = {"Test1","Test2","Test3"}--tables function changeWeather(player, command, state, weatherID, weatherName) local account = getPlayerAccount (player) local account_name = getAccountName(account) if isObjectInACLGroup ( "user." .. account_name, aclGetGroup ( "Admin" )) then if not state then outputChatBox("write a weather!", player, 255,255,255,true) return end if state == "weather" then setWeather(tonumber(weatherID)) --Set the weather and let the player know he did it outputChatBox("Weather successfully changed to "..weatherName, player, 0, 255, 0) -- here get a weathername when set id of weathers! else outputChatBox("Access Denied", player, 255,255,255,true) end end end addCommandHandler("change", changeWeather) i'm getting error attempt to concatenate local 'weatherName' (a nil value)
  8. مشكوور حبيبي عنآد مأكنت داري اني اضيف افينت ثاني ب سرفر سايد ماقصرت حبيبي
  9. مافهمت هنا وش قصدك ب كلينت يعني وين احطه ذا؟ الحين اوك فهمنا ان كلينت متصل علي سرفر سايد . بس التريقر سرفر سايد رايح لين كلينت وين مكانه ذا؟ ولا قصدك احطه ب جيم مود لما يشتغل؟ ... ?
  10. هلا خوي عناد سويت كذا ومشكله لسى مزبط وين مشكله؟ server: addEventHandler("onPlayerJoin", root, function() if CWMode == true then triggerClientEvent("EnableCW", resourceRoot) elseif WFFMode == true then triggerClientEvent("EnableWFF", resourceRoot) else outputChatBox("| #ff0000ERROR: #ffffffLoading Script SystemCW",getRootElement(), 255,255,255,true) outputDebugString("There is a error in SystemCW", 0, 212,27,27) end end) client: function toEnabledWFF() removeEventHandler("onClientRender", getRootElement(), cw) addEventHandler("onClientRender", getRootElement(), wff) end addEvent("EnableWFF", true) addEventHandler("EnableWFF", root, toEnabledWFF) function toEnabledCW() addEventHandler("onClientRender", getRootElement(), cw) removeEventHandler("onClientRender", getRootElement(), wff) end addEvent("EnableCW", true) addEventHandler("EnableCW", root, toEnabledCW) المشكله في سرفر محلي لوكال زبط .. بس في سرفر عالمي مازبط كل ماخش يجني ارور انه مافي EnableCW ب كلينت سايد وهو موجود و معرف الحدث ب فاكشن addEvent("EnableCW", true) addEventHandler("EnableCW", getRootElement(), toEnabledCW) وش حل؟
  11. حبيبي نورت ويعطيك عافيه علي شرحك جميل ماقصرت @^iiEcoo'x_)
  12. هلا معي مشكله هنا في الاول اذا رسترت الكود حقي يشتغل واذا كتبت امر مثل /dm cw أو wff يشتغل بس مشكله انه لو الأعب خرج ودخل مره ثاني مايجي الرندر؟ الا انا اكتب مره ثانيه الأمر وين خطأ؟ local CWMode = false local WFFMode = true function toggleSystem(playerSource,commandName,status,message,messageType) local playerName = getPlayerName(playerSource) local account = getPlayerAccount (playerSource) local account_name = getAccountName(account) if isObjectInACLGroup ( "user." .. account_name, aclGetGroup ( "Clanwar" )) or (isPlayerInACLGroup(playerSource, adminGroups) == true) then if not status then outputChatBox("#ffffffWrong Syntax: #334455/dm [cw/wff]",playerSource,255,255,255,true) return end if status == "cw" then outputChatBox("#ffffff| the Gamemode has been changed to CWMode #ffffffby "..playerName,getRootElement(),255,255,255,true) CWMode = true addCommandHandler("state", SystemCW) triggerClientEvent("EnableCW", resourceRoot) addCommandHandler("reset", onResetSettingCW) addCommandHandler("join1", joinHomeTeam) addCommandHandler("join2", joinEnemyTeam) WFFMode = false removeCommandHandler("state", SystemWFF) removeCommandHandler("reset", onResetSettingWFF) elseif status == "wff" then cancelEvent() outputChatBox("#ffffff| the Gamemode has been changed to WFFMode #ffffffby "..playerName,getRootElement(),255,255,255,true) CWMode = false removeCommandHandler("state", SystemCW) removeCommandHandler("reset", onResetSettingCW) triggerClientEvent("EnableWFF", resourceRoot) WFFMode = true addCommandHandler("state", SystemWFF) addCommandHandler("reset", onResetSettingWFF) addCommandHandler("join1", joinHomeTeam) addCommandHandler("join2", joinEnemyTeam) else outputChatBox("#ffffffWrong Syntax: #334455/dm [cw/wff]",playerSource,255,255,255,true) end else outputChatBox("Access Denied",playerSource,255,255,255,true) end end addCommandHandler("dm",toggleSystem) مسوي تريقر لين للكلينت كذا function toEnabledWFF() removeEventHandler("onClientRender", root, cw) addEventHandler("onClientRender", root, wff) end addEvent("EnableWFF", true) addEventHandler("EnableWFF", root, toEnabledWFF) function toEnabledCW() addEventHandler("onClientRender", root, cw) removeEventHandler("onClientRender", root, wff) end addEvent("EnableCW", true) addEventHandler("EnableCW", root, toEnabledCW) ياليت مساعده. مدري صراحه وين خطأ بموضوع ومافي ارور ب ديبوق
  13. قصدك كذا صح؟ وغلطت اني حاطيت البلاير في فاكشن addEventHandler ( "onPlayerChat" , root , -- حدث عند التكلم بالشات function (message, messageType,...) -- وظيفة وتحتوي بارمتر الحدث -- تجاوزنا البارمتر الاول لاننا لا نحتاجه if mainChatenabled == false then if messageType == 0 then -- التحقق من نوع الرسالة cancelEvent ( ) -- نكنسل الحدث بحيث ما تنرسل الرسالة outputChatBox("You can't talk because chat has been #ff0000Stopped #ffffffby admin.", source, 255,255,255, true) end if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Chat" ) ) and messageType == 0 then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox (getPlayerName ( source ) .. ": #ffffff" .. message, getRootElement(), r, g, b, true ) end end end ) المشكله انه التيكست You can't talk because ..etc يجيني حتي لو عندي رتبه؟ كيف اخلي الي عندهم رتب ماتجيهم أنحلت مشكله يليل ام غبائي . المشكله اني حاط النوع رساله الي مافيه قروب ادمن فوق وذا سبب لي مشكله تكرار. مشكور ماقصرت حبيبي @Sha67
  14. تعديل : المشكله انحلت بس صار بق مساعده تكفون addEventHandler ( "onPlayerChat" , root , -- حدث عند التكلم بالشات function (player, message, messageType,...) -- وظيفة وتحتوي بارمتر الحدث -- تجاوزنا البارمتر الاول لاننا لا نحتاجه if mainChatenabled == false then if message == 0 then -- التحقق من نوع الرسالة cancelEvent ( ) -- نكنسل الحدث بحيث ما تنرسل الرسالة outputChatBox("You can't talk because chat has been #ff0000Stopped #ffffffby admin.", localPlayer, 255,255,255, true) if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Chat" ) ) and message == 0 then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox (getPlayerName ( source ) .. ": #ffffff" .. player, getRootElement(), r, g, b, true ) end end end end ) الكلام outputChatBox(يتكرر) اذا عنده رتبه
  15. معي مشكله هنا وش حل ؟ ابغى الي عندهم رتب Chat يقدرون يتكلمو كل ماجي اعطي نفسي رتب Chat يجني ب ديبوق كلام الي اكتبه T getPlayerAccount' [Expected account at argument 1, got string 'هلا والله"] getAccountName' [Expeceted account at argument 1, got boolean] ملاحظه الكود ماخذه من هنا addEventHandler ( "onPlayerChat" , root , -- حدث عند التكلم بالشات function (playerSource, msgType,...) -- وظيفة وتحتوي بارمتر الحدث -- تجاوزنا البارمتر الاول لاننا لا نحتاجه if mainChatenabled == false then if msgType == 0 then -- التحقق من نوع الرسالة cancelEvent ( ) -- نكنسل الحدث بحيث ما تنرسل الرسالة outputChatBox("You can't talk because chat has been #ff0000Stopped #ffffffby admin.", localPlayer, 255,255,255, true) end local playerName = getPlayerName(playerSource) local account = getPlayerAccount (playerSource) local account_name = getAccountName(account) elseif msgType == 1 then isObjectInACLGroup("user."..account_name,aclGetGroup("Chat")) end end ) -- اغلاق الحدث ياليت الرد EDIT::: جربت كذا برضو مآشتغل addEventHandler ("onPlayerChat", root, function (message, messageType) if message == 1 then local accName = getAccountName (getPlayerAccount (source)) if isObjectInACLGroup ("user." .. accName, aclGetGroup ("Chat")) then outputChatBox("it's done :)") end end end ) وش سالفه شباب؟
  16. هلا السلام عليكم استخدمت dxDrawLine3D عشان اسوي مربع مثل ب صوره حقتي بس ابغى شيئ واحد كيف اخلي لما الاعب يخرج من المربع ب الخط ثلاثي لو خرج المنطقه يجي نص؟ function makeLineAppear() firstMarker = createMarker ( -224, 125,4, "cylinder",1,255,255,255,255 ) --marker1 twoMarker = createMarker ( -200, 125,4, "cylinder",1,255,0,0,255 )--marker2 threeMarker = createMarker ( -200, 157,6, "cylinder",1,0,255,0,255 )--marker3 fourMarker = createMarker ( -224, 157,6, "cylinder",1,0,0,255,255 )--marker4 addEventHandler("onClientRender", root, createLine) outputChatBox("it's done") end function createLine ( ) x1, y1, z1 = getElementPosition ( firstMarker ) x2, y2, z2 = getElementPosition ( twoMarker ) x3, y3, z3 = getElementPosition ( threeMarker ) x4, y4, z4 = getElementPosition ( fourMarker ) dxDrawLine3D ( x1, y1, z1, x2, y2, z2, tocolor ( 0, 255, 0, 230 ), 2) -- Marker 1 connected with marker 2 dxDrawLine3D ( x2, y2, z2, x3, y3, z3, tocolor ( 0, 255, 0, 230 ), 2) -- Marker 2 connected with marker 3 dxDrawLine3D ( x3, y3, z3, x4, y4, z4, tocolor ( 0, 255, 0, 230 ), 2) -- Marker 3 connected with marker 4 dxDrawLine3D ( x4, y4, z4, x1, y1, z1, tocolor ( 0, 255, 0, 230 ), 2) -- Marker 4 connected with marker 1 end addCommandHandler("work", makeLineAppear) م محاولتي ويجي تكرار function makeLineAppear() firstMarker = createMarker ( -224, 125,4, "cylinder",1,255,255,255,255 ) twoMarker = createMarker ( -200, 125,4, "cylinder",1,255,0,0,255 ) threeMarker = createMarker ( -200, 157,6, "cylinder",1,0,255,0,255 ) fourMarker = createMarker ( -224, 157,6, "cylinder",1,0,0,255,255 ) addEventHandler("onClientRender", root, createLine) outputChatBox("work") end function createLine ( ) x1, y1, z1 = getElementPosition ( firstMarker ) x2, y2, z2 = getElementPosition ( twoMarker ) x3, y3, z3 = getElementPosition ( threeMarker ) x4, y4, z4 = getElementPosition ( fourMarker ) dxDrawLine3D ( x1, y1, z1, x2, y2, z2, tocolor ( 0, 255, 0, 230 ), 2) -- Create 3D Line between Marker1 and local player. dxDrawLine3D ( x2, y2, z2, x3, y3, z3, tocolor ( 0, 255, 0, 230 ), 2) -- Create 3D Line between Marker2 and local player. dxDrawLine3D ( x3, y3, z3, x4, y4, z4, tocolor ( 0, 255, 0, 230 ), 2) -- Create 3D Line between Marker2 and local player. dxDrawLine3D ( x4, y4, z4, x1, y1, z1, tocolor ( 0, 255, 0, 230 ), 2) -- Create 3D Line between Marker2 and local player. local notmarker = (x1 and y1 and z1) if not notmarker then --outputChatBox("you leave") else outputChatBox("you leave") end end addCommandHandler("work", makeLineAppear)
  17. i think problems in shader because it causes such if you have experience in shader you can fix it
  18. iiv03

    please help :(

    pleaaase where problem here i'm really confused why not call triggerServerEvent?? function sys(thePlayer, command) local accName = getAccountName(getPlayerAccount(thePlayer)) local playerName = getPlayerName (thePlayer) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" )) then outputChatBox("| the Admin has been #00ff00enabled #ffffffResource Training by "..playerName, root, 255,255,255,true) else outputChatBox("#ffffffAccess Denied", thePlayer,255,255,255,true) end end addEvent("amkocworkplz", true) addEventHandler("amkocworkplz", getRootElement(), sys) addCommandHandler("eres", sys) CLIENT function fastestman() if triggerServerEvent("amkocworkplz", getRootElement()) then addCommandHandler("sw", sw) addCommandHandler("lw", lw) end end
  19. iiv03

    please help :(

    i tried like this and i get some problems in server side excepted argument 1, got nil function onSystemEnabled() if triggerServerEvent("checkPlayer", resourceRoot, player) then removeCommandHandler("setw", saveCheckPoint) removeCommandHandler("sett", saveCheckPoint) unbindKey("f2") --nbindKey("n") local localPlayerName = getPlayerName(getLocalPlayer()) triggerServerEvent("outputBoxChat", resourceRoot," work "..localPlayerName) else outputChatBox("Access Denied", 255,255,255,true) end end -- same addCommandHandler("dres", onSystemEnabled) server: function SystemCenter(player) local playerName = getPlayerName(player) local account = getPlayerAccount (player) local account_name = getAccountName(account) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user."..account_name, aclGetGroup ( "Admin" )) then else outputChatBox("Access Denied", root, 255,255,255,true) end end addEvent("checkPlayer", true) addEventHandler("checkPlayer", root, SystemCenter)
  20. iiv03

    please help :(

    yo guys i'm trying to make an command to Enabled and Disabled but i noticed a mistake when my friend tired wrote command he just only succeeded worked with him and did not work when all players like almost .localPlayer. i have tried and did not work for me what is the problem in that? server side: function SystemCenter(player) local account = getPlayerAccount (player) local accName = getAccountName ( getAccountName ( account ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then setElementData(source,"Admin",true) end end client side: function onSystemDisabled() if getElementData(localPlayer,"Admin") then removeCommandHandler("setw") removeCommandHandler("sett") unbindKey("f2") --nbindKey("n") local localPlayerName = getPlayerName(getLocalPlayer()) triggerServerEvent("outputBoxChat", resourceRoot," work "..localPlayerName) else -- invert outputChatBox("Access Denied", 255,255,255,true) end -- to close a event end -- to close a function addCommandHandler("dres", onWarpsClose) how i do if i write this and come to all players?
  21. السلام عليكم كيف اخلي getTickCount يجيب لي ارقام ثواني ؟ مشكله تجيني الثواني 6131426.80785 محاولتي local TiempoPr = 0 addEvent("onPlayerSpray", true) addEventHandler("onPlayerSpray", root, function(rockets) if ( getTickCount ( ) - TiempoPr > 5000 ) then TiempoPr = getTickCount ( ) outputChatBox("Player #FFFFFF"..getPlayerName(source).." #FFFFFFhas shot #aacccc["..rockets.." #ffffffrockets in #ffffff"..TiempoPr.." #ffffffseconds]", root, 255, 255, 255, true) end end )
×
×
  • Create New...