Jump to content

myonlake

Members
  • Posts

    2,312
  • Joined

  • Days Won

    41

Everything posted by myonlake

  1. What? Read the post before the previous one, there's a script on the 'lplate' button. The rest you have to do yourself.
  2. myonlake

    Create a server ?

    You have to make your scripts yourself or download from the community.
  3. You can do either of these. box1 = box2 = box3 = box = {} box[1] = box[2] = box[3] = And sure, use your imagination and go wild with it. No need to be like everybody else and copy from other servers. If you get any errors, post them in this thread and we'll help. Try to make some kind of base before asking for further instructions though, we do not give scripts, we help.
  4. You can use these functions for such script. guiCreateWindow guiCreateLabel guiCreateEdit guiCreateButton addEventHandler triggerServerEvent getElementPosition getElementInterior getElementDimension getVehicleColor createVehicle setVehicleColor destroyElement And to trigger it from your freeroam resource, use this in your fr_client.lua. function openPlatePicker() -- Script here end wndMain = { 'wnd', text = 'FR GUI', x = 10, y = 150, width = 280, controls = { {'lbl', text='Local player'}, {'br'}, {'btn', id='kill', onclick=killLocalPlayer}, {'btn', id='skin', window=wndSkin}, {'btn', id='anim', window=wndAnim}, {'btn', id='weapon', window=wndWeapon}, {'btn', id='clothes', window=wndClothes}, {'btn', id='playergrav', text='grav', window=wndGravity}, {'btn', id='warp', window=wndWarp}, {'btn', id='stats', window=wndStats}, {'btn', id='bookmarks', window=wndBookmarks}, {'br'}, {'chk', id='jetpack', onclick=toggleJetPack}, {'chk', id='falloff', text='fall off bike', onclick=toggleFallOffBike}, {'br'}, {'lbl', text='Pos:'}, {'lbl', id='xpos', text='x', width=45}, {'lbl', id='ypos', text='y', width=45}, {'lbl', id='zpos', text='z', width=45}, {'btn', id='setpos', text='map', window=wndSetPos}, {'btn', id='setinterior', text='int', window=wndSetInterior}, {'br'}, {'br'}, {'lbl', text='Vehicles'}, {'br'}, {'lbl', text='Current:'}, {'lbl', id='curvehicle'}, {'br'}, {'btn', id='createvehicle', window=wndCreateVehicle, text='create'}, {'btn', id='repair', onclick=repairVehicle}, {'btn', id='flip', onclick=flipVehicle}, {'btn', id='upgrades', window=wndUpgrades}, {'btn', id='color', onclick=openColorPicker}, {'btn', id='paintjob', window=wndPaintjob}, {'btn', id='lplate', onclick=openPlatePicker}, {'br'}, {'chk', id='lightson', text='Lights on', onclick=forceLightsOn}, {'chk', id='lightsoff', text='Lights off', onclick=forceLightsOff}, {'br'}, {'br'}, {'lbl', text='Environment'}, {'br'}, {'btn', id='time', window=wndTime}, {'chk', id='freezetime', text='freeze', onclick=toggleFreezeTime}, {'btn', id='weather', window=wndWeather}, {'btn', id='speed', window=wndGameSpeed} }, oncreate = mainWndShow, onclose = mainWndClose }
  5. What do you mean custom license plate script? You mean that the texture is replaced or something? That's not possible since license plates are attached to the car texture. Of course you can make some type of object attachment but I don't see the idea there. So, what do you want to do? Change the license plate text?
  6. You want it to trigger the event when a player has entered a Hunter vehicle? Please define your requirements without blahblah Engrish so we can help you.
  7. What? You have to trigger the startStream function or onStreamStartRequest event remotely in your script. For example... Server-side addCommandHandler("trigger", function(player, cmd) startStream() end )
  8. Your script makes no sense. Functions: - startStream() - stopStream() Events: - onStreamStartRequest - onStreamStopRequest Use those if you need them somewhere else. Client-side function drawText() dxDrawText("Time for a Hunter Fight!", 1, sy/3-1, sx+1, sy-1, tocolor(0, 0, 0, 255), (2.5*sx/1920)*1.6, "default-bold", "center", "center", true) end addEvent("onStreamStart", true) addEventHandler("onStreamStart", root, function() addEventHandler("onClientRender", root, drawText) end ) addEvent("onStreamStop", true) addEventHandler("onStreamStop", root, function() removeEventHandler("onClientRender", root, drawText) end ) Server-side -- Start streaming the dxDrawText function startStream() triggerClientEvent(root, "onStreamStart", root) setTimer(stopStream, 5000, 1) end addEvent("onStreamStartRequest", true) addEventHandler("onStreamStartRequest", root, startStream) -- Stop streaming the dxDrawText function stopStream() triggerClientEvent(root, "onStreamStop", root) end addEvent("onStreamStopRequest", true) addEventHandler("onStreamStopRequest", root, startStream)
  9. Your script doesn't make any sense.
  10. To be honest, I don't know why the model handling switch didn't work... probably it did and nwmafia is blind or then MTA is bugged and should be reported in the Bug Tracker. I think you should try using setVehicleHandling instead for now, that works perfectly at least.
  11. I am sorry to say but that code is wrong. It will trigger the world cheat for all players if you use that code, use this, this is a little more simple anyways. Server-side addCommandHandler("water", function(player, cmd) if isGuestAccount(getPlayerAccount(player)) then return end if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup("Admin")) then triggerClientEvent(player, "activateCheat", player, cmd) end end ) addCommandHandler("fly", function(player, cmd) if isGuestAccount(getPlayerAccount(player)) then return end if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup("Admin")) then triggerClientEvent(player, "activateCheat", player, cmd) end end ) Client-side addEvent("activateCheat", true) addEventHandler("activateCheat", root, function(cmd) if cmd == "fly" then setWorldSpecialPropertyEnabled("hovercars", not isWorldSpecialPropertyEnabled("hovercars")) outputChatBox("Flying vehicle cheat is " .. (isWorldSpecialPropertyEnabled("hovercars") and "on" or "off") .. ".", 255, 180, 10, false) elseif cmd == "water" then setWorldSpecialPropertyEnabled("aircars", not isWorldSpecialPropertyEnabled("aircars")) outputChatBox("Flying vehicle cheat is " .. (isWorldSpecialPropertyEnabled("aircars") and "on" or "off") .. ".", 255, 180, 10, false) end end )
  12. That's the same code as nwmafia's. I don't see any outstanding difference there.
  13. I don't get why you were trying to do the array like in Java or C. As far as I know, I don't think you are able to make predefined lengths for arrays like so in LUA.. array[100] = { } array = { }
  14. Thank you for your results, I find this very useful in my scripting some time
  15. Do you mean the chatbox? I think it's impossible, since MTA doesn't have a built-in command for it. However, if the server has scripted a command for it and you can find it from their help panel (probably F1) then use it. If you want to hide the whole chatbox, then use /showchat 0.
  16. That's a very interesting scripting technique, Anderl. Congratulations
  17. That's very interesting. Are you sure there is a gridlist, if not, then that's the reason for it doing those errors. It simply does return an integer and should return true after those.
  18. That's alright, but I think this is better since he wants to change all the Buffalos handling setModelHandling
  19. If you try to get the password, you will pretty much get their hashed password. But I don't think it is possible to fetch it
  20. Try changing the radius from 200 to 10000, at least. And you also have an unnecessary comma in the end of the fifth argument of removeWorldModel.
  21. Do not edit any configuration file - it is completely unnecessary since it's not going to change anything! White. setVehicleColor(vehicle, 255, 255, 255, 255, 255, 255) Black. setVehicleColor(vehicle, 0, 0, 0, 0, 0, 0) Red. setVehicleColor(vehicle, 255, 0, 0, 255, 0, 0) Green. setVehicleColor(vehicle, 0, 255, 0, 0, 255, 0) Blue. setVehicleColor(vehicle, 0, 0, 255, 0, 0, 255) More information about RGB Color Model: http://en.wikipedia.org/wiki/RGB_color_model Color Picker: http://www.colorpicker.com/
  22. Try opening the MTA again without ending the process of MTA. It should ask you if you want to quit the existing session, it works for me.
×
×
  • Create New...