-
Posts
843 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Bilal135
-
mi Bilal yo shi' ok?
-
WigglyTv's first video has been out! Click here to watch the video on WigglyTv's Facebook Page
-
Last post was done on Tuesday, Oct 14. So let me tell you all one thing, Uncle Bilal's topic has come back, so start asking questions from me. Go ahead, months have passed. No see. Hehehee.
-
I got one more problem. I added this line to client: local investedmoney = guiGetText(GUIEditor.edit[1]) triggerServerEvent ("result", getLocalPlayer(), investedmoney) and this to the server: addEvent("result", true) function investedMoney(investedmoney) if (tonumber(investedmoney) <= 9999) then player = source local profit = givePlayerMoney(player, math.random(1000, 15000)) local loss = takePlayerMoney(player, math.random(1000, 15000)) end if profit then outputChatBox("------", player, 0, 255, 0) outputChatBox("You invested "..investedmoney.." in a company in Libery City Exchange (LCN). The results are below.", player, 0, 255, 0) outputChatBox("Result: Profit ("..profit..")", player, 0, 255, 0) end if loss then outputChatBox("------", player, 255, 0, 0) outputChatBox("You invested "..investedmoney.." in a company in Libery City Exchange (LCN). The results are below.", player, 255, 0, 0) outputChatBox("Result: Profit ("..loss..")", player, 255, 0, 0) end end addEventHandler("result", getRootElement(), investedMoney) Still console gives errors and it doesn't work. server.lua:3: Attempt to compare nil with number. server.lua:12: Attempt to compare number with nil. Also, how can I make that profit and loss happen randomly every five minutes? I know the setTimer but other things. Thanks.
-
3) About Dx u need : https://wiki.multitheftauto.com/wiki/OnClientRender https://wiki.multitheftauto.com/wiki/RemoveEventHandler Can you do it for me, I wanna see how it has to be done.
-
GUI opens on resource start, and still it doesn't work even if I have the money, it doesn't show the message then and doesn't take the money.
-
My script ain't working at all, the GUI opens but the dx doesn't appear, and nothing happens when I write amount of money into the editbox and press the desired button. Please fix my code, can't figure out how to fix it. client: GUIEditor = { button = {}, window = {}, edit = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(315, 125, 763, 472, "Stock Market", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(10, 28, 202, 32, "LCN Exchange", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.label[2] = guiCreateLabel(11, 66, 134, 21, "Company Names", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") GUIEditor.label[3] = guiCreateLabel(155, 66, 109, 17, "Information", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") GUIEditor.label[4] = guiCreateLabel(11, 87, 57, 20, "Binco", false, GUIEditor.window[1]) GUIEditor.label[5] = guiCreateLabel(157, 88, 543, 21, "Sells various clothes to the people of San Andreas. Progress Rate: 10.11, Loss Rate: 5.43", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(9, 400, 93, 40, "Invest For Binco", false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(19, 444, 73, 18, "", false, GUIEditor.window[1]) GUIEditor.label[6] = guiCreateLabel(10, 109, 94, 19, "AuguryInsurance", false, GUIEditor.window[1]) GUIEditor.label[7] = guiCreateLabel(156, 109, 544, 19, "Life Insurance company. Progress Rate 60.2, Loss Rate: 40.7", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(112, 400, 106, 40, "Invest For AuguryInsurance", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(126, 444, 82, 18, "", false, GUIEditor.window[1]) GUIEditor.label[8] = guiCreateLabel(10, 130, 96, 15, "AirEmu", false, GUIEditor.window[1]) GUIEditor.label[9] = guiCreateLabel(155, 130, 545, 18, "Makes cargo and passenger planes. Progress Rate: 11.7, Loss Rate: 5.64", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(228, 400, 110, 40, "Invest For AirEmu", false, GUIEditor.window[1]) GUIEditor.edit[3] = guiCreateEdit(244, 444, 84, 19, "", false, GUIEditor.window[1]) GUIEditor.label[10] = guiCreateLabel(11, 153, 93, 15, "FlyUS", false, GUIEditor.window[1]) GUIEditor.label[11] = guiCreateLabel(154, 153, 546, 15, "Makes cargo and passenger planes. Progress Rate: 17.2, Loss Rate: 10.29", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(348, 400, 104, 40, "Invest For FlyUS", false, GUIEditor.window[1]) GUIEditor.edit[4] = guiCreateEdit(358, 444, 84, 19, "", false, GUIEditor.window[1]) GUIEditor.label[12] = guiCreateLabel(10, 175, 112, 15, "Los Santos Customs", false, GUIEditor.window[1]) GUIEditor.label[13] = guiCreateLabel(154, 175, 547, 18, "Tuning shops all over Los Santos. Progress Rate: 2.76, Loss Rate: 8.90", false, GUIEditor.window[1]) GUIEditor.button[5] = guiCreateButton(461, 402, 103, 38, "Invest For Los Santos Customs", false, GUIEditor.window[1]) GUIEditor.edit[5] = guiCreateEdit(471, 444, 83, 19, "", false, GUIEditor.window[1]) GUIEditor.label[14] = guiCreateLabel(573, 406, 176, 28, "Liberty City National", false, GUIEditor.window[1]) local font0_ChineseText = guiCreateFont(":guieditor/fonts/ChineseText.ttf", 16) guiSetFont(GUIEditor.label[14], font0_ChineseText) guiLabelSetColor(GUIEditor.label[14], 0, 159, 3) GUIEditor.label[15] = guiCreateLabel(621, 430, 79, 29, "Exchange", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[15], font0_ChineseText) guiLabelSetColor(GUIEditor.label[15], 0, 159, 3) GUIEditor.button[6] = guiCreateButton(710, 26,38, 28, "X", false, GUIEditor.window[1]) guiSetVisible(GUIEditor.window[1], false) end ) function closeGui() if (source == GUIEditor.button[6]) then guiSetVisible(GUIEditor.window[1], false) end if (source == GUIEditor.button[1]) then local a = guiGetText(GUIEditor.edit[1]) local money = getPlayerMoney(localPlayer) if (money > 99) then takePlayerMoney(localPlayer, tonumber(a)) else return outputChatBox("You must invest more than $100 or you don't have enough money!", 255, 0, 0) end end if (source == GUIEditor.button[2]) then local b = guiGetText(GUIEditor.edit[2]) local money = getPlayerMoney(localPlayer) if (money > 99) then takePlayerMoney(localPlayer, b) end end if (source == GUIEditor.button[3]) then local c = guiGetText(GUIEditor.edit[3]) local money = getPlayerMoney(localPlayer) if (money > 99) then takePlayerMoney(localPlayer, c) end end if (source == GUIEditor.button[4]) then local d = guiGetText(GUIEditor.edit[4]) local money = getPlayerMoney(localPlayer) if (money > 99) then takePlayerMoney(localPlayer, d) end end if (source == GUIEditor.button[5]) then local e = guiGetText(GUIEditor.edit[5]) local money = getPlayerMoney(localPlayer) if (money > 99) then takePlayerMoney(localPlayer, e) end end end addEventHandler("onClientGUIClick", getRootElement(), closeGui) addCommandHandler("stockexchange", function() dxDrawRectangle(323, 186, 746, 333, tocolor(0, 0, 0, 255), false) dxDrawLine(467, 188, 467, 517, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 208, 1067, 208, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(323, 230, 1068, 231, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 252, 1066, 252, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 274, 1067, 274, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 296, 1066, 297, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 317, 1064, 317, tocolor(255, 255, 255, 255), 1, false) guiSetVisible(GUIEditor.window[1], true) showCursor(true) end )
-
A. Idk what you meant... Q. What do you mean?
-
[Media] Left 4 Theft : San Andreas (Feature List)
Bilal135 replied to Bilal135's topic in Urdu / اُردُو
Shukriya! -
[Media] Left 4 Theft : San Andreas (Feature List)
Bilal135 replied to Bilal135's topic in Urdu / اُردُو
Shukriya. -
Mera server, Left 4 Theft : San Andreas jis ka beta 1.0 kal release ho raha hai, us ki aik choti se video aap yaahan dekh sakte hain. Server topic: viewtopic.php?f=115&t=87027 Video: https://vimeo.com/125367924 Shukriya.
-
LUN means dick in Urdu, you mind your language. Lambert Union Nudity
-
Disturbance Warranty Quack BCH
-
Thanks Dimos7, it works perfectly and now I understood how to do it.
-
Serverside pe karne ka aik faida hai ke kisi ko bhi client cache se complete script nai milti. Agar aap saari cheez hi client side pe karo gay to koi bhi aap ki script ko easily steal kar le ga.
-
That works, but it doesn't get removed when out of the zone. EDIT: it appears as the resource starts, no matter if the player is out of redzone or not.
-
Mene aap ki script ko check nai kiya lekin aap ki script mein zaroor koi na koi error ho ga, aap khudi check kar ke dekh lo aur phir bata dena ke chali ya nai, lekin mere 100% work karti hai. Aap ko kuch cheezeu server side bhi karni parti hain bhai aur events ko jaga jaga trigger karna parta hai phir aap ki script smoothly chalti hai. Phir smoothly nahi balkay server performance ko kharab karti hain: Pehli baat, aap ka code raucously lengthy hai, in baton main: - Hum addCommandHandler ko client side main bhi daal saktay hain, is se hamain server-to-client request ki zaroorat nahi hai. - Hum setElementHealth wala function bhi client side par daal saktay hain kyun ke ye shared function hai + client-to-server request ki zaroorat nahi hai. - Extra functions like closeGUI ko bhi serverside se call ki zaroorat nahi ho gi. - Small tip: getLocalPlayer() ab old-age ho gya hai, is ki short form localPlayer hai jo kay ab zyada use hoti hai, dono same hain. Also, aap ko mujhay hai 'smoothly' wali batein sikhao hi na, mera ecripting experience shayad aap se kam ho lekin maine aaj tak kisi se help nahi li aur meri scripts dekhi jayen to server ko 0.1% se zyada use nahi karti. Haan meri script nahi chali ho gi kyun ke ye setElementHealth(localPlayer, 200) karti hai, is ko 100 karo aur check karo, phir sikhana mujhay scripting. Aap bilkul theek keh rahe ho lekin is se aap to larai pe aa gai, mein pata nai kyun is post se offended feel kar raha hoon. Well mene aap ki woh wali cheez theek kar ke try kiya (mene 200 se 100 ko set kar diya) lekin phir bhi aap ki script kaam nai karti. Debugscript 3: Expected function at argument 3 got nil. (16th line).
-
Mene aap ki script ko check nai kiya lekin aap ki script mein zaroor koi na koi error ho ga, aap khudi check kar ke dekh lo aur phir bata dena ke chali ya nai, lekin mere 100% work karti hai. Aap ko kuch cheezeu server side bhi karni parti hain bhai aur events ko jaga jaga trigger karna parta hai phir aap ki script smoothly chalti hai.
-
Can you do it for me, coz I'm not expert in GUI scripting, and it will be helpful for me in my future scripts if you do it. Thanks.
-
Nai ye bilkul bhi nai work kre ga. Is ko mene test kiya hai, kaam karta hai mera code. client: GUIEditor = { button = {}, window = {} } addEvent("showGui", true) addEventHandler("showGui", root, function() GUIEditor.window[1] = guiCreateWindow(321, 197, 154, 140, "HEALTH PANEL", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(10, 22, 134, 108, "GIVE HEALTH", false, GUIEditor.window[1]) showCursor(true) end ) function closeGui() guiSetVisible(GUIEditor.window[1], false) showCursor(false) end addEvent("closeTheGui", true) addEventHandler("closeTheGui", root, closeGui) function onGuiClick () if (source == GUIEditor.button[1]) then triggerServerEvent ("giveHealth", getLocalPlayer()) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) server: function showTheGui(thePlayer) triggerClientEvent(thePlayer, "showGui", thePlayer) end addCommandHandler("openmenu", showTheGui) function giveHealthOnClick() setElementHealth(source, 100) outputChatBox("You've been given health!", source, 255, 0, 0) end addEvent("giveHealth", true) addEventHandler("giveHealth", getRootElement(), giveHealthOnClick) function closeGui(thePlayer) triggerClientEvent(thePlayer, "closeTheGui", thePlayer) end addCommandHandler("closemenu", closeGui) Mere code ko gor se dekho aur tumhe samajh aa jai gi. Good luck. Meu binds ke baare mein pakka nai hoon is liye aap /openmenu se open aur /closemenu se close kar sakte hain.
-
My script works fine, but the dx text appears just for a second on hit of col shape and won't stay until I leave the radar area. So here's it, I can't find anyway to solve this problem so I'm here to ask for help. server local radararea = createRadarArea(1338.5789794922, -1753.3083496094, 200, 200, 255, 0, 0) local col = createColRectangle(1338.5789794922, -1753.3083496094, 100, 200) function sa() setElementAlpha(radararea, 100) end addEventHandler("onResourceStart", root, sa) function areaEnter(thePlayer, matchingDimension) if (getElementType(thePlayer) == "player") then setRadarAreaFlashing(radararea, true) triggerClientEvent(thePlayer, "colHit", thePlayer) end end addEventHandler("onColShapeHit", getRootElement(), areaEnter) function areaExit(thePlayer, matchingDimension) if (getElementType(thePlayer) == "player") then if isPedDead(thePlayer) ~= true then setRadarAreaFlashing(radararea, false) end end end addEventHandler("onColShapeLeave", getRootElement(), areaExit) client: addEvent("colHit", true) addEventHandler("colHit", root, function() dxDrawText("You have entered the red zone. A hidden package (Gunbox) can be found here.", 378, 594, 1055, 680, tocolor(255, 255, 255, 255), 1.00, "sans", "center", "center", false, false, false, false, false) end )