pa3ck
Members-
Posts
1,141 -
Joined
-
Last visited
-
Days Won
7
Everything posted by pa3ck
-
What is wrong with it? What has to be fixed?
-
Either post it to your language section or explain your problem in English.
-
But you can store stringified JSON if really needed.
-
Don't... create... a timer... Save the timestamp in SQL and when they join check if the timestamp expired. Look at the other topic created by Best Killer, I just told him how to do it. If it's expired update the player data in SQL if not kick the player.
-
You can compare the 2 timestamps just like you would compare 2 numbers. if bannedAt > getRealTime().timestamp then -- still banned end
-
tonumber(player) -- what do you expect? If you tonumber the username of the account, it's gonna give you the user id? When you are passing the variable "player", you are not sending a number but a username.
-
local player = guiGridListGetItemText(table.gridlist[1], guiGridListGetSelectedItem(table.gridlist[1]), 1); if player and getPlayerFromName(player) then -- so let's say you already got the "targetPlayer" in variable "player" setElementData(player, "lastChatMessage", { getPlayerName(localPlayer), "The New Message To Send" }) end -- then... local playerMessages = {} addEventHandler ( "onClientElementDataChange", getRootElement(), function ( dataName ) if getElementType ( source ) == "player" and dataName == "lastChatMessage" and source == localPlayer then local newValue = getElementData(localPlayer, "lastChatMessage") if not newValue then return end if playerMessages[newValue[1]] then table.insert(playerMessages[newValue[1]], newValue[2]) else playerMessages[newValue[1]] = { newValue[2] } end setElementData(localPlayer, "lastChatMessage", false) end end ) --[[ so this way the table should look like this: local playerMessages = { ["playerName1"] = { "Hello", "How's things?"}, ["playerName2"] = { "Hi", "Not so bad.."} } and you can just easily loop through the table to find a specific player's message by name ]]
-
It's not even maths man, it's logic... If 1*86400 = 1 day, if you multiply it by 30 isn't it a month? lol
-
addEventHandler("onPlayerLogout", root, saveWalkStyle) --> addEventHandler("onPlayerLogout", root, SaveWalkStyle)
-
Change the eventHandler to this: addEventHandler("onPlayerLogout", root, SaveWalkStyle)
-
You still don't understand what PPI is. Let's say I have a :~ty monitor which is 1600x900 with 20 PPI and my buddy got a 1600x900 with 40 PPI, the size of the monitor is still the same, he will see exactly the same thing as me. You probably think the PPI gives you the "real life unit" of the screen, but only the resolution matters. I can have a huge screen with 640*480... Look at this image ->
-
PPI has nothing to do with relative sizing, PPI or Pixel Per Inch is a completely different thing. Look at this image: Low PPI vs High PPI Assuming you can get the PPI with an MTA function (which I don't think is possible), what would you change on the screens with low PPI? Whatever you do, it will look bad.
-
When you fix something, please let others know how you fixed it, so when they do a search and find this topic, there will be a working solution.
-
When this "bug" happens, what's the value of clipammo? Do an outputChatBox on that and let us know.
-
Please don't bump your post, this is not a trading website, somebody will help you if / when they can. What do you exactly want? Explain it a bit better, that's probably the reason why nobody was able to help you so far.
-
local d = {} function testdr () if #d > 0 then dxDrawText(tostring(d.mystats.arrests), 524, 250, 720, 322, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end end addEvent ( "SAEGJobs:Modules->Panel:OnServerSendClientData", true ) addEventHandler ( "SAEGJobs:Modules->Panel:OnServerSendClientData", root, function ( data ) d = data addEventHandler("onClientPreRender", root,testdr) end )
-
You must include all files, including JS, CSS, HTML in your meta. Also, your resource is called test, why is it not this then: loadBrowserURL(browser, "http://mta/test/login.html")
-
href="http://mta/ts_core/web/font-awesome/css/font-awesome.css" Where's "/web/font-awesome/css/font-awesome.css" from the meta?
-
What does not get updated in MySQL? dbExec(connection,"UPDATE karakterek SET premiumpont = ? WHERE id = ?", player:getData("char:pp")-money, getElementData(player,"acc.AccountID")) If you are talking about the "premiumpont", you are just getting the "char:pp" but shouldn't you also subtract the price of the car? Like player:getData("char:pp") - 15000?
-
I don't think there's a native LUA or MTA function for that, but something like this should work local a = { "apple", "pear", "orange", "pineapple", "tomato" } local b = { "kiwi", "strawberry", "melon", "apple", "tomato" } function checkDuplicate(arr1, arr2) local duplicateEntries = {} for i = 1, #arr1 do local found = false for k = 1, #arr2 do if arr1[i] == arr2[k] then found = true end end if not found then table.insert(duplicateEntries, arr1[i]) end end return duplicateEntries end local doubleEntries = checkDuplicate( a, b ) local strEntries = table.concat(doubleEntries, ",") print(strEntries)
-
Stupid question, but are the weapon sounds disabled while using showsound?