-
Posts
866 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Mr_Moose
-
Just enter another value in the spawnPlayer function... spawnPlayer(thePlayer, x,y,z)
-
This one: https://community.multitheftauto.com/index.php?p=resources&s=details&id=8338 has all the vehicles and are actually made to work with this wanted level system.
-
It's not that hard to make it work actually, let's take it step by step shall we. First you need a way to manage the lawgroups, i.e a group system, I recomend this one: https://forum.multitheftauto.com/viewtopic.php?f=108&t=67832 Secondly when that is added you need to create a group named SAPD, SWAT, FBI or ArmedForces, and be a member of any of those groups, after that you can use the commands /sapd /swat /fbi or /army to join the law team you wish, now there is also a specific staff group built into this which has access to any of these law groups, and it can simply be changed in the law_job.lua file as well. If you want markers to all the jobs you need to create them by yourself. Only the team 'police' has markers to take the job and a GUI to select skin. Markers are located inside.
-
@Nighttrain All other teams than 'Police' can be accessed by command if you are in a specific group provided by a proper group system, all you need to have is the element data "Group" set to the team with the same name, it's still like that in the newer versions. @XeoN- It's a complex system so it's either a bug in the tazer or in the vehicle damage control which also causes wanted levels and make people loosing health when crashing their cars. If there are errors flooding your debug script it's most likely in police_client.lua at the bottom where a "onClientRender" event is used to show the distance, might be some missing data in there, try stopping the resource and see what errors you get.
-
function addTeamData ( ) -- Uncomment these to show information in the scoreboard -- call( getResourceFromName( "scoreboard" ), "scoreboardAddColumn", "Occupation", getRootElement(), 110 ) -- call( getResourceFromName( "scoreboard" ), "scoreboardAddColumn", "Wanted", getRootElement(), 55 ) -- call( getResourceFromName( "scoreboard" ), "scoreboardAddColumn", "Jailed", getRootElement(), 35 ) -- Create teams createTeam( "Police", 110, 110, 110 ) createTeam( "SAPD", 110, 110, 110 ) createTeam( "SWAT", 110, 110, 110 ) createTeam( "FBI", 110, 110, 110 ) createTeam( "ArmedForces", 110, 110, 110 ) end addEventHandler( "onResourceStart", getResourceRootElement(), addTeamData ) This is one of the details that has to be fixed, it's handled by an external system in those servers it was built for which isn't published as open source currently, anyway to solve this, all you need to do is to add the above code in any of the server side files, law_job.lua for example within this resource, it will create the included teams (and optionally add some more columns to the scoreboard showing wanted level, if a player is jailed and the occupation) . That will add the teams when the resource is started, It should be changed within future versions though but until then the above event is the "official" temporary solution to the problem.
-
Well as you said these seems to be for functions: getFunctionsBoundToKey getKeyBoundToFunction But since they return a table (with strings I assume) it might work for bound commands as well, try the wiki example if you haven't done it yet and see what it outputs. Admin panel for example (default key: 'P') can be accessed by the command '/admin' as well, so if this works you should be able to see that in the output. function output() outputChatBox("Hi") end bindKey("f2","down",output) local keyTable = { "mouse1", "mouse2", "mouse3", "mouse4", "mouse5", "mouse_wheel_up", "mouse_wheel_down", "arrow_l", "arrow_u", "arrow_r", "arrow_d", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "num_0", "num_1", "num_2", "num_3", "num_4", "num_5", "num_6", "num_7", "num_8", "num_9", "num_mul", "num_add", "num_sep", "num_sub", "num_div", "num_dec", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "backspace", "tab", "lalt", "ralt", "enter", "space", "pgup", "pgdn", "end", "home", "insert", "delete", "lshift", "rshift", "lctrl", "rctrl", "[", "]", "pause", "capslock", "scroll", ";", ",", "-", ".", "/", "#", "\\", "=" } addCommandHandler("gakf",function() for _,i in ipairs(keyTable)do --loop through keyTable for _,v in ipairs(getFunctionsBoundToKey(i))do --loop through the key bounded functions outputChatBox(i..":"..v) --output the keyname and the function bound to it end end end)
-
I guess freeroam is the way to go. Have been running servers with all these game modes for a couple of months now and the freeroam server always seems to have the most online players. The only problem is the type of players actually, they just join and play like if they where zombies, many of them doesn't understand English and so on. Secondly you have Different types of Roleplaying RP/RPG/ARPG etc, a little bit lower player amount due to the hard competition, naming a server RPG doesn't say much to the end user but if you make a good RPG server and people start to find out about it you get many loyal players who actually takes the game serious. So your choice is a little bit like quality or quantity, (RPG or Freeroam), hope it was helpful and good luck.
-
Anything in /debugscript?
-
/Stop and then /start does probably exactly the same as /restart, can't see why there would be multiple functions doing the same things. And lua are like other scripting languages executed from the top then it goes down until it finishes or crash in the middle of a job. How about /debugscript? I guess you used that but it could be a regular bug in the script as well. Even if it looks like it should work the human eye just aren't good enough to detect all possible issues.
-
Seems strange thought since 'outputChatBox' won't have any effect on that. What did you tried to do with your script, just wonder if it was regular edits of some lua files, adding new files or replace existing files like images. Maybe you forgot to upload the file (if you're using ftp or network paths).
-
You mean a loop to check every element in the table and do something with those elements who has a special condition? local theTable = { [1]="value1", [2]="value2", -- ... } for k=1, #theTable do if theTable[k] == "value1" then -- Do something with the first element end end
-
Well /refreshall should solve stuff like imported files that doesn't refresh properly or if you add new files, though this where about regular lua scripts with regular edits. Could you specify when this issue appears more detailed? Exactly what did you changed. I've seen this only when replacing radarblips or adding new files that isn't lua files into existing resources.
-
Naming an xml child to a number would give an output like this: <root> <child></child> <!-- Correct syntax --> <777></777> <!-- Incorrect syntax --> </root> Which gives syntax errors, this applies to all markup languages like xml, html, xaml etc. And generally for all programming languages you can't start a variable name with a number, it must be "a-z" or "_" as first char, after that you can use numbers.
-
That's pretty much all you need, just modify the if statement after your own conditions. 'theAttacker' is the player who attacked you and the source is the victim, you may also add this: ... source == localPlayer ... in your if statement to verify that the victim and local player actually are the same and that this event is cancelled for the correct player.
-
Sounds like the cache (if there is any), I've noticed the same issue, but it only affect client sided scripts thought. Are your bandwidth saving at 'maximum' maybe? I guess you just have to wait for the cache to refresh.
-
By ending the function you have within your timer of course. setTimer ( function() if isTimer(timer1) then killTimer ( timer1 ) elseif isTimer(timer2) then killTimer ( timer2 ) elseif isTimer(timer3) then killTimer ( timer3 ) elseif isTimer(timer4) then killTimer ( timer4 ) end end, 1000, 1 )
-
You can't kill a timer before it's created, secondly the third argument (1) in the creation of your timer will kill it automatically. If you want to kill it before as some kind of interrupt you need to make a command handler for your first function and give it a name, as it is now the kill function will be executed as soon you start the resource.
-
That meme says it all, you need to open the meta.xml and change the settings in there after your own preferences if you want it to work differently than the default configuration. Many servers are running that resource and it works perfect.
-
Well the anti caps part is easy unless you're being lazy, str = string.lower(str) For the second one you need to make a command handler and a loop thought all the players online and check their team. function staffChat(staffPlayer, cmd, ...) local message = string.concat(..., " ") for i, thePlayer in ipairs(getElementsByType("player")) -- Check your acl group here and show the message end end addCommandHandler("s", staffChat)
-
6000 will be good enough, that's the size of the entire map. However why would you make a local chat that cover the entire map when you have main chat?
-
GUI's built to fit on all resolutions is called responsive and the whole idea is that you make the GUI to fit on the small screens first, same thing when you make a website, start with mobile phones which may even have lower than 800x600 resolution. Static elements build for those small resolutions will obviously look weird on larger screens too and that's why they are scaled up in a proper way. Text however are hard to scale up since you only enter the size, it's still relative to itself while the players screen may vary from 4:3, 16:10 and 16:9. Because of that it's recommended to add those text elements at either the bottom or top, centered or after the edges like kill messages does. Rectangles, lists, buttons and other GUI elements can often be scaled properly both in x and y which allow them to be placed almost anywhere.
-
Truly off topic, maybe you should read again and realize that I feel exactly the same about such crappy resolutions. I got 3 screens with 1920x1080 currently but still, it's easier to make the GUI for a low resolution and then let it scale up rather than letting it scale down from HD. That was the point. The most common resolution out there was 1366x768 according to stat counter last time I checked.
-
There are many ways to solve this and make the GUI looks nice, I'm usually build them after the screen edges which works pretty good both on small sized fixed GUI's and dynamic ones on all resolutions. More regular dialogs and windows are usually centered, then we have centered at top or bottom for longer text messages for example. At the end you might also set a minimum supported resolution for any GUI, below that it won't matter if it looks weird since nobody would use that small screen anyway. This lowest resolution are often defined as 800x600 pixels.
-
All you need to do is to disable the onClientVehicleDamage event if youre a part of the staff team while driving, take a look here https://wiki.multitheftauto.com/wiki/OnClientVehicleDamage, to find out how you can do that.
-
Why don't you use the php sdk: https://wiki.multitheftauto.com/wiki/PHP_SDK, by that you can easy communicate with bing (or google) translate api and then communicate with your own server using lua.