Jump to content

Addlibs

Members
  • Posts

    1,060
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by Addlibs

  1. Add the resource to a privileged ACL group (such as Admin ACL group) (any group would do as long it is linked to an ACL that has right 'function.setPlayerMuted' set to true)
  2. Just out of curiosity what version of 3ds Max did you use? And did you get the latest version of the scripts? I haven't experienced a single crash and I've imported both objects and vehicles 3Ds Max 2016, using the newest KAM's script on http://www.gtagarage.com/mods/show.php?id=9172.
  3. What is the exact problem? How doesn't it work? Any debugscript errors?
  4. You need to replace the model with one which has different UV wrappings (split into 2 materials, prim and sec). Yep, you need a modelling software, an old version of ZModeler (new ones don't support DFF Import/Export) (preferably v2.2.6-r992) or 3Ds Max with KAM's script (from own experience it doesn't work good for vehicles - gives GTASA.exe crashes when attempting to load model - that is, KAM's script doesn't export vehicles very well).I'm certainly not going to teach you to use any of the above mentioned software.
  5. Addlibs

    [HELP] Please

    When a player disconnects, the player/ped element is destroyed, therefore all element data is deleted, therefore your code makes no sense — setting the element data of a player who was banned just before he/she is disconnected?
  6. local scale = sy/768 -- I still have no idea why this worked but it actually did. What's so mysterious about this? It's a normal calculation, say someone's screen height was 1024, divide that by the native resolution (the resolution for which the dx was aimed at), let's say, 512. actualH/nativeH = scaleFactor 1024/512 = 2 The actual resolution is 2 times larger than the native resolution. Pretty basic math.
  7. Both local hex = string.format("#%.2X%.2X%.2X", r, g, b) -- converts R, G, B to HEX value and "(Local) "..hex..name..": #ffffff"..message are already in your script.
  8. Line 8 gets hex. What else do you want to do?
  9. You have if scopes mixed up. if vehID == 520 or vehID == 432 then -- If you're looking for Hunter, I believe it is 425, not 432. if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Warden")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Girl")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Vip")) then vehicle = createVehicle(vehID, vx, vy, vz, 0, 0, vrot) else -- outputChatBox("You're not allowed to spawn this vehicle", source, 255, 0, 0, true) -- these three lines should be removed -- end -- these three lines should be removed (actually, it is moved to the end of the code) -- else -- these three lines should be removed if(getPlayerMoney(source) >= 25000) then takePlayerMoney(source, 25000) vehicle = createVehicle(vehID, vx, vy, vz, 0, 0, vrot) else outputChatBox("You dont have enought money ($25,000)", source, 255, 0, 0, true) return false -- break the function here so freeroam doesn't try to do anything else with the vehicle since it doesn't get created anyway end end end --and one more end (as if it was moved from line 13 to here)
  10. Just to correct a misconception: It's not a matter of whether it is defined local or global, it's just that you can't set indexes on tables with local. Tables work slightly different to normal variables - you can make the whole table local ( i.e. local aTable = {} ) but you can't make a specific variable local ( i.e. you'll get an error when attempting to use local aTable[1] = "Hello World" )
  11. Seriously I'm starting to believe you're just exploiting the friendly helpful community to script for you on scripts that you haven't actually wrote yourself — you have no Lua knowledge whatsoever as it appears to me. Please, consult the actual owners of the scripts you use.
  12. There's one possible solution but it won't work exactly like normal 'T' chat - executeCommandHandler. However, this does not work for hardcoded commands like /quit, /reconnect etc.
  13. I doubt anyone understands what you're trying to do - neither do I.
  14. Change stat 160 (DRIVING_SKILL) between 0 and 1000
  15. Explain more or seek support in your native language, I don't think anyone can understand what you want.
  16. function localMessage(thePlayer, cmd, ...) local message = table.concat({ ... }, " ") local name = getPlayerName(thePlayer) local r, g, b = getPlayerNametagColor(thePlayer) local hex = string.format("#%.2X%.2X%.2X", r, g, b) -- converts R, G, B to HEX value outputChatBox("(Local) "..hex..name..": #ffffff"..message, getRootElement(), 255, 255, 0, true) -- this is actually sent to everyone, so it's not actually local chat - I will leave it to you to adapt it to your needs. end addCommandHandler("Local", localMessage)
  17. If that F1 you're talking about is from the freeroam resource, you'll have to edit that resource.
  18. Wrong section. Try viewforum.php?f=177
  19. 2 distinct solutions: 1) disable every sound you want removed, one by one, instead of the whole group; or 2) disable the whole group and re-enable certain sounds such as weapon reload sounds.
  20. Can you show your most recent code and re-state your exact problem?
  21. Change (or [code=text]) into [lua] (or [code=lua]) please.
  22. You will need to modify the freeroam resource, adding preliminary checks to warp function, such as whether the destination coordinates are within a certain 3D/2D distance range from your centre of the base.
  23. Addlibs

    [HELP] ACC

    Client: function www () Window = guiCreateWindow(350,225,200,200,"Account",false) guiSetAlpha ( Window, 5.00 ) guiWindowSetMovable ( Window, false ) C1 = guiCreateLabel(10,95,500,500,"",false,Window) guiSetText (C1, "Account: loading...") guiSetFont(C1, "default-bold-small") guiWindowSetSizable(Window,false) end function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end function ShowGUI ( ) www () showCursor (true) local screenW,screenH = guiGetScreenSize() local windowW,windowH = guiGetSize(Window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(Window,x,y,false) end function window () if isElement(Window) then HideGUI() else ShowGUI() guiSetText (C1, "Account: loading...") -- reset the account label triggerServerEvent("ACC", localPlayer) -- request account name from the server end end bindKey("F5","down",window) function HideGUI () destroyElement (Window) showCursor(false) end addEvent("ACC callback", true) addEventHandler("ACC callback", localPlayer, -- account name received from server function(acc) guiSetText (C1, "Account: "..acc) -- update the account label end ) Server: addEvent("ACC", true) addEventHandler("ACC", root, -- account name request received by server function () local acc = getAccountName(getPlayerAccount(client)) -- collect client's account name triggerClientEvent(client, "ACC callback", client, acc) -- send the account name the client end )
  24. Change both occurrences of addcommandhandler on line 7 and 17 to addCommandHandler — Note the function is case sensitive
×
×
  • Create New...