-
Posts
1,060 -
Joined
-
Last visited
-
Days Won
9
Everything posted by Addlibs
-
https://wiki.multitheftauto.com/wiki/Se ... web_server
-
--Functions you can use addEventHandler onClientRender distance = getDistanceBetweenPoints3D setSoundVolume ( sound, 1 - (distance/300) ) -- 300m distance | smooth fadeout as you go away
-
“Bad argument @ 'getPlayerTeam' [Expected player at argument 1, got boolean]” r=getRandomPlayer() probably returns false for you, hence 'got boolean' [divbox=white]Returns Returns a random player, or false if the server is empty. — Wiki
-
Line 7: if getElementType(hitElement) == "player" then could/should be if hitElement == localPlayer then -- checks if entered by the local player, i.e. the client ped, this also makes checking if it's a player redundant, cause localPlayer must be a player
-
On the default F11 map, blips appear regardless of visibleDistance.
-
Add object resource.SAPDFR into the Admin/RPC ACL
-
/aclrequest allow moddownloader all
-
As far as I know, once a timer finishes executing (unless it's infinite) it kills itself automatically, and just needs to be unassigned from the variable. I may be wrong though.
-
local rankAdm = getElementData(player, "admin_rank") or 0 local rankHlp = getElementData(player, "helper_rank") or 0 local rankScr = getElementData(player, "scripter_rank") or 0 if rankAdm >= 1 or rankHlp >= 1 or rankScr >=1 then -- if any is 1 or greater
-
Can't you just check isPlayerAdmin through local rank = getElementData(player, "admin_rank") or 0 if rank >= 1 then -- if 1 or greater This would include all admin ranks
-
You'd need an milage counter, first of all. If you already have one, examine how it saves the milage and then simply check if 10,000 mi was reached every now and then (or through events, preferably).
-
Not directly - there's the callback method via events though.
-
You can't really replace the original audio, but you could mute all original audio and play your own (will require quite a lot of reverse engineering to get the new audio to work like the original, e.g. skidding on roads etc)
-
Regardless of whether its your server or not - did you write this script?
-
Are you sure that's the correct extract (from the correct file)? There's nothing wrong in it regarding that error message, in fact, there's nothing wrong at all in the provided extract as far as I can see.
-
Surely two clients aren't connected between each other (only through the server), so the problem could only be in the script, for example, where you somehow delete the variable from all clients and redefine it on a specific client.
-
Stop unnecessary bumping. If nobody is helping, then there's a good reason for it — As far as I can tell, you're very unwilling to cooperate. A solution to your problem won't fall out of a tree. You should cooperate with those who try to help instead of passing on all of the burden onto them. If you were at least semi-competent you'd actually think for a second and maybe share line 89, or at least clearly state which line of your latest code (attached below) is line 89, because as far as I see, it is not the full code and in fact only has 44 lines. How is anyone meant to find line 89 in a 44-line code? If that extract includes the 'real' line 89, state which line of that extract it is. EDIT: Actually, just post your whole server.lua again - I believe I may know the problem, and its related to the fact you don't even know what you written (or allegedly written) yourself. It's basically the fact you're trying to add 1 to the current wanted level which isn't defined (cause you forgot to steal wanted level scripts)
-
I seriously doubt that you have any rights to the scripts you post on the forum. Your incompetence proves you couldn't have scripted it yourself if you can't fix simple errors. Please contact the author of the script for further assistance.
-
It's hard to make you understand anything.
-
Show line 89 (and surrounding lines) of the actual code, of server.lua — Is that so hard?
-
We don't want the error message, we want line 89 (referring to your previous post, “server.lua:89:attempt to perform arithmedic on a boolean valeu”) and all the other relevant lines.
-
local distance = getDistanceBetweenPoints3D(localPlayer.position, anotherPlayer.position) -- returns distance between localPlayer (predefined variable) and anotherPlayer (undefined by default, you must do so yourself) dxDrawText -- continue on your own
-
Port forwarding (in regards to /openports) is for incoming connections, not outgoing. The API server already has the necessary ports open, and therefore connection should work (unless there's firewall the outgoing server)