Jump to content

dugasz1

Members
  • Posts

    285
  • Joined

  • Last visited

Everything posted by dugasz1

  1. Thank you:) Can you write me an example what is set id to primary and AI?
  2. Hello! how can i make a column to auto incret like in mysql?
  3. Yeah when client trigger "onPlayerChangeLoot" its working.
  4. Hi! Server: function onPlayerChangeLoot(loot) local players = getElementsWithinColShape(loot, "player") for theKey, player in ipairs(players) do triggerClientEvent(player, "refreshLootManual", player, loot) end end addEvent("onPlayerChangeLoot", true) addEventHandler("onPlayerChangeLoot", getRootElement(), onPlayerChangeLoot) function playerDropAItem(itemName) local x, y, z = getElementPosition(source) local item, itemString = getItemTablePosition(itemName) local itemPickup = createItemPickup(item, x + math.random(-1.25, 1.25), y + math.random(-1.25, 1.25), z, itemString) end addEvent("playerDropAItem", true) -- Here aded to server addEventHandler("playerDropAItem", getRootElement(), playerDropAItem) Client: if loot then setElementData(loot, itemName, (getElementData(loot, itemName) or 0) + 1) do local players = getElementsWithinColShape(loot, "player") if #players > 1 then triggerServerEvent("onPlayerChangeLoot", getRootElement(), loot) end end if not getElementData(loot, "itemloot") and getElementType(getElementData(loot, "parent")) == "vehicle" then end else triggerServerEvent("playerDropAItem", getRootElement(), itemName) end And it's write me : triggered server side event playerDropAItem, but it not added serverside. And the onPlayerChangeLoot is working. Any idea?
  5. Thank you:) and need to be delay betwen hits and working
  6. Hi! I set my Ped in fire whit: setPedControlState ( thePed, "fire", true ) He hit once and end. How can i loop it? (He hasn't got weapont only his fist, whit weapont its working)
  7. dugasz1

    onPedWasted

    Thanks its working
  8. dugasz1

    onPedWasted

    Hello! function died() outputConsole("A ped die!") end addEventHandler("onPedWasted", getRootElement(), died) I wannt a function what si start at when a ped die. On the wiki its whit one ped(2th arg is the ped) but i want it whit all the peds. How its possible? (Client side event doesnt good)
  9. -.- Im very blind thx (Im 186cm not little:D)
  10. skins = {"101","102","104","106","109",} function createShop() ablak = guiCreateWindow(565, 335, 408, 415, "", false) guiWindowSetSizable(ablak, false) grid = guiCreateGridList(23, 40, 196, 317, false, ablak) column = guiGridListAddColumn( grid, "Skinek", 0.85 ) for _, v in pairs( skins ) do local gunRow = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, gunRow, column, v, false, false ) end guiGridListSetSelectedItem ( grid, 0, 1) skinImg = guiCreateStaticImage(257, 124, 120, 160, "images/101.png", false, ablak) load = guiCreateButton(25, 385, 194, 20, "Megnézem", false, ablak) addEventHandler ( "onClientGUIClick", load, loadImg, false) close = guiCreateButton(379, 23, 19, 17, "X", false, ablak) addEventHandler ( "onClientGUIClick", close, function() destroyElement(ablak) showCursor(false) isAblakOpen = false end, false) megvesz = guiCreateButton(233, 385, 165, 20, "Megveszem", false, ablak) guiSetProperty(megvesz, "NormalTextColour", "FF11FE00") infoLbl = guiCreateLabel(232, 43, 166, 71, "Minden skin ára: 250 zp!\n\nEgy skin megvétele után\nakármikor felveheted itt!", false, ablak) guiSetFont(infoLbl, "default-bold-small") guiLabelSetColor(infoLbl, 252, 2, 2) end function loadImg() local r, _ = guiGridListGetSelectedItem(grid) local theSkin = guiGridListGetItemText(grid, r, 1) guiStaticImageLoadImage ( load, "images/101.png" ) end This is the error: http://kepfeltoltes.hu/130816/gta_sa_2013-08-16_15-02-29-84_www.kepfeltoltes.hu_.jpg I dont know why cant load it:/
  11. I dont found any usefull:/
  12. dugasz1

    Question/Tip

    But you said SQLLite is faster
  13. I saw it but no reply for this. That means is it inpossible?
  14. Hi! Can somebody send me some functions events to i can start make a script what is replace car engine sounds? (I try to found it but i cant. I use sounds form gtainside http://www.gtainside.com/en/download.php?do=cat&id=437)
  15. dugasz1

    Question/Tip

    Thanks all the answers One more: Am i think correct whit this: http://www.php.net/manual/en/sqlite.installation.php i can make querys whit php in my sqlLite database?
  16. dugasz1

    Question/Tip

    Hello! Question1: I just wanan ask us. Whats the better if a wanna save many data (like for a RP server) use mySQL or SQLlite? What is the better, faster? Question2: And its a good way to controll datas when players are playing to setElementData(onPlayerJoin from sql set it him, onPlayerQuit it get from player and save to sql)? Its made lagg or dont? (Just the very important what the system will use offen.)
  17. dugasz1

    Table

    I'm sorry it, then i will made it by SQLlite. Thank you
  18. dugasz1

    Table

    bazisok = { { tulaj="dugasz1", pw="asd", model=5020, meret=1.5, zartX=310.5, zartY=-1554.69995, zartZ=32.28, zartRotX=0, zartRotY=0, zartRotZ=232, nyitX=310.5, nyitY=-1554.69995, nyitZ=37.28, nyitRotX=0, nyitRotY=0, nyitRotZ=232 }, { tulaj="dugasz1", pw="asd", model=5020, meret=1.5, zartX=364.89941, zartY=-1469.59961, zartZ=32.26, zartRotX=0, zartRotY=0, zartRotZ=308, nyitX=364.89941, nyitY=-1469.59961, nyitZ=37.26, nyitRotX=0, nyitRotY=0, nyitRotZ=308 }, } function onResourceStart ( ) bazisok[2]['pw'] = "test" outputDebugString(bazisok[2]['pw']) end addEventHandler ( "onResourceStart", getRootElement(), onResourceStart ) Hello i wanna rewrite the pw in the table but how can i do it? it's working but dont save real in the file just in the memory then if i reload the script it stay pw=asd
  19. local result = dbPoll(dbQuery(connect, "SELECT * FROM PlayerInfo WHERE Username = '"..Username.."';"),-1) I think its will working EDIT: What? Your post gone?
  20. It's working thank you ! Köszi:D
  21. Now the same error jist ..not use near 'zix" now write the player's name : ...not use near XY
  22. local host = "xy" local felhnev = "xy" local pw = "xy" local database = "xy" local pontForInv = 30 local connect = dbConnect( "mysql", "dbname="..database..";host="..host, felhnev, pw, "share=1" ) function getZpont ( thePlayer ) local accountData = getPlayerAccount(thePlayer) local accName = getAccountName (accountData) if accName == "guest" then triggerClientEvent(thePlayer, "zPontRefresh", getRootElement(), 0) else local query = dbPoll(dbQuery(connect, "SELECT * FROM zshop WHERE accNev='"..accName.."' ;" ),-1) if not(query) then outputDebugString("Query hiba!") else for _,v in pairs(query) do zPontja = v['pont'] end if zPontja then triggerClientEvent(thePlayer, "zPontRefresh", getRootElement(), zPontja) zPontja = nil else triggerClientEvent(thePlayer, "zPontRefresh", getRootElement(), 0) zPontja = nil end end end end http://img15.imageshack.us/img15/6892/m4um.png (This is a DayZ server) I never seen error liek this yet Any idea?
×
×
  • Create New...