Jump to content

NeXuS™

Retired Staff
  • Posts

    1,134
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by NeXuS™

  1. Give me a second. Gonna check it on my server.
  2. Change if stat > 1000 then to if stat > 100 then
  3. You'll have to create a script to remove it with removeWorldModel.
  4. Server side. function addInfo(playerSource, infoText, rA, rG, rB) isPlayer = isElement(playerSource) and getElementType(playerSource) == "player" assert(isPlayer, "Bad argument @ 'addInfo' [Expected player at argument 1, got " .. type(playerSource) .. "]") assert(tostring(infoText), "Bad argument @ 'addInfo' [Expected string at argument 2, got " .. type(infoText) .. "]") assert(tonumber(rA), "Bad argument @ 'addInfo' [Expected number at argument 3, got " .. type(rA) .. "]") assert(tonumber(rG), "Bad argument @ 'addInfo' [Expected number at argument 4, got " .. type(rG) .. "]") assert(tonumber(rB), "Bad argument @ 'addInfo' [Expected number at argument 5, got " .. type(rB) .. "]") triggerClientEvent(playerSource, "addInfo", root, infoText, rA, rG, rB) end function testInfo(playerSource) local i = 1 setTimer(function() addInfo(playerSource, "Test " .. i, 255, 255, 255) i = i + 1 end, 1000, 10) end addCommandHandler("testinfo4", testInfo) Client side. local sX, sY = guiGetScreenSize() local infoX, infoY = 0, sY/2 -- Edit this to set the text's X and Y. local messageStayTime = 6 -- Edit this to set how many seconds the message is shown for. local infoTexts = {} function addInfo(infoText, rA, rG, rB) table.insert(infoTexts, 1, {infoText, rA, rG, rB, 255, getTickCount()}) outputDebugString("Added info on tick: " .. getTickCount()) end addEvent("addInfo", true) addEventHandler("addInfo", root, addInfo) function drawInfos() if #infoTexts > 0 then for i = #infoTexts, 1, -1 do local selectedInfo = infoTexts[i] dxDrawText(selectedInfo[1], infoX, infoY+(#infoTexts-i)*15, infoX, infoY, tocolor(selectedInfo[2], selectedInfo[3], selectedInfo[4], selectedInfo[5])) if getTickCount() > selectedInfo[6] + messageStayTime*1000 then infoTexts[i][5] = infoTexts[i][5] - 1 if infoTexts[i][5] == 0 then table.remove(infoTexts, i) outputDebugString("Removed info on tick: " .. getTickCount()) end end end end end addEventHandler("onClientRender", root, drawInfos) Meta. <meta> <script src="sourceS.lua"/> <script src="sourceC.lua" type="client"/> <export function="addInfo" type="server"/> <export function="addInfo" type="client"/> </meta> You can easily export it from both sides. Server exports.resName:addInfo(playerData, "Test", 255, 255, 255) Client exports.resName:addInfo("Test", 255, 255, 255)
  5. Let me create one for you. Give me about 15-20 minutes.
  6. What does this code do? What is it for?
  7. Try it first, if it doesn't work, I'll give you a hand.
  8. What are you trying to change in the ACL?
  9. Using this technic the other way. Getting the screen position from the world position, and drawing it. If you don't try it at all, we ain't gonna give you an example.
  10. What OP is it running on?
  11. And secondly, if you want to use the forums, create posts in the right section. This post belongs to the Scripting section. Can you move it, please? @Dutchman101
  12. Not tested, if you get any errors. just reply. function respawnHandler(keyPresser) spawn(keyPresser) unbindKey(keyPresser, "r", "down", respawnHandler) end addEventHandler("onPlayerWasted", root, function() bindKey(source, "r", "down", respawnHandler) end )
  13. bindKey has different arguments. Check the wiki page.
  14. You could just simply. outputChatBox("Player's data: " .. (getElementData(localPlayer, "elementData") or "not found") .. ".")
  15. You could use createColCuboid and onColShapeHit event with some timers and renders.
  16. memoText = [[Welcome to Ultimatium English Freeroam! Before getting started, all new players must go through the rules listed below, created to keepthe server clean of disturbers. #1. Speak English only. As this is an English server, we can't tolerate any other language in public chats. However, if you wish to talk to someone in your own language, then you may use private messages. Syntax: /pm [player name] [message]. #2. Do not disturb staff members. Pretty straight forward rule. Do not roam around / make noises near busy staff members, which can be identified by 'L1', 'L2', 'L3', 'L4' or 'L5' icon on their names. #3. Do not insult or provoke anyone. We tend to keep a nice atmosphere here. Any insult against any player will not be tolerated, no matter what. Some insults inclue, 'Bitch', 'Mother:Oer, ':Oer', 'Asshole' etc. #4. No racism. Calling someone names or anything basede on someone's real life complexion is strictly forbidden. In extreme cases, you might get a ban for it. #5. Do not lie to staff members. If any staff member questions you about any server relat\nreport (not personal), you must answer honestly. If you lie, you'll eventually be caught and punished. #6. Do not insult the server. Non-constructive criticism against the server can get you permanently banned in extreme cases. That's it for now. Enjoy playing!]] GUIEditor.memo[1] = guiCreateMemo(0.46, 0.10, 0.48, 0.81, memoText, true, GUIEditor.window[1]) Can you try this?
  17. You can create a custom chat by canceling on onPlayerChat event and using outputChatBox to write out the written message.
  18. Try it with the actual string. setWeaponProperty("ak-47", "poor", "maximum_clip_ammo", 1)
  19. You can use OOP and then use transformPosition for it. If you dont want to use OOP, you can use math for it.
  20. I suppose you highlighted the said line. Next time use [ code] tags. if itemName == "EngineOne" then if getElementData(getLocalPlayer(),"Tamir Çantası") and getElementData(getLocalPlayer(),"Tamir Çantası") >= 1 then if (getElementData(getLocalPlayer(),"Motor") or 0) > 0 then local col = getElementData(getLocalPlayer(),"currentCol") triggerServerEvent("playeRepairingAnim",localPlayer,2) setElementData(col,"Motor_inVehicle",(getElementData(col,"Motor_inVehicle") or 0)+1) setElementData(getLocalPlayer(),"Motor",(getElementData(getLocalPlayer(),"Motor") or 0)-1) triggerServerEvent("playeRepairingAnim",localPlayer,2) startRollMessage2("Inventory", "Bir motor koyuldu!", 22, 255, 0 ) else startRollMessage2("Inventory", "Sende Motor Yok!", 255, 22, 0 ) end end
  21. Can you give us your table's structure of the toptimes?
  22. You'll have to use the onPlayerLogin event, check if the player is in the console ACL Group using the isObjectInAclGroup (which needs the getAccountName and aclGetGroup functions), and then just using an addEventHandler to draw the image using dxDrawImage, and then use the playSound function. And you'll have to use a custom event using addEvent because those functions are server-sided only.
  23. NeXuS™

    [help]

    Try if string.find(guiGetText(textBox), "www.") or string.fnd(guiGetText(textBox), "http") then
  24. Back from my vacation, lets go.

×
×
  • Create New...