Msypon
Members-
Posts
76 -
Joined
-
Last visited
Everything posted by Msypon
-
Guys i would like to know when i should use these functions
-
No guys, you didnt understand me, im creating a treasure script and lets say that i set the time (setTimer) to 60000, then two objects will appear in LS or SF beach, but i dont know how to do it randomly
-
hi guys i need your help with my table locations: locations = { { -- beach ls { 529, -1884, 3 }, { 612, -1884, 3 } }, { -- sf beach { -2920, 68, 1 }, { -2913, 159, 3 } } } so i want to create 2 objects randomly in these places, wat i have to do?
-
-- client tick = 0 addEvent ( 'getBansList', true ) function panelTick ( bans ) if ( guiGetVisible ( GUIEditor.window[1] ) ) then if ( getTickCount() >= tick ) then local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) if ( name and ip ) then guiGridListSetItemText ( GUIEditor.gridlist[1], row, name, bans.name, false, false ) guiGridListSetItemText ( GUIEditor.gridlist[1], row, ip, bans.name, false, false ) end tick = getTickCount() + 1000 end end end addEventHandler ( 'onClientRender', root, panelTick ) addEventHandler ( 'getBansList', root, panelTick ) --server function banList ( ) local bans = dbQuery ( banSQL, 'SELECT * FROM banTable' ) local result = dbPoll ( bans, -1 ) for _, bans in pairs ( result ) do triggerClientEvent ( 'getBansList', root, bans ) end end attempt to index local 'bans' (a nil value)
-
why "screen[2]" on line 7? addEventHandler('onClientRender', root, function() for bone = 1, 54 do local bonePos = {getPedBonePosition(localPlayer, bone)} if bonePos[1] then local screen = {getScreenFromWorldPosition(unpack(bonePos))} if screen[1] then dxDrawText(''..bone, screen[1], screen[2]) end end end end)
-
How to make a custom progress bar with image?
-
how to make a dxDrawRectancle load? for example i have a custom progress bar with dxDrawRectangle, but i doesnt know how to make load like guiProgressBarSetProgress, can anyone help me?
-
thanks solidsneke is that what i wanted
-
this is the code client local x, y = guiGetScreenSize() local boxes = {} local timers = {} local id = 1 function showBox(text, r, g, b, t) if not r or not g or not b then r, g, b = 255, 255, 255 end if not t then return end local color = tocolor(r, g, b, 255) or -1 if t > 100 then playSoundFrontEnd ( 13 ) boxes[id] = {text, color} timers[id] = setTimer(destroyBox,t,1,id) id = id + 1 end end function destroyBox(ids) boxes[ids] = nil end function drawBoxes() local nextx = 0 local nexty = 0 for i,tab in pairs(boxes) do nextx = x/2 - string.len(tab[1])*7.5/2 dxDrawRectangle(nextx, nexty,string.len(tab[1])*8.5, 17, tocolor(0, 0, 0, 85)) dxDrawText(tab[1], nextx + 5, nexty, nextx - 10, nexty, tab[2], 1.0, "sans", "left", "top") nextx = nextx nexty = nexty + 17 end end addEvent("showBox", true) addEventHandler("showBox", root, showBox) addEventHandler("onClientRender", root, drawBoxes) server function showBox(str, player, r, g, b, t) if isElement(player) then triggerClientEvent(player, "showBox", root, str, r, g, b, t) end end
-
exports.hud_messages:showBox(text,colorred,colorgreen,colorblue,timetohide) this is the syntax men
-
no men, i just want such text one time not being repeated