Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. مافيه حدود للأرقمنت لو حطيت مليون مافيه اي مشكلة
  2. GUIEditor.label[12] = guiCreateLabel(138, 19, 291, 55, "BY ANONYMOUS", false, GUIEditor.tab[1]) setTimer(guiLabelSetColor, 250, 0, GUIEditor.label[12], math.random(255), math.random(255), math.random(255))
  3. TAPL

    Objects samp

    http://bugs.multitheftauto.com/view.php?id=6571
  4. TAPL

    Help me

    Possible, but it's not easy to do it. You can use event onClientExplosion with some magic.
  5. ؟ importHandling وين الفنكشن + في ملف السيرفر سطر 41 controller غير معرف
  6. https://wiki.multitheftauto.com/wiki/Scripting_Introduction https://wiki.multitheftauto.com/index.php?title=AR/Main_Page
  7. ^ مو دارين وين الله حاطهم يغلق
  8. This make no sense. Event onTrailerDetach is server side only. In fact your whole script should be server side. From where do you trigger onMission? and where is the event onMarkerHit or event onClientMarkerHit? And here, you use x, y, z before you define it. marker = createMarker ( x, y, z, "cylinder", 5.0, 255, 0, 0, 175 ) x, y, z = getRandomLocation( )
  9. TAPL

    Commands

    https://wiki.multitheftauto.com/wiki/OnPlayerCommand
  10. Well, what about if you have like 20 vehicles, all of them will be in same coordinates?
  11. players و peds يعمل مع setPedStat(player, 24, 999)
  12. gangs aren't teams, they only have column in scoreboard.
  13. TAPL

    Bad argument

    You're welcome.
  14. TAPL

    Bad argument

    function login() local serial = getPlayerSerial(source) local userAccount = getAccount(serial) local pass = "password" if (userAccount) then local probeer = logIn(source, userAccount, pass) else local userAccount = addAccount(serial, pass) end if (userAccount) then local probeer = logIn(source, userAccount, pass) end if (userAccount) and (probeer) then -- spawn him maybe? fadeCamera(source, true) setCameraTarget(source) else outputChatBox("Login failed.", source, 255, 0, 0) end end addEventHandler("onPlayerJoin", root, login)
  15. http://bugs.multitheftauto.com/view.php?id=6571
  16. TAPL

    moveObject

    There is: stopObject
  17. raceVehicles = {[503] = true} function enterVehicle(player, seat, jacked) if (raceVehicles[getElementModel(source)]) then setElementModel(player, 0) addPedClothes(player, "moto", "moto", 16) else addPedClothes(player, "garagetr", "garageleg", 17 ) end end addEventHandler("onVehicleStartEnter", root, enterVehicle ) ---------------------------------------------------------------------------------------- function removeHelmetOnExit(player, seat, jacked ) if (raceVehicles[getElementModel(source)]) then removePedClothes(player, 16) else removePedClothes(player, 17) end end addEventHandler("onVehicleExit", root, removeHelmetOnExit)
  18. TAPL

    Can Be ?

    for i, random in ipairs(getElementsByType("gui-button")) do guiSetProperty(random, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", alpha, red, green, blue)) end Example for green color: for i, random in ipairs(getElementsByType("gui-button")) do guiSetProperty(random, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, 0, 255, 0)) end And your code: addEventHandler("onClientResourceStart", resourceRoot, function() setTimer(function() for _, random in ipairs(getElementsByType('gui-button')) do guiSetProperty(random, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) guiSetFont(random, "default-bold-small") end end, 250, 0) end)
  19. Then i guess you have other script that reset the colors. but still i don't understand, the color will set when the map start, so where the hell is the problem?! Are you sure you have it server-side? What default colors are you talking about? can you post image?
  20. should be local TeamName = getTeamName(getPlayerTeam(source)) if (TeamName == "Army") or (TeamName == "MP") then
  21. colors = { [1] = {255, 255, 255, 255, 255, 255}, [2] = {0, 0, 0, 0, 0, 0}, [3] = {255, 0, 0, 255, 0, 0}, [4] = {0, 255, 0, 0, 255, 0}, [5] = {0, 0, 255, 0, 0, 255} } function mapStart(startedResource) if getResourceInfo(startedResource, "type") == "map" then for i, vehicle in ipairs(getElementsByType("vehicle")) do local r1, g1, b1, r2, g2, b2 = unpack(colors[math.random(#colors)]) setVehicleColor(vehicle, r1, g1, b1, r2, g2, b2) end end end addEventHandler("onResourceStart", root, mapStart)
  22. You mean that you don't want all cars have same color, but different color where you have put it in the script?
  23. TAPL

    Can Be ?

    https://wiki.multitheftauto.com/wiki/RGBToHex
  24. Can you explain in better way what you really want to do? because i am confused.
  25. colors = { [1] = {255, 255, 255, 255, 255, 255}, [2] = {0, 0, 0, 0, 0, 0}, [3] = {255, 0, 0, 255, 0, 0}, [4] = {0, 255, 0, 0, 255, 0}, [5] = {0, 0, 255, 0, 0, 255} } function mapStart(startedResource) if getResourceInfo(startedResource, "type") == "map" then local r1, g1, b1, r2, g2, b2 = unpack(colors[math.random(#colors)]) for i, vehicle in ipairs(getElementsByType("vehicle")) do setVehicleColor(vehicle, r1, g1, b1, r2, g2, b2) end end end addEventHandler("onResourceStart", root, mapStart)
×
×
  • Create New...