Jump to content

Benevolence

Members
  • Posts

    367
  • Joined

  • Last visited

Everything posted by Benevolence

  1. Haven't tested, but what did you do?
  2. This is the script. local chatting = 0 local chatters = { } function checkForChat() local recon = getElementData(getLocalPlayer(), "reconx") if not (reconx) then if (isChatBoxInputActive() and chatting==0) then chatting = 1 triggerServerEvent("chat1", getLocalPlayer()) elseif (not isChatBoxInputActive() and chatting==1) then chatting = 0 triggerServerEvent("chat0", getLocalPlayer()) end end end setTimer(checkForChat, 100, 0) function addChatter() for key, value in ipairs(chatters) do if ( value == source ) then return end end table.insert(chatters, source) end addEvent("addChatter", true) addEventHandler("addChatter", getRootElement(), addChatter) function delChatter() for key, value in ipairs(chatters) do if ( value == source ) then table.remove(chatters, key) end end end addEvent("delChatter", true) addEventHandler("delChatter", getRootElement(), delChatter) addEventHandler("onClientPlayerQuit", getRootElement(), delChatter) function render() local x, y, z = getElementPosition(getLocalPlayer()) local reconx = getElementData(getLocalPlayer(), "reconx") for key, value in ipairs(chatters) do if (isElement(value)) then if getElementType(value) == "player" then local px, py, pz = getPedBonePosition(value, 6) local dist = getDistanceBetweenPoints3D(x, y, z, px, py, pz) if isElementOnScreen(value) and not getElementData(value, "reconx") and not getElementData(value, "freecam:state") then if (dist>25) then chatters[value] = nil return end local lx, ly, lz = getCameraMatrix() local vehicle = getPedOccupiedVehicle(value) local collision, cx, cy, cz, element = processLineOfSight(lx, ly, lz, rx, ry, rz+1, true, true, true, true, false, false, true, false, vehicle or value) if not (collision) or (reconx) then local screenX, screenY = getScreenFromWorldPosition(px, py, pz+0.5) if (screenX and screenY) then dist = dist / 5 if (dist<1) then dist = 1 end if (dist>4 and reconx) then dist = 4 end local offset = 70 / dist local draw = dxDrawImage(screenX, screenY, 60 / dist, 60 / dist, "chat.png") end end end else chatters[key] = nil end else chatters[key] = nil end end end addEventHandler("onClientRender", getRootElement(), render) chaticon = true function toggleChatIcon() if (chaticon) then triggerServerEvent("chaticon0", getLocalPlayer()) outputChatBox("Chat icons are now disabled.", 255, 0, 0) chaticon = false removeEventHandler("onClientRender", getRootElement(), render) else triggerServerEvent("chaticon1", getLocalPlayer()) outputChatBox("Chat icons are now enabled.", 0, 255, 0) chaticon = true addEventHandler("onClientRender", getRootElement(), render) end end addCommandHandler("togglechaticons", toggleChatIcon, false) addCommandHandler("togchaticons", toggleChatIcon, false) I get an error on debugscript "attempt to perform arithmetic on global 'rz' (a nil value)" on the line: local collision, cx, cy, cz, element = processLineOfSight(lx, ly, lz, rx, ry, rz+1, true, true, true, true, false, false, true, false, vehicle or value) Which is line 60 in the lua script above.
  3. So this gravity gun script has a toggle script. I want to add the check if player is admin in the script itself and not permissions in acl, just to make it easier and shiz. function toggleGGun(player) if (exports.global:isPlayerAdmin(sourcePlayer) then if not (sourcePlayer) then outputChatBox("You don't have permission to use this command.", thePlayer, 255, 194, 14) else local on = not exports.gravity_gun:isGravityGunEnabled(player) exports.gravity_gun:togglePlayerGravityGun(player,on) outputChatBox("gravity gun "..(on and "on" or "off"),player) addCommandHandler("ggun",toggleGGun) else addCommandHandler("ggun",toggleGGun) end I've failed. Gives an error like expected to close 'if' near 'else'
  4. Changed it and I guess it's fixed. Now a new error popped up I have no idea why really. Must be 1.1 local collision, cx, cy, cz, element = processLineOfSight(lx, ly, lz, rx, ry, rz+1, true, true, true, true, false, false, true, false, vehicle) Bad argument @ 'processLineOfSight' [Expected entity at argument 15, got boolean] Also have this error in another .lua file which is in the same resource and isLineOfSightClear https://wiki.multitheftauto.com/wiki/ProcessLineOfSight
  5. I don't understand why these problems pop up, I guess it's the update from 1.0.5 to 1.1 and conversion from Linux server to Windows. dxDrawText(getPlayerNametagText(player), sx-offset+2, sy+2, (sx-offset)+130 / distance, sy+20 / distance, tocolor(0, 0, 0, 220), scale, font, "center", "middle", false, false, false) dxDrawText(getPlayerNametagText(player), sx-offset, sy, (sx-offset)+130 / distance, sy+20 / distance, tocolor(r, g, b, 220), scale, font, "center", "middle", false, false, false) On debugscript 3 it gives a Warning which says the same thing for the two lines (and others but they're practically the same so no need to post all I think) Bad argument @ 'dxDrawText'[Expected vertical-aling at argument 10, got string 'middle'] And another in another resources, posting in a sec..
  6. For some odd reason the .txd file wasn't in the folder and it wasn't even in the meta.xml - I've added the file into the folder and into the meta.xml - I restarted the resource and on debugscript 3 it didn't show that error, but if the problem still exists I'll reply back. Thanks. Also the thing with acl is fixed, thanks.
  7. So for example engineImportTXD ( dfk, 3995 ) would become bool engineImportTXD ( dfk, 3995 ) ?
  8. Also, I noticed that anyone who joins the server can "start, stop and restart" resources via F8 console. What in the hell? Here's my ACL I really don't know why. Hope someone can fix it: "Everyone"> "Default"/> "user.*"/> "resource.*"/> "resource.ucp"/> "Moderator"> "Moderator"/> "resource.mapcycler"/> "resource.mapmanager"/> "resource.resourcemanager"/> "resource.votemanager"/> "SuperModerator"> "Moderator"/> "SuperModerator"/> "Admin"> "Moderator"/> "SuperModerator"/> "Admin"/> "RPC"/> "resource.admin"/> "resource.webadmin"/> "user.Taco" /> "resource.account-system"/> "resource.achievement-system"/> "resource.admin-system"/> "resource.animation-system"/> "resource.anticheat-system"/> "resource.bank-system"/> "resource.carlist-system"/> "resource.carshop-system"/> "resource.camera-system"/> "resource.chat-system"/> "resource.computers-system"/> "resource.elevator-system"/> "resource.faction-system"/> "resource.fuel-system"/> "resource.gate-system"/> "resource.global"/> "resource.help-system"/> "resource.id-system"/> "resource.interior-system"/> "resource.irc"/> "resource.item-system"/> "resource.job-system"/> "resource.license-system"/> "resource.lves-system"/> "resource.lvpd-system"/> "resource.map-system"/> "resource.mysql-system"/> "resource.object-system"/> "resource.paynspray-system"/> "resource.phone-system"/> "resource.realism-system"/> "resource.realtime-system"/> "resource.report-system"/> "resource.resource-keeper"/> "resource.saveplayer-system"/> "resource.savevehicle-system"/> "resource.scoreboard-system"/> "resource.shop-system"/> "resource.spike-system"/> "resource.statistics-system"/> "resource.startup"/> "resource.tag-system"/> "resource.vehicle-system"/> "resource.valhallashield"/> "resource.weather-system"/> "resource.res-edit"/> "Console"> "Moderator"/> "SuperModerator"/> "Admin"/> "RPC"/> "user.Console"/> "RPC"> "RPC"/> "MapEditor"> "MapEditor"/> "resource.medit"/> "resource.editor_main"/> "resource.edf"/> "raceACLGroup"> "raceACL"/> "resource.race"/> "Owner"> "general.ModifyOtherObjects" access="false"/> "general.http" access="false"/> "command.start" access="false"/> "command.stop" access="false"/> "command.stopall" access="false"/> "command.gamemode" access="false"/> "command.changemode" access="false"/> "command.changemap" access="false"/> "command.stopmode" access="false"/> "command.stopmap" access="false"/> "command.skipmap" access="false"/> "command.restart" access="false"/> "command.refresh" access="false"/> "command.addaccount" access="false"/> "command.delaccount" access="false"/> "command.debugscript" access="true"/> "command.chgpass" access="false"/> "command.mute" access="false"/> "command.unmute" access="false"/> "command.kick" access="false"/> "command.ban" access="false"/> "command.banip" access="false"/> "command.unbanip" access="false"/> "command.shutdown" access="false"/> "command.install" access="false"/> "command.whois" access="false"/> "command.whowas" access="false"/> "command.aexec" access="false"/> "function.executeCommandHandler" access="false"/> "function.setPlayerMuted" access="false"/> "function.addAccount" access="false"/> "function.removeAccount" access="false"/> "function.setAccountPassword" access="false"/> "function.kickPlayer" access="false"/> "function.banIP" access="false"/> "function.banPlayer" access="false"/> "function.banSerial" access="false"/> "function.getBansXML" access="false"/> "function.unbanIP" access="false"/> "function.unbanSerial" access="false"/> "function.getClientIP" access="false"/> "function.setServerPassword" access="false"/> "function.getServerPassword" access="false"/> "function.callRemote" access="false"/> "function.startResource" access="false"/> "function.stopResource" access="false"/> "function.restartResource" access="false"/> "function.createResource" access="false"/> "function.copyResource" access="false"/> "function.addResourceMap" access="false"/> "function.addResourceConfig" access="false"/> "function.removeResourceFile" access="false"/> "function.setResourceDefaultSetting" access="false"/> "function.removeResourceDefaultSetting" access="false"/> "function.aclReload" access="false"/> "function.aclSave" access="false"/> "function.aclCreate" access="false"/> "function.aclDestroy" access="false"/> "function.aclSetRight" access="false"/> "function.aclRemoveRight" access="false"/> "function.aclCreateGroup" access="false"/> "function.aclDestroyGroup" access="false"/> "function.aclGroupAddACL" access="false"/> "function.aclGroupRemoveACL" access="false"/> "function.aclGroupAddObject" access="false"/> "function.aclGroupRemoveObject" access="false"/> "Moderator"> "general.ModifyOtherObjects" access="false"/> "command.start" access="true"/> "command.stop" access="true"/> "command.stopall" access="true"/> "command.gamemode" access="true"/> "command.changemode" access="true"/> "command.changemap" access="true"/> "command.stopmode" access="true"/> "command.stopmap" access="true"/> "command.skipmap" access="true"/> "command.restart" access="true"/> "command.mute" access="true"/> "command.unmute" access="true"/> "command.kick" access="true"/> "command.ban" access="true"/> "command.banip" access="true"/> "command.unbanip" access="true"/> "command.whois" access="true"/> "command.whowas" access="true"/> "function.setPlayerMuted" access="true"/> "function.kickPlayer" access="true"/> "function.banIP" access="true"/> "function.banPlayer" access="true"/> "function.banSerial" access="true"/> "function.getBansXML" access="true"/> "function.unbanIP" access="true"/> "function.unbanSerial" access="true"/> "function.getClientIP" access="true"/> "function.startResource" access="true"/> "function.stopResource" access="true"/> "function.restartResource" access="true"/> "SuperModerator"> "general.ModifyOtherObjects" access="false"/> "command.refresh" access="true"/> "command.addaccount" access="true"/> "command.delaccount" access="true"/> "command.chgpass" access="true"/> "function.addAccount" access="true"/> "function.removeAccount" access="true"/> "function.setAccountPassword" access="true"/> "Admin"> "general.ModifyOtherObjects" access="true"/> "general.http" access="true"/> "command.shutdown" access="false"/> "command.aexec" access="true"/> "command.install" access="true"/> "command.debugscript" access="true"/> "command.refresh" access="true"/> "function.executeCommandHandler" access="true"/> "function.setServerPassword" access="true"/> "function.getServerPassword" access="true"/> "function.createResource" access="true"/> "function.copyResource" access="true"/> "function.addResourceMap" access="true"/> "function.addResourceConfig" access="true"/> "function.removeResourceFile" access="true"/> "function.setResourceDefaultSetting" access="true"/> "function.removeResourceDefaultSetting" access="true"/> "function.aclReload" access="true"/> "function.aclSave" access="true"/> "function.aclCreate" access="true"/> "function.aclDestroy" access="true"/> "function.aclSetRight" access="true"/> "function.aclRemoveRight" access="true"/> "function.aclCreateGroup" access="true"/> "function.aclDestroyGroup" access="true"/> "function.aclGroupAddACL" access="true"/> "function.aclGroupRemoveACL" access="true"/> "function.aclGroupAddObject" access="true"/> "function.aclGroupRemoveObject" access="true"/> "Default"> "command.shutdown" access="false"/> "command.aexec" access="false"/> "command.debugscript" access="false"/> "command.refresh" access="false"/> "function.executeCommandHandler" access="true"/> "function.aclReload" access="false"/> "function.aclSave" access="false"/> "function.aclCreate" access="false"/> "function.aclDestroy" access="false"/> "function.aclSetRight" access="false"/> "function.aclRemoveRight" access="false"/> "function.aclCreateGroup" access="false"/> "function.aclDestroyGroup" access="false"/> "function.aclGroupAddACL" access="false"/> "function.aclGroupRemoveACL" access="false"/> "function.aclGroupAddObject" access="false"/> "function.aclGroupRemoveObject" access="false"/> "RPC"> "function.callRemote" access="true"/> "MapEditor"> "general.ModifyOtherObjects" access="true"/> "function.startResource" access="true"/> "function.stopResource" access="true"/> "function.restartResource" access="true"/> "function.createResource" access="true"/> "function.copyResource" access="true"/> "function.addResourceMap" access="true"/> "function.addResourceConfig" access="true"/> "function.removeResourceFile" access="true"/> "function.setResourceDefaultSetting" access="true"/> "function.removeResourceDefaultSetting" access="true"/> "function.xmlLoadFile" access="true"/> "raceACL"> "general.ModifyOtherObjects" access="true"/> "function.xmlLoadFile" access="true"/>
  9. addEventHandler('onClientResourceStart', resourceRoot, function() dfk = engineLoadTXD ( "lossantosroads.txd" ) engineImportTXD ( dfk, 3995 ) engineImportTXD ( dfk, 4694 ) engineImportTXD ( dfk, 5021 ) engineImportTXD ( dfk, 4835 ) engineImportTXD ( dfk, 5028 ) engineImportTXD ( dfk, 4820 ) engineImportTXD ( dfk, 4868 ) engineImportTXD ( dfk, 5124 ) engineImportTXD ( dfk, 5297 ) engineImportTXD ( dfk, 5113 ) engineImportTXD ( dfk, 5120 ) engineImportTXD ( dfk, 5133 ) engineImportTXD ( dfk, 5106 ) engineImportTXD ( dfk, 5472 ) engineImportTXD ( dfk, 5512 ) engineImportTXD ( dfk, 17675 ) engineImportTXD ( dfk, 17655 ) engineImportTXD ( dfk, 6114 ) engineImportTXD ( dfk, 5751 ) engineImportTXD ( dfk, 6333 ) engineImportTXD ( dfk, 13882 ) end ) I get an error in debugscript which says "Bad 'txd' pointer' @ 'engineImportTXD'(1)" on like all the lines almost. How do I fix this?
  10. I found out that on my Roleplay server ever since I updated to 1.1, all vehicles blow up every few minutes. This is a vital issue in my server. How can we fix it?
  11. If anybody knows the answer I'd like to hear it please.
  12. I agree with your 2nd suggestion. Your 1st one I think is not possible.
  13. What do you guys think of a Linux VPS with specs: [color=#FF0000]Disk Storage Space[/color] 50 GB [color=#FF0000]Guaranteed Physical Memory[/color] 1 GB [color=#FF0000]Bandwidth (Monthly Data Transfer)[/color] 1000 GB [color=#FF0000]Burstable memory limit[/color] 2 GB [color=#FF0000]Unique Dedicated IP Addresses[/color] 2 Free [color=#FF0000]Processor[/color] 1000 Mhz How many players could it safely handle in your opinion? It will run a Roleplay server which uses MySQL. The price is $10/month.
  14. And I heard after you mod it doesn't take your money.
  15. I can't find another host I can trust besides serverFFS right now. Would you recommend one?
  16. If I wanna convert my server files which are for Linux (which my host used) to Windows, what must I do? I already have the Windows server files, I just wanna know what to replace.
  17. Read this: http://forum.serverffs.com/viewtopic.php?f=14&t=427
  18. Hello there. I'm sure you guys are aware of the serverFFS issue with MTA:SA 1.1 (if not, click: http://forum.serverffs.com/viewtopic.php?f=14&t=427). I just wanted to say that I'm hoping MTA Team fixes this ASAP. This was my post which I just made on the serverFFS Forum. I just wanted to let the Team know that communities are suffering, such as mine.
  19. I used this a long time ago, didn't know it still existed/worked. Thanks.
  20. Hm, so with the CreateObject line I have above, it should work if I just leave it like that? I like the other format better anyway... so?
  21. Anyone know a program or something I can use to convert a bunch of createObject(1257,1829.1798095703,-1818.5391845703,13.854023933411,0,0,0,0,0) To the proper ones like "object (conhoos3) (3)" doublesided="false" model="3283" interior="0" dimension="0" posX="-109.59247589111" posY="938.89978027344" posZ="20.069574356079" rotX="0" rotY="0" rotZ="270" /> Which the MTA map editor uses.
  22. Thanks but I won't try it now as serverFFS is having issues hosting MTA:SA 1.1 Read more here: http://forum.serverffs.com/viewtopic.php?f=14&t=427
×
×
  • Create New...