Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    timer?

    getPlayerMoney Take some of your time to search for the functions!
  2. Castillo

    timer?

    the function is: setPlayerMoney
  3. Castillo

    timer?

    I would like to see you trying something before ask, you can always use the wiki page to learn. https://wiki.multitheftauto.com/wiki/SetTimer
  4. Better check twice before say the other did something wrong.
  5. Dude, it won't work because you put SendMemo and it was ChatMemo.
  6. You didn't copy my server side code, you put send_text not text in outputChatBox, copy my SERVER SIDE CODE AGAIN.
  7. , are you going to tell to me that it is not? i'm learning since i was 14. Post your code here.
  8. It is the same.
  9. No, CowTurbo, this will also show a cursor, showChat is what he requires.
  10. Ok, i have changed the code, try it now.
  11. I will try it later, right now i'am busy.
  12. --client side text = guiGetText(myGUIEdit) triggerServerEvent("send_text",getLocalPlayer(),text) --server side addEvent("send_text",true) addEventHandler("send_text",getRootElement(), function (text) outputChatBox(getPlayerName(source) ..": ".. tostring(text),getRootElement(),255,0,0) end)
  13. Do you have the progress bar someBar? And btw, i know i had a missing ')' but i wanted you to fix it, i was a bit hurry.
  14. Do you mean, like real websites into MTA? in-game?
  15. Castillo

    One question

    Then, you should have told us that before. function dxDrawColorText(str, ax, ay, bx, by, color, scale, font) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if cap == "" and col then color = tocolor(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), 255) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap, scale, font) dxDrawText(cap, ax, ay, ax + w, by, color, scale, font, "center", "bottom", false, false, false ) ax = ax + w color = tocolor(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), 255) end last = e + 1 s, e, cap, col = str:find(pat, last) end if last <= #str then cap = str:sub(last) local w = dxGetTextWidth(cap, scale, font) dxDrawText(cap, ax, ay, ax + w, by, color, scale, font, "center", "bottom", false, false, false ) end end function drawPlayerTags() for i,v in ipairs(getElementsByType("player")) do if not v == getLocalPlayer() then local name = getPlayerName(v) local x,y,z = getElementPosition(v) local cx,cy,cz = getCameraMatrix() if isLineOfSightClear(cx,cy,cz,x,y,z,true,true,false,true,false,true,false,v) then if getDistanceBetweenPoints3D(cx,cy,cz,x,y,z) <= 45 then local px,py = getScreenFromWorldPosition(x,y,z+0.3,0.06) if px then r,g,b = getPlayerNametagColor(v) dxDrawColorText(name, px-60, py, px, py, tocolor(r, g, b, 255), 2, "default") end end end end end end addEventHandler("onClientRender",getRootElement(),drawPlayerTags) There, it works fine here, should work "there" too. And please, don't think we're your "slaves" our something like that
  16. I think, you should calm down, don't you think? they're trying to help you, you don't pay them, understand? calm down!
  17. I'am not sure of what do you want to do, i assumed, you wanted to set the text of the purchased skill. addEvent("selectSkill",true) addEventHandler( "selectSkill", getRootElement(), function(skillsID) if (tonumber(skillsID)) then guiGridListSetItemText(GUIEditor_Grid[211],tonumber(skillsID),5,"purchased",false,false) guiGridListSetItemColor (GUIEditor_Grid[211],tonumber(skillsID),5,0,255,0) outputChatBox("text change "..tonumber(skillsID)) end end )
  18. Castillo

    One question

    You wanted this for player nametag?
  19. Piorun, showChat is alot easier
  20. Castillo

    One question

    He gave you the code, use it.
  21. addEventHandler("onClientRender",getRootElement(), function () if ( somebar ) then local veh = getPedOccupiedVehicle(getLocalPlayer()) if veh then health = getElementHealth(veh)/100*10 guiProgressBarSetProgress(somebar, health) end end end) It should work.
  22. I can see an error here, local localPlayer = getLocalPlayer() addEvent("selectSkill",true) addEventHandler( "selectSkill", getRootElement(), -- when you trigger an event from server side, you must use getRootElement() function(rowIndex) outputChatBox("trigger called") guiGridListSetItemText(GUIEditor_Grid[211],rowIndex,5,"purchased",false,false) guiGridListSetItemColor (GUIEditor_Grid[211], rowIndex,5,0,255,0) outputChatBox("text change") end )
  23. Well, you can use use showChat function, or if you only want to disable it for yourself, MTA has built-in command /chat 0.
  24. You could start learning how to script. https://wiki.multitheftauto.com/wiki/Main_Page
×
×
  • Create New...