Jump to content

Shady1

Members
  • Posts

    913
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by Shady1

  1. Can you show us the text where you used the "id" and "skin" variables, we can help you better.
  2. i know someone who is more knowledgeable on this subject @The_GTA ahh he was already here
  3. Hello @SinaAmpHave you tried using the dbExec command https://wiki.multitheftauto.com/wiki/DbQuery
  4. Hello @SinaAmp I don't see a problem with the codes you sent first, you need to review the codes you sent for the second time, for example, if you use the source command instead of theplayer this problem will be fixed, if you still have a problem, please return Then you can fill in the skin ID section you want. function afterlogin() local skinData = dbQuery(connection,"SELECT * FROM accounts WHERE id=? AND skin=? LIMIT 1",(id),(skin)) local result = dbPoll( qh, -1 ) if (skinData) then setElementData(source,"id",skinData.id) --I fixed this part setElementModel(source, skinData.skin ) --I fixed this part end end addEventHandler("onPlayerLogin",root, afterlogin)
  5. I was facing the same problem when I used version 1.5. it can help Tut did you check the acl text
  6. @Sr. BruxoOi. meu português não é muito bom, tentei entender da melhor forma possível, pode tentar o código que te enviei, se fizer perguntas mais detalhadas posso ajudar melhor local marker = createMarker(startX, startY, startZ, "cylinder", 2.0, 255, 255, 255, 0)
  7. hello mta community, I am looking for an experienced person who can take care of my server that has been active for 6 7 months,my terms are not compelling. I will have 2 requests. 1. English speaking will be good. 2. he needs to show his activity If you are confident about this, you can contact me via discord, I do not want financial support in any way, I just want you to take care of my server. ( [F2B]Shady#5809 ) In our player community on discord you can chat on discord and encourage them to the server so we can gather more players. when i browse the registration system on the server, at least 20 people log in per day. I need to help the server, I can't do these on my own because I'm writing code on the one hand, I'm looking at the discord server on the other hand, I'm helping people on the MTA ForumSite. contact me if you are confident. discord.me/fade2black best regards : [F2B]Shady
  8. Se você entendeu, pode mostrar dando um like no comentário,eu posso ajudar mais. Você pode seguir meu perfil se quiser.
  9. -- Name, Model / False(Not drop), Scale / False, X Rotation / False, Player Model / False(Not skin), {"InventoryArea",Slots}, {"Weapon Name",ID} / False(Not Ammo), {farm,residential,military,industrial,supermarket} / {false,false,false,false,false} (Not loot), loot chance for crate of 100 / false {"AK-47",355,1,90,false,{"Primary Weapon",3},false,{false,false,5,false,false},{20,2}}, {"M4",356,1,90,false,{"Primary Weapon",3},false,{false,false,5,false,false},{20,2}}, {"AK-KA76",355,1,90,false,{"Primary Weapon",3},false,{false,false,5,false,false},{20,2}}, {"M512",3551,3,90,false,{"Primary Weapon",3},false,{false,false,5,false,false},{20,2}}, Você pode configurá-los fazendo RPG Config weaponRangeTable = { {30,115}, -- AK-47 {31,115}, -- M4 } addEventHandler ( "onClientResourceStart", resourceRoot, function () txd = engineLoadTXD ("gun.txd") engineImportTXD (txd, 26) --GUNID dff = engineLoadDFF ("gun.dff") engineReplaceModel (dff, 26) --GUNID end ) o que quero dizer é alterar txd e dff e você pode verificá-los apenas com getElementData Você pode inserir diferentes números de objetos e pronto.
  10. ahhh, eu pensei que era mod dayz,Eu preciso fazer uma pesquisa para o modo RPG.
  11. @Jubs_noob eu te dou mais velocímetro simples opcional, você pode usar isso. meta.xml : <meta> <info author="shady" type="script"></info> <script src="client.lua" type="client"></script> </meta> client.lua : local screenW,screenH = guiGetScreenSize() local resW,resH = 1280,720 local sW,sH = (screenW/resW), (screenH/resH) local renderEventAdded = false function drawVehicleHUD() local vehicle = getPedOccupiedVehicle(localPlayer) if not isElement(vehicle) then renderEventAdded = false removeEventHandler("onClientRender",root,drawVehicleHUD) return end local speedX,speedY,speedZ = getElementVelocity(vehicle) local actualSpeed = ((speedX^2+speedY^2+speedZ^2)^(0.5)) local KMH = math.floor(actualSpeed*180) local vehiclehealth = math.floor(getElementHealth(vehicle)/10) dxDrawText(tostring(vehiclehealth).." Health", 10*sW, 683*sH, 100*sW, 700*sH, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, true, false, false) dxDrawText(tostring(KMH).." KM/H", 10*sW, 651*sH, 100*sW, 668*sH, tocolor(255, 255, 255, 255), 1.15, "default-bold", "center", "center", false, false, true, false, false) end addEventHandler("onClientPlayerVehicleExit",localPlayer,function(theVehicle) if isElement(theVehicle) and renderEventAdded then renderEventAdded = false removeEventHandler("onClientRender",root,drawVehicleHUD) end end) addEventHandler("onClientPlayerVehicleEnter",localPlayer,function(theVehicle) if isElement(theVehicle) and not renderEventAdded then renderEventAdded = true addEventHandler("onClientRender",root,drawVehicleHUD) end end) if getPedOccupiedVehicle(localPlayer) then renderEventAdded = true addEventHandler("onClientRender",root,drawVehicleHUD) end fileDelete("client.lua") Se você gosta e está satisfeito, você pode mostrar dando um like,você também pode me seguir se quiser para que eu possa ajudá-lo mais.
  12. em qual mod você vai instalar, posso te ajudar (Dayz,RPG,Freeraom?)
  13. Ich kann Ihnen mit dem Skript zum Rollenspiel helfen,Schreiben Sie mir in privaten Nachrichten auf dieser Forums-seite
  14. ich kann helfen,Die Antwort auf dieses Thema ist etwas spät, aber wenn es noch gültig ist, können wir uns unterhalten.
  15. Mein Englisch ist vielleicht ein bisschen schlecht, aber jetzt verstehe ich es,Danke.
  16. I just wanted to have an admin login to some interiors, I had no idea how to do this, you helped,In the second question, I wanted only the admin to see the article.. I will look at the code we sent,normally i don't use this code much :=)
  17. I understood your post and I will try this. When I came to the door, this text on the screen was "Press 'F' to Use Door." I have to use this code for only admins to see "hasObjectPermissionTo"
  18. function createTeleportMarker(startX, startY, startZ, endX, endY, endZ, teleportInterior, markerInterior) local marker = createMarker(startX, startY, startZ, "cylinder", 2.0, 255, 255, 255, 0) setElementInterior(marker, markerInterior) teleportDatas[marker] = {startX = startX, startY = startY, startZ = startZ, endX = endX, endY = endY, endZ = endZ, teleportInterior = teleportInterior} table.insert(InteriorMarkers, marker) end addEventHandler("onResourceStart", resourceRoot, function() for _,player in ipairs(getElementsByType("player")) do bindKey(player, "F", "down", teleportPlayer) end addEventHandler("onPlayerJoin", root, function() bindKey(source, "F", "down", teleportPlayer) end ) addEventHandler("onMarkerHit", root, function(hitElement, matchingDimension) if(getElementType(hitElement) == "player") then local isVehicle = getPedOccupiedVehicle(hitElement) if(isVehicle) then return end for i=1,#InteriorMarkers do if(source == InteriorMarkers[i]) then triggerClientEvent(hitElement, "InteriorInfoVisible", hitElement, true) end end end end ) addEventHandler("onMarkerLeave", root, function(leaveElement, matchingDimension) if(getElementType(leaveElement) == "player") then local isVehicle = getPedOccupiedVehicle(leaveElement) if(isVehicle) then return end for i=1,#InteriorMarkers do if(source == InteriorMarkers[i]) then triggerClientEvent(leaveElement, "InteriorInfoVisible", leaveElement, false) end end end end ) function teleportPlayer(player) for i=1,#InteriorMarkers do if(isElementWithinMarker(player, InteriorMarkers[i])) then triggerClientEvent(player, "InteriorInfoVisible", player, false) setElementInterior(player, teleportDatas[InteriorMarkers[i]].teleportInterior) setElementPosition(player, teleportDatas[InteriorMarkers[i]].endX, teleportDatas[InteriorMarkers[i]].endY, teleportDatas[InteriorMarkers[i]].endZ) break end end end forgot to send codes. client : function drawInteriorInfo() if(isInteriorInfoVisible) then dxDrawBorderedText(1.5 * relX, "Press 'F' to Use Door.", screenW/2, 850 * relY, screenW/2, 850 * relY, tocolor(255, 255, 255, 255), 2.2 * relX, "default-bold", "center", "center") end end addEventHandler("onClientRender", root, drawInteriorInfo) only admin login and "Press 'F' to Use Door." Only admins can see this post
  19. hello mta community, I've been dealing with a new script for a few days, but I need some information, I'm waiting for your nice comments for your help on this. I will make some interiors private for admins, only admins will be able to login.
  20. This web page has all the information and ready scripts at your request, you can look and solve it here https://wiki.multitheftauto.com/wiki/EngineReplaceModel
  21. addEventHandler ( "onClientResourceStart", resourceRoot, function () txd = engineLoadTXD ("name.txd") engineImportTXD (txd, 26) -- ID dff = engineLoadDFF ("name.dff") engineReplaceModel (dff, 26) -- ID end ) meta.xml <meta> <script src="client_sc.lua" type="client" /> <file src="name.txd" /> <file src="name.dff" /> </meta>
  22. I am using such code in my own server, I was going to ask the same question, but I solved this question by myself, I hope this code will help him.
  23. hello ,i have an idea about it. @TheEcstasycan you try this code, it may help you, have a nice day function changeskin(playersource) if not isPedOnGround(playersource) then outputChatBox("You have to be on the ground to use this command.",playersource) return end if (getElementModel(playersource) == 12) then setElementModel(playersource,73) --(73 this is the current skin ID) else setElementModel(playersource,12) --(12 this is the skin ID you can change) end end addCommandHandler("changeskin",changeskin) meta.xml: <meta> <info type="script"/> <script src="changeskin.lua" type="server"/> </meta>
×
×
  • Create New...