-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
مافيه حدود للأرقمنت لو حطيت مليون مافيه اي مشكلة
-
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))
-
http://bugs.multitheftauto.com/view.php?id=6571
-
؟ importHandling وين الفنكشن + في ملف السيرفر سطر 41 controller غير معرف
-
https://wiki.multitheftauto.com/wiki/Scripting_Introduction https://wiki.multitheftauto.com/index.php?title=AR/Main_Page
-
^ مو دارين وين الله حاطهم يغلق
-
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( )
-
https://wiki.multitheftauto.com/wiki/OnPlayerCommand
-
Well, what about if you have like 20 vehicles, all of them will be in same coordinates?
-
players و peds يعمل مع setPedStat(player, 24, 999)
-
gangs aren't teams, they only have column in scoreboard.
-
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)
-
http://bugs.multitheftauto.com/view.php?id=6571
-
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)
-
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)
-
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?
-
should be local TeamName = getTeamName(getPlayerTeam(source)) if (TeamName == "Army") or (TeamName == "MP") then
-
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)
-
You mean that you don't want all cars have same color, but different color where you have put it in the script?
-
Can you explain in better way what you really want to do? because i am confused.
-
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)
