Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. nope, this is for direct updating the vehicle colours, when you are busy with your colour picker. Learn lua and then come back asking for help for things like this. I showed you how to do this, but you wanted to stick with your own way. Good luck,
  2. Your idea isn't going to work, but you have to find it out by your self. I fixed those errors/warnings, as far as I know. But I send them as pm, I don't post not(good) working code.
  3. it depends if you are going to change all vehicles or only the ones that got controlled by the player. I would punt the player as key and the vehicle + colours as data. vehicleTable = {} addCommandHandler ( "check", function( thePlayer ) local car = getPedOccupiedVehicle ( thePlayer ) if car then local d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12 = getVehicleColor ( car, true ) vehicleTable[thePlayer] = {car = car, oldColours ={d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12} } end end) addCommandHandler ( "check2", function( thePlayer ) local vehiclePlayertable = vehicleTable[thePlayer] if vehiclePlayertable then local car = vehiclePlayertable.car if isElement(car) then local oldColours = vehiclePlayertable.oldColours if oldColours then setVehicleColor ( car,unpack(oldColours)) end else vehicleTable[thePlayer]= nil -- remove it from the table end end end) addEventHandler("onPlayerQuit",root, function () if vehicleTable[source] then vehicleTable[source] = nil end end)
  4. local thing for local data, data that can go in the trash after using it.
  5. local A = 10 if A then local A = 50 outputChatBox(A) -- 50 end outputChatBox(A) -- 10
  6. https://forum.multitheftauto.com/viewtopic.php?f=148&t=40809
  7. your code is based on global values from all the players, If you want to script at serverside you have to use tables or elementdata(not recommended). Not just throw global data all over the place.
  8. Golanu21, if you don't define the type it will set automatic to serverside. @ Booker DeWitt: - The script starts correct? - Correct folder name? - /debugscript 3 Normally the server console will show you if the resource starts with success.
  9. Why don't you post your meta and then we fix it.
  10. for index1 = 1,#tab do local tabContents = tab[index1] local newString for index2 = 1,#tabContents do newString = tabContents[index2].. " " end if newString then outputChatBox(newString) end end You mean something like this?
  11. addCommandHandler don't have a source. Server side USMCteam = createTeam ("USMC") addCommandHandler ("usmc", function(player) if not isPedDead(player) then setElementModel (player, 287) giveWeapon (player, 28, 500) end setPlayerTeam (player, USMCteam) end)
  12. IIYAMA

    ACL usage

    I understand everything, You can create a custom acl group and put them in there. Change your script and done. no big deal.
  13. I want a stripper! They are (not) for free!!! MAYBE YOU SHOULD READ THIS FIRST
  14. IIYAMA

    ACL usage

    With admin resource you can also add players/resources.
  15. The user data should be the table key and not his nick. Nicks can be changed you know.
  16. I don't know if this also does returns the wheels. (I never tried it before) https://wiki.multitheftauto.com/wiki/Ge ... Components https://wiki.multitheftauto.com/wiki/Ge ... ntPosition returns:(patriot) boot_dummy windscreen_dummy wheel_rf_dummy wheel_lf_dummy wheel_lb_dummy wheel_rb_dummy bonnet_dummy chassis bump_front_dummy extra_` chassis_vlo door_lr_dummy door_rr_dummy door_lf_dummy bump_rear_dummy door_rf_dummy
  17. IIYAMA

    help with code

    If the element(player) isn't in the server, how the hell can you get the type of it?
  18. IIYAMA

    ?? BindKey

    it seems you totally agree with me . . . . btw I hate p-p-paaaaiint! I almost can't write it down.
  19. IIYAMA

    ?? BindKey

    I am using it sometimes, but a local function is always faster because you don't have to recreate another function. Most of the time with fast timers or things that have to be done without interrupt other things that require all the data inside. I love lua, so many possibility's and so many code styles
  20. tables, learn it or write double/triple/////// lines.
  21. IIYAMA

    ACL usage

    It is info, things can be stored in it. But the acl will be stored there and can be changed manually when the server is off line. well why don't you edit it, it can't be that hard can it?
  22. IIYAMA

    ACL usage

    Doesn't matter, if the script has admin rights. If you make the script and you activate it to set ranks, there won't be any right problems. But if you use somebody else his script, you may have those problems. Codes can give options but also limit things. I don't know about what kind of script you are talking about, .lua or .xml But that can just be changed manually. (server must not be running) MTA San Andreas 1.3\server\mods\deathmatch > acl.xml
  23. np.
  24. local vehicleHandling423 = { {"mass", 10000.0}, {"turnMass", 50000.0}, {"dragCoeff", 2.0}, {"centerOfMass", { 0.0, 0.0, -0.6 }}, {"percentSubmerged", 80}, { "tractionMultiplier", 0.70}, {"tractionLoss", 0.9}, {"tractionBias", 0.5}, {"numberOfGears", 5}, {"maxVelocity", 154.0}, {"engineAcceleration", 35.0}, {"engineInertia", 10.0}, {"driveType", "awd"}, {"engineType", "petrol"}, {"brakeDeceleration", 11.0}, {"brakeBias", 0.45}, { "ABS", false}, {"steeringLock", 30.0}, {"suspensionForceLevel", 1.4}, {"suspensionDamping", 0.10}, {"suspensionHighSpeedDamping", 0.0}, {"suspensionUpperLimit", 0.40}, {"suspensionLowerLimit", -0.40}, {"suspensionFrontRearBias", 0.5}, {"suspensionAntiDiveMultiplier", 0.3}, {"seatOffsetDistance", 0.20}, {"collisionDamageMultiplier", 0.20}, {"monetary", 35000}, {"modelFlags", 0x40006800}, {"handlingFlags", 0x1300005}, {"headLight", 9}, {"tailLight", 1}, {"animGroup", 0} } addEventHandler("onVehicleEnter",root, function () if getElementModel(source) == 423 then for i=1,#vehicleHandling423 do local dataHandling = vehicleHandling423[i] setVehicleHandling(source,dataHandling[1],dataHandling[2] ) end end end)
×
×
  • Create New...