Sasu

Members
  • Content count

    1,127
  • Joined

  • Last visited

Community Reputation

2 Neutral

About Sasu

  • Rank
    Banger
  • Birthday 05/10/98

Details

  • Location
    Buenos Aires - Argentina

Recent Profile Visitors

920 profile views
  1. Hi! One friend needs help with a problem. When he tries to connect to a server, he is instantly disconnected. I hope you can help him. Thanks in advance. https://pastebin.mtasa.com/764020281
  2. Remaining Time

    I had already tested, and added some features. function onResourceStart () executeSQLQuery("CREATE TABLE IF NOT EXISTS vip (account TEXT, hours INT)") end addEventHandler("onResourceStart", resourceRoot, onResourceStart) function isPlayerVIP (player) local account = getAccountName(getPlayerAccount(player)) local query = executeSQLQuery("SELECT * FROM vip WHERE account=?", account) if (query) and (#query > 0) then return true else return false end end function getPlayerVIPHours (player) if (isPlayerVIP(player)) then local account = getAccountName(getPlayerAccount(player)) local query = executeSQLQuery("SELECT hours FROM vip WHERE account=?", account) local hours = (tonumber (query[1].hours) - getRealTime ().timestamp)/3600 return hours end end function myHours (player) if (not isPlayerVIP(player)) then return exports.chgnote:createNote("You are not VIP", player, 255, 0, 0) end local hours, minutes, seconds = hoursToTime(getPlayerVIPHours(player)) exports.chgnote:createNote("You have "..string.format("%02d hours %02d minutes %02d seconds", hours, minutes, seconds).." VIP Hours", player, 0, 255, 0) end addCommandHandler("viphours", myHours) function addVIP (player, cmd, newVIP, hours) local target = getPlayerFromNick ( newVIP ) local adderName = getPlayerName(player) local targetN = getPlayerName( target ) if (not isElement(target)) then return exports.chgnote:createNote("There is no player with that name !", player, 255, 0, 0) end if (not hours) then return exports.chgnote:createNote("Please insert a valid hours !", player, 255, 0, 0) end hours = tonumber(hours) if ( not isPlayerVIP(target)) then if cmd == "addvip" then if targetN then if hours then local time = getRealTime() local timestamp = time.timestamp local vHours = timestamp+hours*3600 outputChatBox(adderName.." gave "..targetN.." "..hours.." VIP Hours !", root, 0, 255, 0) local acc = getAccountName(getPlayerAccount(target)) executeSQLQuery("INSERT INTO vip(account,hours) VALUES(?,?)", acc, vHours) setElementData(target, "VIP", "Yes") end end end end end addCommandHandler("addvip", addVIP) --Return hours, minutes, seconds function hoursToTime(hours) if hours and type(hours) == "number" then local minutes = hours*60 hours = 0 while minutes >= 60 do minutes = minutes - 60 hours = hours + 1 end local seconds = math.floor((minutes - math.floor(minutes)) * 60) return hours, minutes, seconds end end
  3. Remaining Time

    Did you check if the column 'hours' was succesfully created? Use an application to see the table. Also in my script you can try to use outputChatBox to see what the variable 'hours' return.
  4. Remaining Time

    Did my method work?
  5. Remaining Time

    function round(num, numDecimalPlaces) local mult = 10^(numDecimalPlaces or 0) return math.floor(num * mult + 0.5) / mult end function getPlayerVIPHours (player) if (isPlayerVIP(player)) then local account = getAccountName(getPlayerAccount(player)) local query = executeSQLQuery("SELECT hours FROM vip WHERE account=?", account) local hours = round((tonumber (query[1].hours) - getRealTime ().timestamp)/3600, 2) return hours end end
  6. CJ Clothes > Objects?

    I know it is SA:MP but that's not change the fact that it use GTA so if it possible there, in MTA could be too, of course it could have been added here or not. That's why I'm asking here. I have already searched but I didn't find them. Maybe because they're not objects as well but I thought that there may be another way to work.
  7. CJ Clothes > Objects?

    Hi everyone! I'm wondering if there is some way to use CJ Clothes as objects so I can use it on other skins by attaching them. Like this part of the video: Thanks in advance!
  8. Okey, I will tell them to do that. Thank you.
  9. Hi! Two players said that they're having their mta crashed after some time playing in a specific server. They reported to me that this is happening after the last update of the server. Can you told me why this could be happening? I told them to run MTADiag and give me their dump files so you could help. Player 1: MTADiag: https://pastebin.mtasa.com/600612093 Dump files: https://mega.nz/#!bNkmlJ6R!-gKE_XA-vuzLz-B2cgKZqOFJ6VTqCnudcsikTf5PhMI Player 2: MTADiag: https://pastebin.mtasa.com/452861848 Dump files: https://mega.nz/#!9LBEkCjZ!10uPD7vHo-STvdYV5YVblDz4GmsJ6i07DtXD_SQB2j0 Thanks in advance.
  10. [REL] Music search engine

    Thank you, I have just edited!
  11. [REL] Music search engine

    MUSIC SEARCH ENGINE (Provided by Youtube, Soundcloud and vmuzice.com) Hey everyone! I have decided to release this script that I made it some time ago. There's no much to say, it's a simple tool to search music. I don't have an updated video of this resource but I can say it is an improved version of this https://www.youtube.com/watch?v=q35h7dtYRrE (Which it is mine). 1. First thing first: In the v2, you have three sources from where you get songs, but two of them you need to have an api key: Youtube and Soundcloud. Tutorial I have made for Youtube API: https://youtu.be/2AeCaihFGuU Soundcloud: Ask for it http://soundcloud.com/you/apps/new (See more https://developers.soundcloud.com/) For vmuzice.com, there is no requirements (but see if it is avaiable in the server's area) 2. Second thing: ADD THE RESOURCE TO THE ACL RPC (Needed for fetchRemote to get results from youtube, soundcloud, etc)3. Third thing: You can open the GUI in game using /youtube and '/youtube stop' to stop listening. Download link: https://community.mtasa.com/index.php?p=resources&s=details&id=14330 Any question will be answered as soon as I can.
  12. webBrowser y onClientPreRender

    createBrowser solo devuelve la imagen del explorador, un elemento con el que no puedes interactuar. Para ello, debes implementar las funciones de cursor. Fijate en el ejemplo de la funcion injectBrowserMouseDown.
  13. Packet loss

    We have exactly the same problem. With Linux there is more packetloss, its like an interrupt or something that causes MTA Server to use 1 core at 100% fully for a brief period. MTA Server prefers windows for some reason.
  14. ┬┐Animaci├│n en movimiento?

    Pon en el outputChatBox tostring(player) para saber que devuelve. Deberia de funcionar, has chequeado que en el meta este especificado que el script es tipo server?
  15. onClientPlayerStealthKill (Ayuda)

    addCommandHandler addEventHandler removeEventHandler "onClientPlayerDamage" -- + una variable boolean(false/true) para saber si esta activado o no