• Content count

  • Joined

  • Last visited

  • Days Won


pa3ck last won the day on July 10

pa3ck had the most liked content!

Community Reputation

194 Celebrity

About pa3ck

  • Rank
  • Birthday 01/01/17


  • Occupation
    Software Developer

Recent Profile Visitors

1,807 profile views
  1. Screenshot problem

    That's right, it only goes as far as fase 1, the reason is, triggerServerEvent requires an element (player or root). Try this: triggerServerEvent('fotofalla', localPlayer, x, y) BTW: variable "secondi" is already the timestamp, you don't really need to get the getRealTime().timestamp, since it's already there.
  2. table.concat with a boolean value inside a table

    I don't think it will be as simple as using table.concat.. You'd probably need to implement your own way of string, boolean and number concatenation eg. looping thru the data. local tablaPrueba = { {"object1","valor1","valor1","valor1"}, {"object2","valor2","valor2","valor2"}, {"object3","valor3","valor3","valor3"}, {"object4","valor4","valor4","valor4"}, {"object5","valor5","valor5","valor5"}, {"object6","valor6","valor6","valor6"}, {"object7","valor7","valor7",true}, } local myStr for k, v in ipairs(tablaPrueba) do local myStr = "{" for x, y in ipairs(v) do if type(y) == "string" then myStr = myStr .. '"'..y..'", ' elseif type(y) == "number" then myStr = myStr .. y..', ' elseif type(y) == "boolean" then myStr = myStr .. tostring(y) .. ", " end end myStr = myStr:sub(1, -3) .. "}," outputChatBox(myStr) end But using toJSON and fromJSON would be your best option.
  3. I never actually used this function, always wondered how it worked, maybe it's something you can use?
  4. How to make the progress for interpolateBetween

    I would use the easing type SineCurve, this way probably: | ---------------- | ----------------- | your line 0,,,,,,,,,,,,,,,,,,150px,,,,,,,,,,,,,,,,,,300px the arrow pointer 0,,,,,,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,0 color progress Red - > Green -> Red Red < - Green < - Red In theory if you start the interpolation from Red to Green (with half the duration of the interpolation of the arrow pointer) with SineCurve, it should automatically start reversing back to 0 (Red) from 1 (Green). Then it should start over. Also, the little arrow pointer should have an interpolation for itself, you can get the progress by using the variable you set up as the progress parameter and when you click, you'd check if the progress is between 0.4 and 0.6, confirming that the pointer is in the green zone. So let's say if the arrow pointer takes 5 seconds to reach the end, you'd have the color interpolation set to 2.5 half second with SineCurve going from 255, 0, 0 (red) to 0, 255, 0 (green) and it should reverse from 0, 255, 0 (green) to 255, 0, 0 (red) by itself. You can use the same SineCurve for the arrow, from 0px to 300px (or w/e size you bar is) then it should reverse from 300px to 0px by itself.
  5. destroyElement..

    You're welcome.
  6. destroyElement..

    You're using the events onResourceStart and onResourceStop with "source" --> source is never going to be a player, it will always be the resource. What you should do is, when a resource starts, use a for loop to loop through every player.
  7. destroyElement..

    Can you show us how you set the elementData, because if the isElement() doesn't fail, that means there's an element but not necessarily a vehicle.
  8. destroyElement..

    When checking if the element exists, try to use if isElement(vehicle) instead of just if vehicle.
  9. dxDrawImageSection

    Hi, you can search for similar problems other people faced using the search option. Look at for example this one:
  10. Saving a character system to MySQL

    Data normalization is all about one thing, no duplicate data allowed. If you don't have duplicates and the tables are indexed properly, you're not querying useless information thus saving time and resources. "SELECT * FROM characters WHERE account_id = 2" -> returns all characters created by account number 2. You can also use join if you want to get data from both tables: "SELECT * FROM characters INNER JOIN accounts ON characters.accountID = accounts.accountID WHERE accounts.accountID = 2"
  11. Saving a character system to MySQL

    2 tables, account and character. Use primary key in account table that will reference the account a character is created from. Look at the term "1 to many relationship" to better understand. Account table should look something like this: accountID, username, password Character: characterID, accountID, health, skin, whatever Vehicles: vehicleID, characterID, model etc. That's the best way, this way your data is normalized.
  12. Pickup disappear in interior

    How far do you go? Do you go far enough to stream out the pickup?
  13. Player push vehicle

    I don't think this event causes that issue, I mean why would onClientVehicleCollision interfere with other, onClientPedDamage or w/e events? Also you're checking if source ~= collider, that just doesn't make sense since before that you already checked if collider is a player, so how would a player ever be a vehicle?
  14. CEGUI and 'looknfeel' property

    I see there's a 'LookNFeel' property for the CEGUI (from the wiki link) so I googled what it is actually and I found out that the design of the GUI elements can be changed with an XML file, although I'm not sure if this is possible in MTA, since I know there's an image file in the client which has all the GUI elements in one big image. Is it something that could/would be implemented in the future or is it available already? This would be such a huge improvement, we wouldn't need to use DX functions.. Source:
  15. Serversided UI/GUI Theme

    I wouldn't use CEF for everything, it's all right for panels like login/registration, rules / help window etc.. but not for something that would actually get updated in onClientRender like hud elements etc..