JehadGh
-
Posts
14 -
Joined
-
Last visited
Posts posted by JehadGh
-
-
dx الحين انا عندي لوحتين وحده عادية ووحده
كيف ابفتح الثنتين لما لاعب يخش ماركر معين ؟
: الاكواد
-- اللوحه العادية function () GUIEditor.window[1] = guiCreateWindow(509, 379, 810, 353, "", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "Visible", "False") hamrger = guiCreateButton(568, 589, 209, 106, "", false) shwrma = guiCreateButton(824, 589, 208, 105, "", false) potato = guiCreateButton(1078, 590, 208, 104, "", false) exit = guiCreateButton(1287, 385, 32, 30, "", false) guiSetProperty(exit, "Visible", "False") GUIEditor.staticimage[1] = guiCreateStaticImage(568, 413, 210, 154, "hamburger.png", false) GUIEditor.staticimage[2] = guiCreateStaticImage(824, 413, 208, 154, "shawarma.png", false) GUIEditor.staticimage[3] = guiCreateStaticImage(1077, 415, 209, 152, "potato.png", false) end -- dx اللوحة الـ function dx() dxDrawImage(1280, 376, 43, 44, "close.png", 0, 0, 0, tocolor(131, 126, 123, 255), false) dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(509, 378, 1319, 378, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(509, 378, 509, 731, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(508, 731, 1319, 731, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(1319, 378, 1319, 731, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(777, 589, 777, 695, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(776, 695, 566, 695, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(568, 588, 568, 695, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(509, 378, 1319, 378, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(509, 378, 509, 731, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(508, 731, 1319, 731, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(1319, 378, 1319, 731, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(777, 589, 777, 695, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(778, 695, 568, 695, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(568, 588, 568, 695, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(823, 588, 1032, 588, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(1077, 588, 1286, 588, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(1032, 694, 822, 694, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(1032, 589, 1032, 695, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(823, 588, 823, 694, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(1077, 589, 1077, 695, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(1286, 588, 1286, 694, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(1287, 694, 1077, 694, tocolor(255, 255, 255, 255), 1, false) dxDrawText("Hamburger 300$", 586, 602, 756, 672, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false) dxDrawText("Shawrma 200$", 840, 604, 1010, 674, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false) dxDrawText("Potato 100$", 1097, 604, 1267, 674, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false) end
ومشكورين مسبقاً يجماعة
-
23 hours ago, Do_De<3 said:
Client Side
local Marker = createMarker( x, y, z, "cylinder",1,255,255,0,255) -- تسوي ماركر بدل x,y,z لاحداثيات المكان الي تبيه الماركر addEventHandler ( "onClientMarkerHit", Marker, -- حدث ان اللاعب اول م يدخل الماركر function ( player ) if ( player == localPlayer and getElementType ( player ) == "player" ) then -- نتحقق انه لاعب مو بيد ولا شي من هذا القبيل guiSetVisible(GUIEditor.window[1],true) -- نتفح اللوحة showCursor(true) -- نفتح الماوس end -- اند end -- اند ) -- قوس
مشكور يالطيب ما قصرت يعطيك العافية
-
9 minutes ago, Do_De<3 said:
Client Side
addEventHandler("onClientGUIClick",root, function() if source == GUIEditor.button[1] then triggerServerEvent("Hamburger_15",localPlayer) end end )
Server Side
addEvent('Hamburger_15',true) addEventHandler('Hamburger_15',root,function() local money = getPlayerMoney(client) -- نجيب فلوس اللاعب if not (money > 200) then return outputChatBox("ليس لديك مال كافي", client, 255,0,0, false) end -- يتحقق ان معه 200 takePlayerMoney ( client, 200 ) -- يسحب 200 من اللاعب setElementHealth( client, 100 ) -- يعطيه 100 دم end -- اند ) -- قوس
يعطيك العافية اكثر شرح مفهوم كثر الله خيرك يالطيب , بس ممكن لو سمحت تقولي كيف اربط اللوحة بماركر لما يدخله الاعب تطلع لوحه ؟
-
انا مبتدأ في البرمجة وتوي اتعلم اشياء جديدة وابغا اتعلم على ال gui
سويت وحدة بالاديتور وهذا كودها
GUIEditor = { button = {}, window = {}, staticimage = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(343, 200, 696, 320, "Food Meau", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.70) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF9615E8") GUIEditor.button[1] = guiCreateButton(57, 192, 157, 72, "Hambuger (300$)", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(287, 193, 158, 71, "Potato (100$)", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(197, 1, 158, 70, "", false, GUIEditor.button[2]) GUIEditor.button[4] = guiCreateButton(507, 192, 158, 71, "Shawrma (200$)", false, GUIEditor.window[1]) GUIEditor.staticimage[1] = guiCreateStaticImage(58, 49, 156, 133, ":Guieditor/images/hamburger.png", false, GUIEditor.window[1]) GUIEditor.staticimage[2] = guiCreateStaticImage(287, 51, 156, 131, ":Guieditor/images/potato.png", false, GUIEditor.window[1]) GUIEditor.staticimage[3] = guiCreateStaticImage(513, 47, 148, 135, ":Guieditor/images/shawarma.png", false, GUIEditor.window[1]) end )
كيف ابخلي الزر 1 يلي هو اسمه همبرغر ينقص فلوس ويزود دم الاعب ؟
انا عارف انو لازم استخدم هذول الفنكشنين
setPlayerMoney setElementHealth
بس مب عارف كيف اربطهم بالزر ياليت تساعدوني
-
On 10/09/2019 at 19:15, LVx said:
المشكله اني خايف سالت واحد يقولي مب زين يقول تجيك دروبات بقراند لن مواصفاته مب زينه عشان كذا خايف انا
اذا تبغا تسمع مني اسمع ما تبغا براحتك , انا جهازي
GTX 660I7 3630QM
مشغل قراند 50 -60 فريم على
720p High
اقول خذه بذا السعر لانو جدا كويس وما عليك بتشتغل على 1080 وفيري هاي
-
-
2 minutes ago, KillerX said:
شكرا كثر خيرك
- 1
-
-
2 hours ago, stPatrick said:
https://wiki.multitheftauto.com/wiki/OnPlayerLogin
-- SERVER addEventHandler ( "onPlayerLogin", root, function ( thePreviousAccount, theCurrentAccount ) local accName = getAccountName ( theCurrentAccount ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then setElementData( source, "cons", true) else setElementData( source, "cons", false) end end )
bro you are really kind , thanks alot bro
-
its just not working
server-side
addEventHandler ( "onPlayerLogin", root, function ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then setElementData( source, "cons", true) else setElementData( source, "cons", false) end end )
client-side
function fly() if ( getElementData ( localPlayer, "cons") == true ) then if isWorldSpecialPropertyEnabled("aircars") then setWorldSpecialPropertyEnabled("aircars", false) outputChatBox("its off !", 255, 0, 0) else setWorldSpecialPropertyEnabled("aircars", true) outputChatBox("its on !", 0, 255, 0 )) end elseif ( getElementData ( localPlayer, "cons") == false ) then outputChatBox("You are not a admin") end end addCommandHandler("flyy", fly )
errors :
server.lua:3: Bad arrgument @ getPlayerAccount [expected element at argument 1, got account]
server.lua:3: Bad arrgument @ getAccountname [expected element at argument 1, got boolean]
server.lua:4: attempt to concatenate local 'accName' (a boolean value)
thanks .
-
sorry but one last question
-- CLIENT 1. function check() 2. if (getElementData(localPlayer, "loggedin")) then 3. outputChatBox("You are a player") 4. else 5. outputChatBox("You are a guest") 6. end 7. end 8. addCommandHandler("data", check)
why we didn't type true in the line 2. like this
if (getElementData(localPlayer, "loggedin") == true ) then
-
your so nice with me lol , i just tried the code and when i start the mod i get this
ERROR: Loading script failed , unexpected symbol near "
in this line addEventHandler("onPlayerLogin", getRootElement(), login)
-
so 1 means true and 0 means false?
-
hello guys
first things first i'm a beginner so i have a problem in a simple code that i tried too many times , the error that when i type /data i get "you are a guest" even if i have logged in my account
here is the code
server
local guests = { } local players = { } function join() setElementData( source, "guests", 1) end addEventHandler("onPlayerJoin", getRootElement(), join) function login() setElementData( source, "players", 1) end addEventHandler("onPlayerLogin", getRootElement(), login)
client
function check() if (getElementData( localPlayer, "guests") == 1 ) then outputChatBox("You are a guest") else if (getElementData( localPlayer, "players") == 1 ) then outputChatBox("You are a player") end end end addCommandHandler("data", check)
i have tried to do it in the client only and its worked, but i want to know how the data work
again i'm know i'm a beginner but in my language there is no good courses in lua so i don't understand everything , thanks
مساعدة في اللوحات
in البرمجة
Posted
مشكور يبعدي ما قصرت