Jump to content

Msypon

Members
  • Posts

    76
  • Joined

  • Last visited

Everything posted by Msypon

  1. Guys i would like to know when i should use these functions
  2. Msypon

    gui

    Is possible to rotate a gui?
  3. Msypon

    Break

    someone can give me an example using break¿
  4. 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
  5. 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?
  6. -- 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)
  7. Msypon

    Table

    ok ty, another question, can we cancel the event onClientPlayerWeaponFire?
  8. Msypon

    Table

    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)
  9. Msypon

    Database

    Which functions do i need to create a database for accounts ?
  10. Msypon

    Question

    we can use cancelEvent in a custom event?
  11. How to make a custom progress bar with image?
  12. Msypon

    1s

    No men look this function ban( p, c, t, ti ) ti:gsub ( "1", "1s" ) banPlayer ( t, nil, nil, nil, p, "aw", tonumber ( t ) ) end addCommandHandler ( "timeb", ban ) instead 1 i want 1s
  13. Msypon

    1s

    im making a jail system but i want to do like that: /jail player 1s (second), how to do that 1s, which function do i need?
  14. Msypon

    Return break

    oh thx alot guys
  15. Msypon

    Return break

    When we should use return and break?
  16. 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?
  17. Msypon

    Hud messages

    thanks solidsneke is that what i wanted
  18. Msypon

    Hud messages

    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
  19. Msypon

    Hud messages

    exports.hud_messages:showBox(text,colorred,colorgreen,colorblue,timetohide) this is the syntax men
  20. Msypon

    Hud messages

    no men, i just want such text one time not being repeated
×
×
  • Create New...