Jump to content

pa3ck

Members
  • Posts

    1,141
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by pa3ck

  1. - Store the timers in a table ( -> vehicle element as the index ) - When a player enters a vehicle, check if a timer is attached to the vehicle - If attached, stop the timer
  2. pa3ck

    get Max value

    local greatest = 0 for _, cuentas in ipairs (getAccounts()) do local accountData = getAccountData ( cuentas , "Value" ) if tonumber(accountData) and tonumber(accountData) > greatest then greatest = tonumber(accountData) end end outputChatBox ( "The best Value is "..greatest ) Something like that
  3. Are you sure id is a number value that comes through with the trigger?
  4. Here's a function from wiki: function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing ( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end You are trying to compare a number with nil, but because cx and cy should be fine and I can't see SX and SY defined anywhere, I think that's your problem. In the code from wiki, sx and sy are from the guiGetScreenSize(), make sure you have this line somewhere in your code: local SX, SY = guiGetScreenSize ( )
  5. function findNextTeleportID() for index, val in ipairs (data) do local finalnum = 0 -- creates a finalnum variable each time the loop runs and sets it to 0 finalnum + 1 end return finalnum + 1 end This part is wrong and its not even needed. You can just get the length ( or the size if you like ) the table and add +1, like: local nextIndex = #data + 1
  6. You are missing the "," after each table. You have this: ["CZ 550 Mag"] = { {"CZ 550",34}, }, } But it should be this: ["CZ 550 Mag"] = { {"CZ 550",34}, }, },
  7. pa3ck

    Sqlite dbPoll

    This is a simple MySQL query that checks if something is in the table. If it found what you were looking for it is going to return true ( so you can execute your code ) but if it didn't find anything it will return false ( your code is not going to execute ).
  8. pa3ck

    Unicode

    viewtopic.php?f=91&t=92246
  9. pa3ck

    gang system

    Store the gang members in sql so even if they are offline their details will be available in the database.
  10. Solved. This line did the trick: dbExec ( connectionHandler, "SET NAMES 'utf8'" )
  11. Hey. I have been working with MySQL for a long time now but I never seen this problem before. My charset is set to utf-8 but special characters like "űáúó" etc shows up in square and chinese character formats. I tried to set the collation to latin as well, but it didn't work.
  12. pa3ck

    [GUI]GridList

    guiGridListGetRowCount returns the number of rows, not the number of a specific row. If you want it to be like 1, 2, 3 etc why don't you use the table index?
  13. engineApplyShaderToWorldTexture ( element shader, string textureName [, element targetElement = nil, bool appendLayers = true ] ) You forgot about the texture file.
  14. You should update the girdlist when a player joins or leaves, no in an infinite timer.
  15. Vehicles created client-side are useless. You cant enter them, change colour etc. You must create them server-side in order to use them.
  16. 1. What part did you not understand? * GUI: Create a timer and a variable which is equal to the timers length in seconds. Decrease that number by one inside the function and use a simple guiSetText to update the time * DX: create a variable with 30 and decrease this number inside a timer and when the timer ends remove the event handler or use getTickCount 2. Post your code and maybe we can help you with that.
  17. Q1. Use setTimer with a decreasing number or just get the remaining time of the timer and display that on the screen Q2. Create the ped client side so only the client can see it Q3. Was the "hurry up" mark really needed?
  18. Try to spawn the player?
  19. Yes, they do load. "/" "\" are the same thing in the meta.xml. I'm sure he has a reason not the put that variable inside the script. ie. he is going to compile the resource and make it public, but he wants to make it dynamic so that you can change the rate of something in the meta, which is not compiled and can be edited.
  20. Just for future reference, PLEASE read the debug before asking for help. It says in plain english that you triggered an event called "testa" ( yes, an extra A in the end ) but it was not added client-side, it was a typo.
  21. Isn`t it because the server-side is being loaded before the client-side?
  22. Your code is not going to work. * You just used an empty string in guiSetText, never actually used the variable from server-side. * The variable client is never defined. * You must define the variable that is being sent over in the brackets -- CLIENT addEvent("test", true) addEventHandler("test",getRootElement(),function( myText ) -- make sure you define the variable from server-side up here in the brackets local label = guiCreateLabel ( 0, 0, 1, 1, "", true ) guiSetText(label, myText ) -- just use the variable as if it was created here, client-side end) -- SERVER local text = "bla bla bla" triggerClientEvent ( root, "test", root, text) -- make sure you include the variable in the triggerClientEvent
  23. function vip() triggerServerEvent ( "ClientHaveLevel", getLocalPlayer() ) end addCommandHandler ("vip", vip) function armavip () showCursor (true) triggerServerEvent ( "onGreeting", getLocalPlayer() ) end --Fegyók function equipvip () showCursor (true) triggerServerEvent ( "Fegyverek", getLocalPlayer() ) end function equipvipmedic () showCursor (true) triggerServerEvent ( "Medic", getLocalPlayer() ) end function equipvipkaja () showCursor (true) triggerServerEvent ( "Kaja", getLocalPlayer() ) end function equipviptoolbelt () showCursor (true) triggerServerEvent ( "toolbelt", getLocalPlayer() ) end function Coyote () showCursor (true) triggerServerEvent ( "CoyoteBackp", getLocalPlayer() ) end function equipviplegendary () showCursor (true) triggerServerEvent ( "Legendary", getLocalPlayer() ) end function equipvipacu () showCursor (true) triggerServerEvent ( "Survival_ACU", getLocalPlayer() ) end function vipveh () showCursor (true) triggerServerEvent ( "kocsiafaxfejeknek", getLocalPlayer() ) end function slotvip () showCursor (true) triggerServerEvent ( "onGreeting3", getLocalPlayer() ) end local openTick function vip2() if openTick and openTick + 300000 > getTickCount() then return elseif not openTick then openTick = getTickCount() end painel = guiCreateWindow(189, 81, 1106, 655, "V.I.P Panel!", false) guiWindowSetSizable(painel, false) showCursor ( true ) guiSetAlpha(painel, 0.65) guiSetProperty(painel, "CaptionColour", "FF6AE419") equip = guiCreateButton(40, 72, 212, 29, "Weapon kit", false, painel) fegyokep = guiCreateStaticImage(129, 26, 36, 36, "kepek/stuki.png", false, painel) close = guiCreateButton(906, 47, 214, 37, "Close", false, painel) kocsikep = guiCreateStaticImage(439, 398, 36, 36, "kepek/tire.png", false, painel) kocsikgomb = guiCreateButton(353, 444, 212, 29, "Vehicle kit", false, painel) survivalacgomb = guiCreateButton(353, 321, 212, 29, "Survival ACU", false, painel) suvivalackep = guiCreateStaticImage(439, 275, 36, 36, "kepek/survivalacu.png", false, painel) kocsigombok = guiCreateButton(796, 384, 130, 60, "Vehicles(Coming soon)", false, painel) legendarygomb = guiCreateButton(353, 189, 212, 29, "Legendary Backpack(Coming soon)", false, painel) legendarykep = guiCreateStaticImage(439, 143, 36, 36, "kepek/gunbag.png", false, painel) coyote = guiCreateButton(353, 72, 212, 29, "Coyote Backpack", false, painel) coyotekep = guiCreateStaticImage(439, 26, 36, 36, "kepek/Item_Backpack_Coyote.png", false, painel) toolbeltgomb = guiCreateButton(40, 444, 212, 29, "Toolbelt items", false, painel) toolbeltkep = guiCreateStaticImage(129, 398, 36, 36, "kepek/toolbelt.png", false, painel) kajakep = guiCreateStaticImage(129, 275, 36, 36, "kepek/can.png", false, painel) kajagomb = guiCreateButton(40, 321, 212, 29, "Food&Drink pack", false, painel) medickep = guiCreateStaticImage(129, 143, 36, 36, "kepek/medic.png", false, painel) medicgomb = guiCreateButton(40, 189, 212, 29, "Medic kit", false, painel) memo = guiCreateMemo(697, 99, 319, 100, "Köszönjük, hogy megvásároltad a VIP Csomagot. ..Jó szórakozást a tételekkel... !", false, painel) guiMemoSetReadOnly(memo, true) addEvent( "showvip",true ) addEventHandler ( "onClientGUIClick", arma, armavip, false ) addEventHandler ( "onClientGUIClick", equip, equipvip, false ) addEventHandler ( "onClientGUIClick", slot, slotvip, false ) addEventHandler ( "onClientGUIClick", survivalacgomb, equipvipacu, false ) addEventHandler ( "onClientGUIClick", kocsikgomb, vipveh, false ) addEventHandler ( "onClientGUIClick", legendarygomb, equipviplegendary, false ) addEventHandler ( "onClientGUIClick", coyote, Coyote, false ) addEventHandler ( "onClientGUIClick", toolbeltgomb, equipviptoolbelt, false ) addEventHandler ( "onClientGUIClick", kajagomb, equipvipkaja, false ) addEventHandler ( "onClientGUIClick", medicgomb, equipvipmedic, false ) addEventHandler ( "onClientGUIClick", close, function() guiSetVisible(painel, false) showCursor(false) end, false ) end addEvent( "ShowVipPanel", true ) addEventHandler( "ShowVipPanel", getRootElement(), vip2)
  24. Now, thats a different story. You might as well want to add a tag like [ PAID REQUEST ] or something like that so people will know. Also, if I was you I would merge my posts, js. Anyways, good like!
×
×
  • Create New...