
myonlake
Members-
Posts
2,312 -
Joined
-
Days Won
41
Everything posted by myonlake
-
You shouldn't really use a for loop. removeWorldModel(16671, 10000, 404.3408203125, 2476.5537109375, 24.884073257446) removeWorldModel(16673, 10000, 404.3408203125, 2476.5537109375, 24.884073257446) removeWorldModel(16675, 10000, 404.3408203125, 2476.5537109375, 24.884073257446)
-
You can't avoid the last argument of addEventHandler. It must be a function. function exampleFunction() -- Code end addEventHandler("onClientRender", root, exampleFunction) addEventHandler("onClientRender", root, function() -- Code end ) But as far as I can see, you don't need this event in your script.
-
In other words, you are using a client-side event server-side, which is not possible.
-
Not really. As far as I know the CJ clothes are not objects. You can do clothes for CJ pedestrians/players with addPedClothes though.
-
I believe there are no resources like these available. Next time do not ask here, check the Community (https://community.multitheftauto.com/).
-
Eh... it fixes the vehicle you wish to fix. For example... Server-side addCommandHandler("fixme", function(player, cmd) local vehicle = getPedOccupiedVehicle(player) if vehicle then fixVehicle(vehicle) end end ) Or... Server-side addEventHandler("onMarkerHit", root, function(hitElement, matchingDimension) if getElementType(hitElement) == "vehicle" and matchingDimension then fixVehicle(hitElement) end end )
-
Show us your code first and let us help you in case something is wrong. There is no quarantee someone is willing to help if you don't know the basics or anything. Check the Wiki for help first.
-
Secondly, just for your privacy I suggest not to release -any- personal information! If you accept someone, unknown, as a friend, I can assure you that either you wanted or not, they will know your location, phone numbers and such. As you already have shared your Facebook profile page, there's no quarantee you can get it off. Please think carefully when asking for help from others! It's your own business, but I am advising and warning you.
-
And so what is the error you're getting there?
-
Server-side local models = {[523]=true, [596]=true, [597]=true, [598]=true, [599]=true} addEventHandler("onPlayerVehicleEnter", root, function(vehicle, seat, jacked) if models[getElementModel(vehicle)] then if (getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) == "Police") then outputChatBox("Access Granted.", source, 124, 252, 0, false) else removePedFromVehicle(source) outputChatBox("You must be part of the Police team to get access to this vehicle.", source, 255, 0, 0, false) end end end )
-
As far as I can see, you can make those controls client-side, but you can of course synchronize in server-side, as in, setElementSyncer.
-
igthomas, wrong. It only triggers it for others, not the local player. You must use onClientResourceStart instead. Nun0, have you even tested the script? onClientResourceStart is triggered when a player joins the server.
-
Server-side addEventHandler("onPlayerLogin", root, function() triggerClientEvent(source, "showTeamWindow", source) end ) Client-side addEvent("showTeamWindow", true) addEventHandler("showTeamWindow", root, function() outputChatBox("Event triggered.", 0, 255, 0, false) end )
-
You only have to use that type of check in a couple of events. For example onClientVehicleEnter, but the basic thing is simple. Cheers.
-
Wrong. When a code is client-side, it will only execute the function or whatever you're doing to the client who's executing it. Whenever someone makes a command client-side, everything in the command handler's function will only be execucted for the player. This can be seen in outputChatBoxes client-side, there's no element argument, because it will automatically be executed to the player executing it. Secondly, there's no element argument in onClientGUIClick event, as I said in the above text. Client-side local gui = guiCreateWindow(0.3, 0.2, 0.4, 0.6, "Da window", true) local close = guiCreateButton(0.1, 0.75, 0.8, 0.15, "Close", true, gui) addEventHandler("onClientGUIClick", close, function() guiSetVisible(gui, false) showCursor(false) end, false)
-
fixVehicle And I prefer not increasing your forum post amount while you can check the functions list over at the Wiki Page. https://wiki.multitheftauto.com/wiki/Ser ... _Functions https://wiki.multitheftauto.com/wiki/Cli ... _Functions
-
He doesn't want that, he wants some functions disabled only.
-
You cannot change a texture of an object, skin or anything with normal pictures. They must be in .txd and .dff files or you can use shaders. Shaders » Engine functions » Client-side engineLoadTXD engineImportTXD engineLoadDFF engineReplaceModel
-
And so what is the problem in the script? Server-side local Password = "RFT" addEvent("eventSpawnPlayer", true) addEventHandler("eventSpawnPlayer", resourceRoot, function(Player, Skin) local Serial = getPlayerSerial(Player) local Account = getAccount(Serial) if (Account) then local Money = getAccountData(Account, "Money") setElementData(Player, "Money", Money) spawnPlayer(Player, 935.82421875, 2143.9340820313, 1011.0234375, 270, Skin, 1, 0) fadeCamera(Player, true) setCameraTarget(Player, Player) outputServerLog("START: " .. Money .. ", " .. Serial .. ", " .. Password) else local Account = addAccount(Serial, Password) outputChatBox("Type /masterkey to set up your MasterKey.", Player) setAccountData(Account, "Money", 0.12) setElementData(Player, "Money", 0.12) spawnPlayer(Player, 935.82421875, 2143.9340820313, 1011.0234375, 270, Skin, 1, 0) fadeCamera(Player, true) setCameraTarget(Player, Player) end end ) addEventHandler("onPlayerQuit", root, function() local Serial = getPlayerSerial(source) local Account = getAccount(Serial) if (Account) then local Money = getElementData(source, "Money") setAccountData(Account, "Money", Money) outputServerLog("STOP: " .. Money .. ", " .. Serial .. ", " .. Password) end end )
-
Those are additions Tell me if they worked out. Seems like they should work out.
-
This may not only be a problem of the resource, this may be a problem of your audio settings on your computer. If you are using headphones and 5.1 Surround System settings, you can't hear any of the sounds you listed above. I had this issue and when I switched over to Stereo, and restarted the game, it worked again. Try that first, in case you are using 5.1/7.1 Surround System. If you don't have 5.1/7.1 stereo system, which most players don't, change it to Stereo.
-
Hmm, perhaps this should prevent any unwanted errors or perhaps fixes it. Client-side (fr_client.lua) (setPosClick) (line 639) --[[function setPosClick() setPlayerPosition(getControlNumbers(wndSetPos, {'x', 'y', 'z'})) closeWindow(wndSetPos) end]] Client-side (fr_client.lua) (wndSetPos) (line 763) wndSetPos = { 'wnd', text = 'Set position', width = g_MapSide + 20, controls = { {'img', id='map', src='map.png', width=g_MapSide, height=g_MapSide, onclick=fillInPosition--[[, ondoubleclick=setPosClick]]}, {'txt', id='x', text='', width=60}, {'txt', id='y', text='', width=60}, {'txt', id='z', text='', width=60}, --[[{'btn', id='ok', onclick=setPosClick},]] {'btn', id='cancel', closeswindow=true}, {'lbl', text='Right click on map to close'} }, oncreate = setPosInit, onclose = closePositionWindow } Client-side (fr_client.lua) (wndSpawnMap) (line 872) wndSpawnMap = { 'wnd', text = 'Select spawn position', width = g_MapSide + 20, controls = { {'img', id='map', src='map.png', width=g_MapSide, height=g_MapSide--[[, ondoubleclick=spawnMapDoubleClick]]}, --{'lbl', text='Welcome to freeroam. Double click a location on the map to spawn.', width=g_MapSide-60, align='center'}, {'btn', id='close', closeswindow=true} }, oncreate = warpMapInit, onclose = closeSpawnMap }
-
I hope you didn't remove the --[[ ]] tags, because they are supposed to be there. In my eyes I can't see anything else than those two areas, which cause the player to be teleported.
-
Have you tried re-installing the editor resource?