Jump to content

Chlorek

Members
  • Posts

    131
  • Joined

  • Last visited

Everything posted by Chlorek

  1. What is component name I should use for wheel?
  2. Does not work for me as I need. I drive vehicle, let's say "in the air" I need position right under wheels.
  3. Hi. Is it possible (and if it is, how can I do that) to get Z-Asix position of ground under vehicle wheels. I need that to work with every vehicle with wheels (it should work fine with every car: monster, super gt, nrg-500 etc). I think about getting wheels height and size but I think it might not be possible. Thanks for help, Chlorek.
  4. local tabs = guiCreateTabPanel(5, 20, width-10, height-25, false, mainWindow) local tabLogin = guiCreateTab("Login", tabs) local tabRegister = guiCreateTab("Register", tabs) local nameStatic = guiCreateLabel((width-60)/2, 5, 60, 20, "Username:", false, tabLogin) local nameEdit = guiCreateEdit((width-200)/2, 25, 200, 25, "", false, tabLogin) guiEditSetMaxLength(nameEdit, 25) --guiSetProperty(nameEdit, "TextFormatting", "HorzCentred") local passwdStatic = guiCreateLabel((width-60)/2, 65, 60, 20, "Password:", false, tabLogin) local passwdEdit = guiCreateEdit((width-200)/2, 83, 200, 25, "", false, tabLogin) guiSetProperty(passwdEdit, "MaskText", "True") guiEditSetMaxLength(passwdEdit, 30) local loginbtn = guiCreateButton(0.1, 0.8, 0.8, 0.1, "Log Me In", true, tabLogin) This is my code, loginbtn is invisible when I set relative to false and use pixels. It happens only when I create button in a tab. And in relative mode my button is clicked when I click wherever in Login tab. My button click event handler (OH, it's register button handler, but they are the same so no matter): unction sendRegisterRequest(button, state) if button == "left" and state == "up" then triggerServerEvent("sendRegisterRequest", getLocalPlayer(), guiGetText(nameEditReg), guiGetText(passwdEditReg), guiGetText(rpasswdEditReg)) end end addEventHandler("onClientGUIClick", registerbtn, sendRegisterRequest)
  5. No, it's not a problem. Just when I used absolute my button was invisible. When I changed it to relative (0-1) my button is detected whereever I click in the tab. That's the problem.
  6. Chlorek

    Skin Problem

    -> timer pls setTimer(spawn, 5000, 1) -> skin problem Just set player skin when spawning: bool spawnPlayer ( player thePlayer, float x, float y, float z, [ int rotation = 0, int skinID = 0, int interior = 0, int dimension = 0, team theTeam = nil ] ) Also in your spawn() function there is no 'source' variable. It is in the one you have called by the event but you do not pass it to the spawn() function.
  7. Hi there. I am scripting some GUI and I found some problems with buttons in tabs. First of all I have to use relative=true when creating button (when I don't I do not see button). However when I used it I found another one problem - whereever I click in the tab the button is activated, but should only if button is clicked - really weird problem. Thanks for help!
  8. Dużo rzeczy będzie nie działało, większość skryptów zapewne poleci. Dużo funkcji jest zmienionych bądź już powoli wychodzą z użycia, Zrób jak powiedział dzek, odpal drugi serv i sprawdź jak to będzie wyglądało.
  9. Yes, it also explodes before reach target when it can not reach it before some time ;[
  10. But when I do like you said, then how I can give target for this rocket, because I want this rocket fly to some car.
  11. Well is it possible to create projectile (rocket) which never explode before rich the target?
  12. Chlorek

    What the hell

    While I am reading a lot of pages on mtasa wiki I meet so many pages with "--remove pls-- " instead of contents. And my question is why something like this appears so often? There are functions (not depracted) which are modified to this "--remove plz--" text To read articles I have to look to history. Can anybody explain me that? These changes are from user called "Dzeku Nooow"
  13. Thank you. I edited that code and it works perfectly
  14. My code: createProjectile ( getLocalPlayer(), 19, x, y, z, 10, nil, rx, ry, rz-180, 0, 0, 0, 0) Variables rx, ry and rz are a vehicle rotation then I am using them to create projectile. And here is my problem, when my car is turned north or south is it working alright but when a car is turned (even a bit) east or west it doesn't work, bcuz projectile is created in wrong destination like in mirror (instead of moving some left it is moving some right). Plz help, I am scripting that from 2 hours and no progress
  15. Chlorek

    Urgent!

    Yea, give us more details. We don't know what you want from scripters.
  16. If I am right you want to spawn player after login?
  17. Ja osobiście jestem zdania, że żaden "gotowiec" nie jest zbyt dobry. Każdy będzie oczekiwał czegoś innego. Dlatego uważam, że jeżeli już używać jakiś skryptów to lepiej jako podstawę do własnego gamemoda (czasem zaoszczędza to sporo czasu na początku). Chyba, że nie zna się kompletnie lua to radzę pisać od podstaw bo prędzej czy później mając własny serwer i tak będzie wam to potrzebne.
  18. Oh my english isn't too good and sometimes I don't know how to say something But I wanted to say that and thank you for correting me #edit I think my last answer is now corrected
  19. Is it difficult to read wiki? https://wiki.multitheftauto.com/wiki/AddCommandHandler
  20. local theMarker function cMarker (thePlayer, commandName) if (thePlayer) then local x,y,z = getElementPosition (thePlayer) theMarker = createMarker ( x,y,z+0.5, "checkpoint", 4, 0, 255, 0, 0, getRootElement()) ---- ( Type of marker = Checkpoint, 4 = radius, (size), 0 Red, 255 Green, 0 Blue) if (theMarker) then outputChatBox ("Event Marker Created", thePlayer) else outputChatBox ("Failed to Create Marker", thePlayer) end end end addCommandHandler ("createmarker", cMarker) function rMarker (thePlayer, commandName) if (isElement(theMarker) == true) then destroyElement(theMarker) outputChatBox ("Marker has been destroyed!", thePlayer) else outputChatBox ("There is not any Event marker!", thePlayer) end end addCommandHandler ("destroymarker", rMarker) Variables defined inside of any functions are available for this function only. They aren't available in every function;] It's really importnat so you should remember that!
  21. I don't understand you, however not enoguh to help you. What you want to do? What's problem? Ehm... so you want to make driveable objects connected together?
  22. Yeah SDK, really good idea, I didn't know about this function be4 :[ Tnx a lot, it's really usable!
  23. Removing created marker (simple version with one marker removing only). local theMarker function cMarker (thePlayer, commandName) if (thePlayer) then local x,y,z = getElementPosition (thePlayer) theMarker = createMarker ( x,y,z, "arrow", 1.5, 255, 255, 0, 255, getRootElement()) if (theMarker) then outputChatBox ("Entry Marker Created", thePlayer) else outputChatBox ("Failed to Create Marker", thePlayer) end end end addCommandHandler ("createentrymarker", cMarker) function rMarker (thePlayer, commandName) if (isElement(theMarker) == true) then destroyElement(theMarker) outputChatBox ("Marker has been destroyed!", thePlayer) else outputChatBox ("There is not any entry marker!", thePlayer) end end addCommandHandler ("removemarker", rMarker) Should work. You can write script to creating many entry markers and then removing it, that is not much more lines of code.
  24. Chlorek

    Scripting

    It's a lot of work but LUA isn't too difficult. On this wiki are all functions but first you should read introduction to LUA, that's best for beginners.
  25. Chlorek

    Scripting

    Everything you need is there wiki.multitheftauto.com ;]
×
×
  • Create New...