-
Posts
1,239 -
Joined
-
Last visited
Everything posted by -.Paradox.-
-
addEventHandler ("onPlayerLogin",root, function() loadPedStats( getPlayerAccount(source)) end ) addEventHandler ("onPlayerQuit",root, function() savePedStats( getPlayerAccount(source)) end ) addEventHandler ("onPlayerLogout",root, function(thePreviousAccount) savePedStats( thePreviousAccount ) end ) function savePedStats( Acc) for i = 21 , 25 do setAccountData(Acc, "stat."..i , getPedStat(source,i)) end for i = 69 , 79 do setAccountData(Acc, "stat."..i , getPedStat(source,i)) end end function loadPedStats(Acc ) for i = 21 , 25 do setPedStat(source,i,getAccountData(Acc, "stat."..i)) end for i = 69 , 79 do setPedStat(source,i,getAccountData(Acc, "stat."..i)) end end
-
Working perfect thanks, but i want only when player login.
-
Stats = { [22] = { 69 }; [23] = { 70 }; [24] = { 71 }; [25] = { 72 }; [26] = { 73 }; [27] = { 74 }; [28] = { 75 }; [29] = { 76 }; [30] = { 77 }; [31] = { 78 }; [34] = { 79 }; }; addEventHandler ( "onZombieWasted", root, function ( killer, weapon, bodypart ) if killer then if getElementType ( killer ) == "player" then if killer ~= source then if Stats[tonumber(weapon)] then setPedStat ( killer, Stats[tonumber(weapon)][1], getPedStat ( killer, Stats[tonumber(weapon)][1] ) + 1 ) end end end end end )
-
When i click on the buttons it dont set the team i want to join, and i want to spawn the player after selecting the team, and destroy the image and buttons and other stuffs. addEventHandler("onPlayerJoin", getRootElement, function () createTeam ("F.B.I", 0, 255, 0) createTeam ("Resistance", 255, 0, 0) end ) 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") showCursor(true) 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("onPlayerLogin", 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)
-
Didnt tried yet, my code is a totally mess, and i need someone to help me fix it.
-
Hello, i made this code, it suppose to show for the players a team selection and they have to select btw 2 teams, only when they login, and set camera matrix on vinewood sign, This is my code thanks for help GUIEditor = { button = {}, } 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) 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(source, true, 5) setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) end addEventHandler("onClientRender", getRootElement(), setCamera) function imageC() setPlayerTeam ( source, Resistance ) end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], imageC, false ) function imageTest() setPlayerTeam ( source, F.B.I ) end addEventHandler ( "onClientGUIClick", GUIEditor.button[2], imageTest, false )
-
You're welcome.
-
https://wiki.multitheftauto.com/wiki/Cl ... ponent_IDs Every clothing component has an id next to it.
-
The script won't get the id automatically (check the site i give you) and dont change anything in the code, only add the line if you want add another clothing texture. textures = { ["capgangback"] = 30274, ["tuxedo"] = 30518, ["captruck"] = 30293, ["suit1trblk2"] = 30466, ["bandblack"] = 30217, ["bandred"] = 30228, ["capredback"] = 30289, ["sportjack"] = 30458, ["capredside"] = 30291, ["capredup"] = 30292, } function replaceClothes() for cloth, id in pairs(textures) do local txd = engineLoadTXD (cloth..".txd") engineImportTXD(txd, id) end end addEventHandler ("onClientResourceStart", resourceRoot, replaceClothes)
-
Try this you can also add the clothe you want to replace by adding another line without .txd ["name"] = id, textures = { ["name"] = id, ["name"] = id, ["name"] = id, ["name"] = id, } function replaceClothes() for cloth, id in pairs(textures) do local txd = engineLoadTXD (cloth..".txd") engineImportTXD(txd, id) end end addEventHandler ("onClientResourceStart", resourceRoot, replaceClothes) https://wiki.multitheftauto.com/wiki/Cl ... ponent_IDs
-
4x posts? WTF read what TAPL posted.
-
Try slothbot resource by slothman. https://wiki.multitheftauto.com/wiki/Slothman/Slothbot https://community.multitheftauto.com/index.php?p ... ils&id=672 https://forum.multitheftauto.com/viewtopic.php?f ... 52#p307652
-
Post what you tried, so I can help you. EDIT: Try this resource it may help. https://community.multitheftauto.com/ind ... ls&id=1365
-
You can use setWeaponProperty
-
Actually the wiki example explain everything, it's easy but if you didn't read it you won't understand, and this script depends some lua knowledge.
-
Or you can use slothbot
-
Yes so I used only local modesubject = source It spawn the bot and he follow but if another player spawned the bot and he isn't in the team the bot kill him so i don't want to check the team
-
It's a nil value Neither if you use getPlayerName(getLocalPlayer())