Jump to content

#Honda-R

Members
  • Posts

    82
  • Joined

  • Last visited

Everything posted by #Honda-R

  1. client LINE NUMBER ON/OFF | EXPAND/CONTRACT | SELECT ALL -- for client side: "onClientMarkerHit" local myMarker = createMarker(-3686, 1600.8000488281, 8.39, 'cylinder', 5, 255, 0, 0, 150) -- create myMarker function fakeBomb(element,d) if d then local x,y,z = getElementPosition(source) -- source = marker createExplosion(x, y, z, 0, true, -1.0, false) end end addEventHandler( "onClientMarkerHit", myMarker, fakeBomb ) Worked Perfect! Thanks.
  2. I'm trying to make an explode onMarkerHit Dont Work. local myMarker = createMarker(-3686, 1600.8000488281, 8.39, 'cylinder', 5, 255, 0, 0, 150) -- create myMarker function fakeBomb(x,y,z,d) if d then --Check the players Dimension if getElementDimension(getLocalPlayer()) == d then --If the players Dimension is the current dimension --Then people on other dimensions cant see this explosion createExplosion(x, y, z, 0, true, -1.0, false) end addEventHandler( "onMarkerHit", myMarker, fakeBomb )
  3. #Honda-R

    Problem

    The race GM that i am using is Default. Anyone knows the problem ??
  4. #Honda-R

    Problem

    Well. it shows color on scoreaboard, but when player chat's i dont change color of nick.
  5. #Honda-R

    Problem

    Hey i am using to change the player nick color this resource https://community.multitheftauto.com/in ... ls&id=3583 in play and freeroam it changes player nick color but in race no, where can be the problem ? it shows color on scoreaboard, but when player chat's i dont change color of nick.
  6. I'l try to make local editBOX = GUIEditor.edit[1] = guiCreateEdit(27, 83, 90, 24, "", false, GUIEditor.window[1]) setPlayerName ( sPlayerElement, taggedName ) local Name = getPlayerName(getLocalPlayer()) setPlayerName ( editBOX, taggedName ) Damn! i tottaly messed up!
  7. GUIEditor = { button = {}, window = {}, edit = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(421, 223, 195, 122, "Nick Color", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(23, 39, 183, 25, "Example: #000000 ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiSetProperty(GUIEditor.label[1], "AlwaysOnTop", "True") GUIEditor.edit[1] = guiCreateEdit(27, 83, 90, 24, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(123, 84, 39, 23, "Set", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(23, 24, 183, 25, "Enter code of nick color", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") end ) Help me to make it , i will share it to mta community I will try to explain everything lets start GUIEditor.edit[1] = guiCreateEdit(27, 83, 90, 24, "", false, GUIEditor.window[1]) a place where player should write HTML Color code like : #000000 Then on player click button set GUIEditor.button[1] = guiCreateButton(123, 84, 39, 23, "Set", false, GUIEditor.window[1]) somehow get code from GUIEditor.edit[1] .And get player nick set player nick [html COLOR] And his name. Example how it works Player are named "Scripter" then he writes in to edit place #000000 and press set. Then his nicks changes to #000000Scripter
  8. #Honda-R

    color

    Thanks for your help.
  9. #Honda-R

    color

    maybe yuo can add smt like this ? onPlayerChat nameTagColor
  10. #Honda-R

    color

    Maybe its bec im using in race ?
  11. #Honda-R

    color

    function nameTagColor ( redBar,greenBar,blueBar, r, g, b ) setPlayerNametagColor ( source, redBar,greenBar,blueBar ) destroyBlipsAttachedTo(source) setTimer ( createBlipAttachedTo, 100, 1, source, 0, 2, redBar, greenBar, blueBar ) end addEvent( "nameTagColorChange", true ) addEventHandler ( "nameTagColorChange", getRootElement(), nameTagColor) function destroyBlipsAttachedTo(player) local attached = getAttachedElements ( player ) if ( attached ) then for k,element in ipairs(attached) do if getElementType ( element ) == "blip" then destroyElement ( element ) end end end end function left() destroyBlipsAttachedTo(source) end addEventHandler("onPlayerQuit", getRootElement(), left )
  12. #Honda-R

    color

    How to say This script , opens a gui to change nick color then mix with rbg color and press "set" it have to change nick color Lets say i mix color to red , okai i press set. then press "T" and write someting , and my nick white, not red at it should be, but in scoreboard its red.
  13. #Honda-R

    color

    Hey im testing it in race. It only change nick color at scoreboard not on chatbox Look: Client local r, g, b = getPlayerNametagColor (getLocalPlayer()) nameTagColorWindow = guiCreateWindow(328,570,425,240,"Name Color",false) guiSetVisible(nameTagColorWindow,false) nameLabel = guiCreateLabel(175,30,110,17,"" ..getPlayerName(getLocalPlayer()) .. "", false, nameTagColorWindow) redNameLabel = guiCreateLabel(25,49,108,17,"Red",false,nameTagColorWindow) greenNameLabel = guiCreateLabel(22,97,108,17,"Green",false,nameTagColorWindow) blueNameLabel = guiCreateLabel(25,146,108,17,"Blue",false,nameTagColorWindow) guiLabelSetColor(redNameLabel,255,0,0) guiLabelSetColor(greenNameLabel,0,255,0) guiLabelSetColor(blueNameLabel,0,0,255) redBar = guiCreateScrollBar( 0.2, 0.2, 0.65, 0.1, true, true, nameTagColorWindow) greenBar = guiCreateScrollBar( 0.2, 0.4, 0.65, 0.1, true, true, nameTagColorWindow) blueBar = guiCreateScrollBar( 0.2, 0.6, 0.65, 0.1, true, true, nameTagColorWindow) local red = guiScrollBarGetScrollPosition(redBar) local green = guiScrollBarGetScrollPosition(greenBar) local blue = guiScrollBarGetScrollPosition(blueBar) guiScrollBarSetScrollPosition(redBar, math.floor(r / 2.55)) guiScrollBarSetScrollPosition(greenBar, math.floor(g / 2.55)) guiScrollBarSetScrollPosition(blueBar, math.floor(b / 2.55)) closeNametagWin = guiCreateButton(15,202,90,20, "Close", false, nameTagColorWindow) setcolorbutton = guiCreateButton(355,202,50,20, "Set", false, nameTagColorWindow) redAmount = guiCreateLabel(0.90, 0.21, 0.08, 0.07, "0", true, nameTagColorWindow) greenAmount = guiCreateLabel(0.90, 0.41, 0.08, 0.07, "0", true, nameTagColorWindow) blueAmount = guiCreateLabel(0.90, 0.61, 0.08, 0.07, "0", true, nameTagColorWindow) guiSetText(redAmount, tostring(red)) guiSetText(greenAmount, tostring(green)) guiSetText(blueAmount, tostring(blue)) function nameColor() if source == redBar or source == greenBar or source == blueBar then guiLabelSetColor(nameLabel,(guiScrollBarGetScrollPosition(redBar)*2.55),(guiScrollBarGetScrollPosition(greenBar)*2.55),(guiScrollBarGetScrollPosition(blueBar)*2.55)) local red = guiScrollBarGetScrollPosition(redBar) local green = guiScrollBarGetScrollPosition(greenBar) local blue = guiScrollBarGetScrollPosition(blueBar) guiSetText(redAmount, math.floor(red * 2.55)) guiSetText(greenAmount, math.floor(green * 2.55)) guiSetText(blueAmount, math.floor(blue * 2.55)) end end addEventHandler("onClientGUIScroll",getRootElement(),nameColor) function setthecolor() triggerServerEvent("nameTagColorChange",getLocalPlayer(),(guiScrollBarGetScrollPosition(redBar)*2.55),(guiScrollBarGetScrollPosition(greenBar)*2.55),(guiScrollBarGetScrollPosition(blueBar)*2.55)) end addEventHandler("onClientGUIClick",setcolorbutton,setthecolor,false) function closewindow() vis = guiGetVisible (nameTagColorWindow) if vis == true then showCursor(false) guiSetVisible(nameTagColorWindow,false) end end addEventHandler("onClientGUIClick",closeNametagWin,closewindow,false) function showwindow() vis = guiGetVisible(nameTagColorWindow) if vis == false then guiSetVisible(nameTagColorWindow,true) showCursor(true) else guiSetVisible(nameTagColorWindow,false) showCursor(false) end end addCommandHandler("nc", showwindow) addCommandHandler("namecolor", showwindow) addEventHandler ( "onClientPlayerChangeNick", getLocalPlayer(), function ( oldNick, newNick ) guiSetText( nameLabel, newNick ) end )
  14. #Honda-R

    gui shown

    o ma gad! Thanks very mutch!
  15. #Honda-R

    gui shown

    Well my script has UIEditor.staticimage[3] Images and GUIEditor.label[9] labels
  16. #Honda-R

    gui shown

    Well you see function onResourceStart () local Window = guiGetVisible (GUIEditor.button[1]) --We predefine a variable for Window if (Window) == true then -- If window is shown guiSetVisible ( GUIEditor.button[1], false ) --We hide it showCursor ( false ) --We hide it's cursor else --else we.. guiSetVisible ( GUIEditor.button[1], true ) --Show the window showCursor ( true ) --We show it's cursor end end bindKey ( "F7", "down", onResourceStart ) --And we bind it with 'f1' key And i need to make visible other elements. Like GUIEditor.button[2] GUIEditor.button[3] ect
  17. #Honda-R

    gui shown

    Thanks! Now i want to ask another qestion . function onResourceStart () local Window = guiGetVisible (GUIEditor.button[1]) --We predefine a variable for Window if (Window) == true then -- If window is shown guiSetVisible ( GUIEditor.button[1], false ) --We hide it showCursor ( false ) --We hide it's cursor else --else we.. guiSetVisible ( GUIEditor.button[1], true ) --Show the window showCursor ( true ) --We show it's cursor end end bindKey ( "F7", "down", onResourceStart ) --And we bind it with 'f1' key You see GUIEditor.button[1 What add to script like if i want to make visible GUIEditor.button[2] GUIEditor.button[3] and ect.
  18. #Honda-R

    gui shown

    You added line guiSetVisible ( GUIEditor.label[2], false ) ?
  19. #Honda-R

    gui shown

    Hello. GUIEditor = { label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.label[1] = guiCreateLabel(277, 221, 111, 15, "MY TEXT", false) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetHorizontalAlign(GUIEditor.label[1], "left", true) guiSetProperty(GUIEditor.label[1], "AlwaysOnTop", "True") GUIEditor.label[2] = guiCreateLabel(277, 261, 111, 15, "MY TEXT", false) guiSetFont(GUIEditor.label[2], "default-bold-small") guiSetProperty(GUIEditor.label[2], "AlwaysOnTop", "True") end ) There is a problem. the labels shows when i dont need it. When i join to server. The labels are shown. How to hide it. I need to hide it , bec im willing to use bind key.
  20. Thanks Prestage. Can you do one more thing ? Make it able to show with HTML color code it show #000000Nick
  21. Hello GUIEditor.label[1] = guiCreateLabel(277, 221, 111, 15, "'s Stats", false) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetHorizontalAlign(GUIEditor.label[1], "left", true) guiSetProperty(GUIEditor.label[1], "AlwaysOnTop", "True") On the text "'s Stats" i want to do getPlayerName"'s Stats" but i fail. Please add it and show me how to add it correctly.
  22. That is! i dont know how to use
  23. Hey, i have problem i play on 1024 x 768 And heres code dxDrawText(nick, 272, 212, 479, 241, tocolor(255, 255, 255, 255), 2.00, "default-bold", "left", "top", false, false, false, true, true) I put in in GUI and like i said when i play on 1024 x 768 its fits to gui but like in 800x600 or others , it dont fits! How to do it fits on all resolutions.
×
×
  • Create New...