Jump to content

LyricalMM

Members
  • Posts

    81
  • Joined

  • Last visited

Everything posted by LyricalMM

  1. Use element data like local isRotated = getElememtData(object, "rotated") if isRotated then --code to set to initial position setElementData(object, "rotated", 0) --or false else --code to set the object to open position setElememtData(object, "rotated", 1) --or true end Idk if this would work but give it a try
  2. Maybe you didn't export the function in new_inv in meta.xml
  3. replace the second error to exports['new_inv']:
  4. you can simply just add a log script or admin warn script with an exported function that you can add at each command function to outputChat or outputLog
  5. that's better for roleplay gamemodes with many scripts, because you can just use export functions for each file, but I agree with @Dimos7 to use db functions, easier to use
  6. https://community.multitheftauto.com/index.php?p=resources&s=details&id=3247 use functions from this script, i know you wanna make your own, but you can learn slowly by just reading and figuring out, yk
  7. maybe an error on foreign characters or bad connection, or you uploaded the database wrong
  8. you added the same events on both scripts addEvent("openinf_kop", true) addEventHandler("get", resourceRoot, peremen ) addEventHandler("openinf_kop", root, windm ) and etc.. also remember to change the trigger events names too after you changed the handlers @AsianBR
  9. use zmodeler 2 or copy the code from the horse resource
  10. vehicles = { -- Table with vehicles --{model, price} } addEvent triggerEvent setElementData getElementData getVehicleName https://wiki.multitheftauto.com/wiki/Modules/MTA-MySQL/mysql_insert_id https://wiki.multitheftauto.com/wiki/Modules/MTA-MySQL/mysql_query
  11. you need to create yourself an group in ACL, but next time you should post in the Scripts section
  12. look in the server-side script on the line where it says "INSERT" and there you have the table name and the columns
  13. do you have the register panel and the login panel on the same panel?
  14. download the public slothbot resource https://community.multitheftauto.com/index.php?p=resources&s=details&id=672 and look on the wiki, who have options to spawn peds with the task "follow" or "chase" https://wiki.multitheftauto.com/wiki/Slothman/Slothbot
  15. What do you mean by not displaying correctly? be more specific, or give a SS
  16. Add this to script: accountname = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then
  17. use scripts from an open source dayz resource, there could be some usefull functions and scripts or you can create a new weapon using bone_attach, elementData, the new IFP functions and any other weapon models you could found on the internet. on adding vehicles i don't think so
  18. use this in meta: <export function="yourFunction" type="client or server" /> then in your script use: exports.yourResource:yourFunction()
  19. GUIEditor.label[1] = guiCreateLabel(33, 40, 145, 15, "Name : N/A", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 12, 240, 60) GUIEditor.label[2] = guiCreateLabel(33, 69, 145, 15, "Money : N/A", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 12, 240, 60) GUIEditor.label[3] = guiCreateLabel(33, 98, 145, 15, "Health : N/A", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 12, 240, 60) GUIEditor.label[4] = guiCreateLabel(33, 123, 145, 15, "Ping : N/A", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 12, 240, 60) setTimer( function () guiSetText(GUIEditor.label[1], "Name : "..getPlayerName(localPlayer)) guiSetText(GUIEditor.label[2], "Money : "..getPlayerMoney (localPlayer) ) guiSetText(GUIEditor.label[3], "Health : "..getElementHealth(localPlayer)) guiSetText(GUIEditor.label[4], "Ping : "..getPlayerPing (localPlayer)) end, 1000, 0)
  20. look in the code of CLEO script or animations then replace it in IFP_DEMO or create a new script with exported functions
  21. function crosshair() local hitX,hitY,hitZ = getPedTargetEnd ( getLocalPlayer() ); local screenX1, screenY1 = getScreenFromWorldPosition ( hitX,hitY,hitZ ); dxDrawImage(screenX1-(32/2), screenY1-(32/2), 32, 32, "files/crosshair.png") end bindKey("aim_weapon", "both", yourFunction) function yourFunction(key, keyState) if keyState == "down" then addEventHandler("onClientRender", root, crosshair) else removeEventHandler("onClientRender", root, crosshair) end end setTimer(yourFunction, 300, 1) idk what are you lookin' for but i think this will help you
  22. i solved it, for anyone who wants it: sW, sH = guiGetScreenSize() function draw() dxDrawRectangle(sW*0, sH*0, 700, 600, tocolor ( 0, 0, 0, 255 ), false) end local show = false function showSS() if show then removeEventHandler("onClientRender",root,draw) show=false elseif not show then addEventHandler("onClientRender",root,draw) show=true end end addCommandHandler("ss", showSS)
  23. i didn't see that, thx but how do I set the visibility to him? like a toggle command for it?
  24. Any functions to put a dxDraw behind the chat? or GUI Image.
×
×
  • Create New...