Jump to content

KariiiM

Members
  • Posts

    1,312
  • Joined

  • Last visited

Everything posted by KariiiM

  1. Try that and tell me the result to help you out local windowTitle = "CST Rules, Documentation and Answers" GUIEditor = { button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() local sx, sy = guiGetScreenSize() rule = guiCreateWindow((sx/2)-400, (sy/2)-300, 800, 600, windowTitle, false) guiWindowSetSizable(rule, false) guiSetAlpha (rule, 1) grid = guiCreateGridList(9, 64, 781, 164, false, rule) guiGridListSetSelectionMode(grid, 1) guiGridListSetSortingEnabled(grid, false) colum = guiGridListAddColumn(grid, "Question", 0.9) for index, val in pairs(griditem) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid, row, colum, val[1], false, false) end guiSetVisible( rule, false ) memo = guiCreateMemo(3, 238, 700, 350, "Select a Question above to learn about the game.", false, rule) guiMemoSetReadOnly(memo, true) ask = guiCreateButton(713, 238, 78, 89, "Ask a question that isn't answered here", false, rule) close = guiCreateButton(713, 532, 78, 55, "Close", false, rule) search = guiCreateEdit(10, 24, 780, 35, "", false, rule) --combo = guiCreateComboBox(597, 100, 171, 29, "", false, rule) --for i, k in pairs ( rulesToFile ) do --guiComboBoxAddItem ( combo, i ) --end guiMemoSetReadOnly (memo, true) addEventHandler("onClientGUIClick", grid, clickedGridlist, false) addEventHandler("onClientGUIClick", close, function () guiSetVisible(rule, false) showCursor(false) end, false) addEventHandler("onClientGUIClick", ask, showSupports, false) end ) function searchFor() local text = guiGetText(search) local sItems = { } for i, v in pairs(griditem) do if not (text == "" ) then if (string.find(string.upper(v[1]), string.upper(text), 1, true)) then table.insert(sItems, v[1]) end else table.insert(sItems, v[1]) end end guiGridListClear(grid) for i, v in pairs(sItems) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid, row, colum, tostring(v), false, false) end end addEventHandler("onClientGUIChanged", search,searchFor,false)
  2. But how could we help you if you didn't post the dxDrawRectangle to fix the bug to become able to appears, I think is it your main problem?
  3. Where's the DirectxDrawRectangle part ?
  4. KariiiM

    idk how to fix

    Yes, now I understand your problem, you can do it like that, local points = tonumber(getElementData(player, "points")) function() for i=1,5 do if ( points == tostring (i) ) then --your code end end end
  5. KariiiM

    idk how to fix

    But why, What do you want to achive?
  6. KariiiM

    idk how to fix

    Explain more better and post a full code, As I see You want to check if the points are less than 5, so It should be like that local points = getElementData(player, "points") if (tonumber(points) < 5) then --your code end
  7. As I see the function dbQuery returns false because you used it as dbExec, and the usage of dbQuery is for returns the result while dbExec does not,so in this case as solidsnake said you've to use dbExec to insert or update the queries.
  8. Anyway, Speaks about the situation of the code, what's wrong with it?
  9. What's that? It's not a full code also where's the variable of getACC ? and from where you got the parametre plr? Dude I suggest you to start learning , you know just editing done codes! don't be afraid from trying..
  10. Try that, local vehicle = {} addEventHandler("onVehicleExplode",resourceRoot,function () if ( isElement( vehicle[source] ) ) then setTimer (function() destroyElement ( vehicle [source] ) vehicle [source] = nil end, 5000, 1, source) end end)
  11. I don't think this way is possible because, I tested that it shows all the markers name on the table not one of them in this case you don't have to use loop, just create markers and for each marker set dimension..etc to be able to control them aswell.
  12. Try something like that local markers = { {345.52288818359, 165.7333984375, 1014.1875,"Marker1"}, {347.45263671875, 167.09187316895, 1007.3828125,"Marker2"}, {349.38757324219, 167.09187316895, 1007.3828125,"Marker3"}, {349.40020751953, 167.09187316895, 1007.3828125,"Marker4"}, {347.81915283203, 167.09187316895, 1007.3828125,"Marker5"}, {345.10681152344, 167.09187316895, 1007.3828125,"Marker6"}, {349.04412841797, 167.09187316895, 1007.3828125,"Marker7"} } addEventHandler("onResourceStart",resourceRoot, function () for index, val in ipairs(markers) do local marker = createMarker(val[1], val[2], val[3]-1, "cylinder", 1.5, 255, 255, 0, 150) setElementInterior(marker, 3) setElementDimension(marker, 200) addEventHandler("onMarkerHit",marker,onMarkerHit) end end) function onMarkerHit(hitPlayer, dim) if not dim then return end if getElementType ( hitPlayer ) == 'player' then for index, val in ipairs(markers) do outputChatBox("You are in the".. tostring(val[4]) .." !",hitPlayer,255,0,0) end end end
  13. You can define them inside the table like that local markers = { {345.52288818359, 165.7333984375, 1014.1875,"Marker1"}, {347.45263671875, 167.09187316895, 1007.3828125,"Marker2"}, {349.38757324219, 167.09187316895, 1007.3828125,"Marker3"}, {349.40020751953, 167.09187316895, 1007.3828125,"Marker4"}, {347.81915283203, 167.09187316895, 1007.3828125,"Marker5"}, {345.10681152344, 167.09187316895, 1007.3828125,"Marker6"}, {349.04412841797, 167.09187316895, 1007.3828125,"Marker7"} }
  14. Hello there, Your code is totally messy, No need to repeat the function "createMarker" all the time, loop is making all datas inside a table in one function and in short way I made this part for you , to learn from it local markers = { {345.52288818359, 165.7333984375, 1014.1875}, {347.45263671875, 167.09187316895, 1007.3828125}, {349.38757324219, 167.09187316895, 1007.3828125}, {349.40020751953, 167.09187316895, 1007.3828125}, {347.81915283203, 167.09187316895, 1007.3828125}, {345.10681152344, 167.09187316895, 1007.3828125}, {349.04412841797, 167.09187316895, 1007.3828125} } addEventHandler("onResourceStart",resourceRoot, function () for index, val in ipairs(markers) do local marker = createMarker(val[1], val[2], val[3]-1, "cylinder", 1.5, 255, 255, 0, 150) setElementInterior(marker, 3) setElementDimension(marker, 200) end end)
  15. KariiiM

    SeaSparrow

    Other planes like hunter/hydra, Are they makes damages on players? If no, So maybe you canceled the damages on the whole players in a script or something like that..
  16. KariiiM

    SeaSparrow

    Sea sparrow no need scripts to shoots, it shoot automaticly with damage ofcourse.
  17. You need a design plus using directX functions and scripting it about skin image, you need skins pictures number them in order for each skin picture you have
  18. It's not bugged, your code is not fine, why you doing trigger and createObject function is shared that mean it may be in client side too ?
  19. Get your internet IP, go to google and type what's my ip then it will be your server ip
  20. Oh, on the IP place add 192.168.1.3 in other ports you didn't complet them
  21. Where 22126 and 22003? UDP = 22126 TCP = 22005 UDP = 22003 wamp server won't do anything to your virtual server , you have 3 ports each port with feature, UDP let player join the server, TCP for download and UDP for browse Note: do /openports in console to check if the ports are openned or not ~Good luck, Regards,KariM
×
×
  • Create New...