Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/02/22 in all areas

  1. It might be a ppi issue. (I am not a shader expert) but let me speculate a bit. Afaik: When playing with border less settings and window mode, the same resolution is returned on https://wiki.multitheftauto.com/wiki/GuiGetScreenSize Not sure if you used that one to create your render target. This might put a difference between the resolution the shader is placing the texture on the screen and the resolution delivered by the texture. If this situation is matching yours, what if you do not scale the texture? But placing it with the exact size. Either by the texture size or by the pixels the shader is about to draw. Anyway, those artifacts are most of the time caused by some sort of scaling.
    2 points
  2. Because your skin is being set client side. Try using the setElementModel in the server side script. This should fix your problem.
    2 points
  3. As the title says, I made a new lighting system for the lampposts, this script is still in working and some lampposts may not have that reflection. About The default command to enable/disable the lighting system is /lighting. The default color for the lampposts is 255, 167, 0 at the moment The reflection has a smooth fade in/out effect Current script version: v1.2 Video First video: Download Link (MTA Community): https://community.multitheftauto.com/index.php?p=resources&s=details&id=18637 EDIT (02.10.2023) For newcomers, this resource is outdated and abandoned
    1 point
  4. Hey everyone! I made this script for an own project, but i don't have more time/mood to finish it. So i will sell this script in a couple days to a live server. I just wanted to show my lastest work to the community.
    1 point
  5. function phealth () -- onPlayerQuit event does not keep accounts local playerAccount = getPlayerAccount(source) if (playerAccount) then if(isGuestAccount(playerAccount)) then return end -- if guest account don't continue end local AccName = getAccountName(playerAccount) local playerhealth = getElementHealth(source) dbExec(db,"UPDATE stats SET Health=? WHERE Account=?",playerhealth, AccName) end addEventHandler("onPlayerQuit", root, phealth) --there is a typo here
    1 point
  6. To put it bluntly , we have a very good staff, so we have every reason to be optimistic.Individually, we are one drop. Together, we are an ocean. Our goal was just to make a fun and enjoyable server and i think we did it. We are striving to make a great community for everyone bec we made a server according to their wishes and tastes of players , so feel free to share the server with your friends. Details > We invite you to join our server and give us a Hello on our Discord channel, you can see the invite link below in details. Stay in follow for the next developments . We will inform you in Discord. Server IP: mtasa://91.134.254.24:22053 Discord: https://discord.gg/7vkX3beqZA Staff Jamor - Owner , Founder SN!PER - Founder Rom4no - Founder , Map Tester and Developer PinnuTV - Developer DANXTR - Clan Member Harry Potter - Clan Member Flexin - Clan Member Cydia - Clan Member awsm - Server Member vRed - Server Member Server Our server contains 6 game modes .These gamemodes are: 1- DeathMatch - with the following sub-arena 1. DeathMatch ( DM and HDM) 2. Old School (OS) 2- Shooter - with the following sub-arena 1. Shooter Fun (WSF) 2. Shooter Classic 3. Shooter Ak/Mid ( High Jump ) 3- Training - with the following sub-arena 1. Training: DM/OS 2. Training: Race 4- Race 5- Destruction Derby ( DD ) 6- Garage ( You can modify your car here. Below you will see a teaser of how garage ingame looks like ) Screenshots from the server
    1 point
  7. Can you try this, sorry for the messy codes, the forum is breaking it function moneyCmd(player, commandName, AccName, amount) --if(getElementType(player) ~= "player") then return end -- not need this --pacc = getPlayerAccount (player) -- You assign your own account to the accName variable --AccName = getAccountName (pacc) -- try remove this local targetAccount = getAccount(AccName) -- get account from AccName if not (targetAccount) then return outputChatBox("There is no such account in the database.", player) end --Check if there is an account named accName, if not, don't continue if isObjectInACLGroup ("user."..AccName, aclGetGroup ( "Moderator" ) ) then -- the shared logic local targetMoney local MoneyData = dbPoll(dbQuery(db,"SELECT Money FROM stats WHERE Account=? LIMIT 1",AccName), -1) if(MoneyData) then if(#MoneyData > 0) then for _,row in ipairs(MoneyData) do targetMoney = row["Money"] -- get player money amount from database break end end end if commandName == "givemoney" then amount = tonumber(amount) if tostring(AccName) and amount then targetMoney = targetMoney + amount -- addition with amount dbExec(db,"UPDATE stats SET Money=? WHERE Account=?", targetMoney,AccName) else outputChatBox("[usage] /givemoney [playername] [amount]", player) end else if commandName == "takemoney" then amount = tonumber(amount) if tostring(AccName) and amount then targetMoney = targetMoney - amount -- subtraction with amount dbExec(db,"UPDATE stats SET Money=? WHERE Account=?", targetMoney,AccName) else outputChatBox("[usage] /takemoney [playername] [amount]", player) end else outputChatBox("kolan ridi", player) end end else outputChatBox("You aren't able to use this command", player) end end addCommandHandler("givemoney", moneyCmd); addCommandHandler("takemoney", moneyCmd);
    1 point
  8. do you mean clculate that in dbexec parameter? @Derbo thank you bro @Burak5312 i fixed that before: but i want to change money of the offline players and now i working on that
    1 point
  9. I'm not sure but can you test this code the problem might be that you assign your own account to your AccName variable in the first place function moneyCmd(player, commandName, AccName, amount) --if(getElementType(player) ~= "player") then return end -- not need this --pacc = getPlayerAccount (player) -- You assign your own account to the accName variable --AccName = getAccountName (pacc) -- try remove this local targetAccount = getAccount(AccName) -- get account from AccName if not (targetAccount) then return outputChatBox("There is no such account in the database.", player) end --Check if there is an account named accName, if not, don't continue if isObjectInACLGroup ("user."..AccName, aclGetGroup ( "Moderator" ) ) then -- the shared logic if commandName == "givemoney" then amount = tonumber(amount) if tostring(AccName) and amount then local PMoney = givePlayerMoney(player, amount) dbExec(db,"UPDATE stats SET Money=? WHERE Account=?",PMoney,AccName) else outputChatBox("[usage] /givemoney [playername] [amount]", player) end else if commandName == "takemoney" then amount = tonumber(amount) if tostring(AccName) and amount then takePlayerMoney(player, amount) dbExec(db,"UPDATE stats SET Money=? WHERE Account=?",PMoney,AccName) else outputChatBox("[usage] /takemoney [playername] [amount]", player) end else outputChatBox("kolan ridi", player) end end else outputChatBox("You aren't able to use this command", player) end end addCommandHandler("givemoney", moneyCmd); addCommandHandler("takemoney", moneyCmd);
    1 point
  10. local playermoney = getPlayerMoney(player) Player in this case is the source that is executing it, so you. If you want to set it to a player with an account that is currently logged in you should do that with a loop. for k,v in pairs(getElementsByType("player")) do if getAccountName(v) == AccName then -- This can cause problems if more players are on the same account, giving all of them money givePlayerMoney(v, amount) end end
    1 point
  11. Você precisa modificar o seu código, adicionando por exemplo algum modo de detectar que o jogador dropou ou transferiu a arma, por exemplo. Então você deve chamar uma função (exports) ou acionar um evento (trigger) da bandoleira para remover a arma.
    1 point
  12. Create an event on the server side to change the player's skin addEvent("setPlayerSkin", true) addEventHandler("setPlayerSkin", root, function(ID) setElementModel(source, ID) end ) then call it with triggerServerEvent this can be inside the btnSeleccionar event You don't need to delete the setElementModel function on the client side for this, just trigger it on the server side after the player selects the final skin triggerServerEvent("setPlayerSkin", localPlayer, tablaSkinsHombre[currentTableID])
    1 point
  13. hi i have tested the animate function for you you can test the example i made here but i am not sure if this is what you want local test = playSound("music.wav", true) setSoundVolume(test, 1.0) local anims, builtins = {}, {"Linear", "InQuad", "OutQuad", "InOutQuad", "OutInQuad", "InElastic", "OutElastic", "InOutElastic", "OutInElastic", "InBack", "OutBack", "InOutBack", "OutInBack", "InBounce", "OutBounce", "InOutBounce", "OutInBounce", "SineCurve", "CosineCurve"} function table.find(t, v) for k, a in ipairs(t) do if a == v then return k end end return false end function animate(f, t, easing, duration, onChange, onEnd) assert(type(f) == "number", "Bad argument @ 'animate' [expected number at argument 1, got "..type(f).."]") assert(type(t) == "number", "Bad argument @ 'animate' [expected number at argument 2, got "..type(t).."]") assert(type(easing) == "string" or (type(easing) == "number" and (easing >= 1 or easing <= #builtins)), "Bad argument @ 'animate' [Invalid easing at argument 3]") assert(type(duration) == "number", "Bad argument @ 'animate' [expected number at argument 4, got "..type(duration).."]") assert(type(onChange) == "function", "Bad argument @ 'animate' [expected function at argument 5, got "..type(onChange).."]") table.insert(anims, {from = f, to = t, easing = table.find(builtins, easing) and easing or builtins[easing], duration = duration, start = getTickCount( ), onChange = onChange, onEnd = onEnd}) return #anims end function destroyAnimation(a) if anims[a] then table.remove(anims, a) end end addEventHandler("onClientRender", root, function( ) local now = getTickCount( ) for k,v in ipairs(anims) do v.onChange(interpolateBetween(v.from, 0, 0, v.to, 0, 0, (now - v.start) / v.duration, v.easing)) if now >= v.start+v.duration then if type(v.onEnd) == "function" then v.onEnd( ) end table.remove(anims, k) end end end) function fadeOutSound(sound, fadeTime) animate(1.0, 0, 1, fadeTime, function(volumeValue) setSoundVolume(sound, volumeValue) if(sound and getSoundVolume(sound) == 0) then stopSound(sound) end end) end addCommandHandler("fadesound", function() fadeOutSound(test, 3000) -- Completely mute in 3 seconds end)
    1 point
  14. يعطيك العافيه يا ابوسولو كفووو وينك مختفي اتمنه تقبل مروري تحياتي لمن دمر حياتي
    1 point
  15. يبغالك كل فترة عشان تخليه يلحقك ويطلق عليك بشكل صحيح تستعمل هذه الوظائف setPedAimTarget يخلي البيد يصوب على مكان معين getElementRotation تجيب إتجاه الاعب المطلوب setElementRotation تعدل إتجاه البيد setPedControlState تتحكم بالبيد من ناحية الطلق، تخليه يمشي أو يوقف Slothbot اشوف الأفضل انك تستعمل سكربت
    1 point
  16. طيب اطرح لنا الي سويته عشان نقدر نساعدك
    1 point
×
×
  • Create New...