-
Posts
2,490 -
Joined
-
Days Won
18
Everything posted by N3xT
-
Client : addEventHandler("onClientGUIClick",root, function ( ) if source == GUIEditor.button[1] then local item = guiComboBoxGetSelected ( GUIEditor.combobox[1] ) local text = guiComboBoxGetItemText ( GUIEditor.combobox[1] , item ) local name = guiGetText( editname ) local mail = guiGetText ( editmail ) local card = guiGetText ( editcard ) if name ~= "" or mail ~= "" or card ~= "" or text ~= "" then triggerServerEvent ( "RentSystem:onCreateNewOrder", localPlayer, name, mail, card, text ) guiSetEnabled ( GUIEditor.button[1], false ) outMsg("تم إرسال الرسالة",true) end end end ) addEvent ( "RentSystem:onAccept", true ) addEventHandler ( "RentSystem:onAccept", root, function (name,mail,card,text) local row = guiGridListAddRow (gridlist) guiGridListSetItemText (gridlist,row,1,getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x", ""),false,false) guiGridListSetItemText (gridlist,row,2,text,false,false) guiGridListSetItemText (gridlist,row,3,getPlayerSerial(),false,false) end ) Server : addEvent( "RentSystem:onCreateNewOrder", true ) addEventHandler( "RentSystem:onCreateNewOrder", root, function (name, mail, card, text) triggerClientEvent("RentSystem:onAccept",root,name,mail,card,text) end )
-
هههههههههههههههههههههههههههههههههههههههههههههههه
-
السلام عليكم ورحمة الله وبركاته . عندي إستفسار بسيط عن الجداول , لـ نفترض إنه عندي جدول كذا Table = { ["السلام عليكم ورحمة الله وبركاته"] ["وعليكم السلام ورحمة الله وبركاته"] } math.random وإستعملت معه عشان يطلع لي بالشات شيء من الجدول .. طبعاً كذا راح يجيب قيمة عشوائية من الجدول فقط ، لذلك انا مابي قيمة عشوائية إستفساري هو هل يمكن أني أخلي كل مرة وحدة تجي ؟ يعني ما تكون القيمة عشوائية .
-
ملاحظة : فيه مشكلة واجهتني أنه يكتب ع بعض عشان الكلنت رندر حاولت أحلها بس م عرفت ، إنتظر أحد يعرف يحلها . Client function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,checkBuildings,checkVehicles,checkPeds,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center") end end end end addEventHandler("onClientRender", getRootElement(), function () setTimer ( function() for k,v in ipairs(getElementsByType("player")) do if getElementData(v, "status") == "AFK" then dxDrawTextOnElement(v,"AFK",1,20,255,0,0,255,3,"arial-bold") cancelEvent() return end end end, 15000, 0 ) end) Server function checkAFKPlayers() for index, thePlayer in ipairs(getElementsByType("player")) do if (getPlayerIdleTime(thePlayer) > 6000) and getElementData(thePlayer, "status") == "Online" then outputChatBox("Done Server!") setElementData ( thePlayer, "status", "AFK" ) else setElementData ( thePlayer, "status", "Online" ) end end end setTimer(checkAFKPlayers, 15000, 0)
-
مستحيل يجي شيء ع اللاعب لأنه المفروض يكون فيه كلنت راندر لذلك لازم تستعمل داتا
-
كلنت function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,checkBuildings,checkVehicles,checkPeds,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center") end end end end addEvent("afk", true) addEventHandler("afk", root, function ( player ) dxDrawTextOnElement(player,"AFK",1,20,255,0,0,255,1,"arial") end سيرفر function checkAFKPlayers() for index, thePlayer in ipairs(getElementsByType("player")) do if (getPlayerIdleTime(thePlayer) > 60000) then triggerClientEvent ("afk", source, thePlayer) end end end) setTimer(checkAFKPlayers, 15000, 0)
-
طبعا لا ، اذا كان الداتا حق مود التاج حقك اللي تركب منه تاجات موجود تخليه يطلعه بالشات بوكس ، إذا مب موجود الداتا يجيب التاج حق الرتبة
-
الفرق بين كوده وكودك ان حقك يتحقق من ان قيمة الداتا ترو false و nil وحقه يتحقق ان الداتا لها قيمة يعني ماتكون هو المفروض يحطها مع حدث اون بلاير شات واذا كانت ترو يطلع التاج وإذا فولس يطلع التاج الأصلي
-
جرب كذا وبدل ألازرار وأسماء اللوحات addEventHandler("onClientGUIClick", root, function () if source == الزر then guiSetVisible(1 اللوحة, false) guiSetVisible(2 اللوحة, true) showCursor(true) end end )
-
triggerClientEvent createObject moveObject dxDrawText fadeCamera spawnPlayer بالنسبة لـ يجي تحميل كيف تبي تجيب له تحميل والتحميل حقه خلص ؟
-
if getElementData(source,"Tag") == true then cancelEvent() end
-
تأكد من أسم اللوحة ، هل هي دي أكس ولا gui ؟
-
ممكن تخلي السيارة تمشي لإحداثيات معينة ، لكن أتوقع ما تقدر تخليها تهجول !
-
المملكة العربية السعودية
-
# Client : GUIEditor = { gridlist = {}, window = {}, button = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(537, 139, 263, 431, "Police Panel", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1],false) GUIEditor.button[1] = guiCreateButton(13, 258, 236, 26, "Fix Car", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFEFEFE") GUIEditor.button[2] = guiCreateButton(10, 327, 108, 38, "Kill / Slap", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0BC4F3") GUIEditor.button[3] = guiCreateButton(145, 327, 108, 38, "Destroy Car", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0BC4F3") GUIEditor.label[1] = guiCreateLabel(13, 370, 132, 15, "Your Name:", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(10, 401, 181, 15, "#Created By Rock | v1.2", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 221, 7, 7) GUIEditor.gridlist[1] = guiCreateGridList(10, 28, 244, 220, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Players", 0.9) GUIEditor.button[4] = guiCreateButton(13, 291, 236, 26, "Blow Car", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFEFEFE") end ) addEvent ( 'open', true ) addEventHandler ( 'open', root, function ( ) if guiGetVisible ( GUIEditor.window[1]) then guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) guiSetInputEnabled ( false ) else guiSetVisible ( GUIEditor.window[1], true ) showCursor ( true ) guiSetInputEnabled ( false ) end end ) function update () guiGridListClear(GUIEditor.gridlist[1]) for i,v in ipairs (getElementsByType("player")) do local rp = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1],rp,1,getPlayerName(v):gsub("#%x%x%x%x%x%x", ""),false,false) end end addEventHandler ("onClientResourceStart",resourceRoot,update) addEventHandler ("onClientPlayerJoin",root,update) addEventHandler ("onClientPlayerChangeNick",root,update) addEventHandler ("onClientPlayerQuit",root,update) addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == GUIEditor.button[2]) then local row = guiGridListGetSelectedItem (GUIEditor.gridlist[1]) local select = guiGridListGetItemText (GUIEditor.gridlist[1], row, 1) if (select and select ~= "") then outputChatBox("#FF0000# #FFFFFFSuccessfully Killed The Player",255,0,0,true) triggerServerEvent ("kill", localPlayer, select) else outputChatBox("#FF0000# #FFFFFFPlease Select A Player",255,0,0,true) end end end ) # Server : addEvent ( "kill", true ) addEventHandler ( 'kill', getRootElement ( ), function ( target ) local player = getPlayerFromName ( target ) local killed = getPlayerName ( player ) killPed(killed) end )
-
guiGridListGetItemText guiGridListGetSelectedItem triggerServerEvent getPlayerFromName killPed
-
" onClientRendar " الإفنت غلط
-
سو حدث إذا مثلاً اختار لاعب بالقريد يرسل التريقر للسيرفر عشان يجيب سيرياله # Server : addEvent ( "ip", true ) addEventHandler ( 'ip', getRootElement ( ), function ( player ) local who = getPlayerFromName ( player ) local ip = getPlayerIP ( who ) triggerClientEvent ("getIP", source, ip) end ) # Client : addEventHandler("getIP",root, function( ip ) guiSetText(LabelName,ip) end )