-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
Server Side: createTeam ("F.B.I", 0, 255, 0) createTeam ("Resistance", 255, 0, 0) addEvent("setTeam", true) addEventHandler("setTeam", root, function(team) if team then spawnPlayer(source, x, y, z, 0, skin, 0, 0, team) -- replace x, y, z with the position and skin with the id. setCameraTarget(source) triggerClientEvent(source, "onSelectTeam", source) end end) Client Side: GUIEditor = { button = {}, } GUIEditor.button[1] = guiCreateButton(847, 254, 157, 46, ">>", false) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.button[2] = guiCreateButton(376, 254, 157, 46, "<<", false) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0000FF") fadeCamera(true, 5) showCursor(true) setCameraMatrix(1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) function setCamera() dxDrawText("Resistance", 764, 141, 1004, 191, tocolor(255, 0, 0, 255), 1.30, "bankgothic", "center", "top", false, false, true, false, false) dxDrawImage(845, 191, 68, 63, ":Class/class/Classicon_warrior.png", 333, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("F.B.I", 466, 141, 706, 190, tocolor(0, 0, 255, 255), 1.30, "bankgothic", "left", "top", false, false, true, false, false) dxDrawImage(466, 191, 67, 64, ":Class/class/Classicon_psyron.png", 33, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("Click on the team you want to join!", 533, 22, 847, 141, tocolor(0, 255, 0, 255), 1.00, "bankgothic", "left", "top", false, true, true, false, false) end addEventHandler("onClientRender", getRootElement(), setCamera) function imageC() triggerServerEvent("setTeam", localPlayer, getTeamFromName("Resistance")) end addEventHandler("onClientGUIClick", GUIEditor.button[1], imageC, false) function imageTest() triggerServerEvent("setTeam", localPlayer, getTeamFromName("F.B.I")) end addEventHandler("onClientGUIClick", GUIEditor.button[2], imageTest, false) addEvent("onSelectTeam", true) addEventHandler("onSelectTeam", root, function() removeEventHandler("onClientRender", getRootElement(), setCamera) destroyElement(GUIEditor.button[1]) destroyElement(GUIEditor.button[2]) showCursor(false) end)
-
trigger? getPlayerPing is exists both side. Post your code so we can see where is the problem.
-
No, you don't need to destroy the image. bindKey("mouse2", "both", function(_, state) if (getPedWeapon(localPlayer) ~= 34) then guiSetVisible(myImage, (state == "down" and true or false)) end end)
-
local FROM = "example.lua" local TO = "compiled.lua" function fileLoad(path) local File = fileOpen(path, true) if File then local data = fileRead(File, 500000000) fileClose(File) return data end end function fileSave(path, data) local File = fileCreate(path) if File then fileWrite(File, data) fileClose(File) end end fetchRemote("https://luac.multitheftauto.com/?compile=1&debug=0&blockdecompile=1&encrypt=1", function(data) fileSave(TO, data) end, fileLoad(FROM), true)
-
Line 18 was edited to make you able to test it with yourself: if (target == thePlayer) then If you done the test or you want pm another player then just change it to: if (target ~= thePlayer) then
-
>server>mods>deathmatch>resources https://wiki.multitheftauto.com/wiki/Server_Manual
-
Client Side: GUIEditor = { button = {}, } GUIEditor.button[1] = guiCreateButton(847, 254, 157, 46, ">>", false) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.button[2] = guiCreateButton(376, 254, 157, 46, "<<", false) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0000FF") fadeCamera(true, 5) setCameraMatrix(1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) function setCamera() dxDrawText("Resistance", 764, 141, 1004, 191, tocolor(255, 0, 0, 255), 1.30, "bankgothic", "center", "top", false, false, true, false, false) dxDrawImage(845, 191, 68, 63, ":Class/class/Classicon_warrior.png", 333, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("F.B.I", 466, 141, 706, 190, tocolor(0, 0, 255, 255), 1.30, "bankgothic", "left", "top", false, false, true, false, false) dxDrawImage(466, 191, 67, 64, ":Class/class/Classicon_psyron.png", 33, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("Click on the team you want to join!", 533, 22, 847, 141, tocolor(0, 255, 0, 255), 1.00, "bankgothic", "left", "top", false, true, true, false, false) end addEventHandler("onClientRender", getRootElement(), setCamera) function imageC() triggerServerEvent("setTeam", localPlayer, getTeamFromName("Resistance")) end addEventHandler("onClientGUIClick", GUIEditor.button[1], imageC, false) function imageTest() triggerServerEvent("setTeam", localPlayer, getTeamFromName("F.B.I")) end addEventHandler("onClientGUIClick", GUIEditor.button[2], imageTest, false) Server Side: addEvent("setTeam", true) addEventHandler("setTeam", root, function(team) if team then setPlayerTeam(source, team) end end)
-
@Blaawee, Where is sourceResource defined? --- fileSave + fileLoad look like a custom function to save and load the file.
-
You never used getPlayerTeam to compare it with getTeamFromName.
-
الأكواد ذي ما لها اي معنى وخطأ بالكامل و هريسه حجم كبير https://wiki.multitheftauto.com/wiki/AR/%D9%85%D9%82%D8%AF%D9%85%D9%87_%D9%81%D9%8A_%D8%A7%D9%84%D8%A8%D8%B1%D9%85%D8%AC%D9%87
-
onPlayerQuit getPlayerTeam getTeamName getPlayerAccount setAccountData onPlayerLogin getAccountData getTeamFromName setPlayerTeam
-
I gave you enough code already, you have to try yourself.
-
I told you already, you can't use variable because it will be overwrite in the loop, you must use table.
-
This is how your table look: local pbags = { {2293.154, 561.47, 7.78}, } i[1] will be first number which it 2293.154 i[2] second number which it 561.47 i[3] third number which it 7.78 And of course now it become more complexity as you have created multiple pickups in same time where it means now you can't have one variable for the pickup and one variable for the object you must store them in table.
-
for _, i in ipairs(pbags) do createPickup(i[1], i[2], i[3], 3, 1210) end
-
You need to do loop for the table, also you will have to create a table to insert all pickups element.
-
You want spawn pickup for all positions in the table at same time?
-
bindKey("o", "down", function() guiSetVisible(myImage, not guiGetVisible(myImage)) end)
