Jump to content

Search the Community

Showing results for tags 'help'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. So, first of all greetings. These days, i was trying to make a script that would allow you to create custom blips and save them to a database. The creation and saving (in the DB) part went well, but i am having problems when trying to load them back into the game. Here's part of the code that handles that: function loadOneBlip( ) local result = mysql:query_fetch_assoc("SELECT x AS x1, y AS y1, z AS z1, icon AS icons, size AS sizes FROM `blip`") --loading the data from the DB if result then while true do local row = mysql:fetch_assoc(result) --make it so i can select the data from a string if not row then break end --if there is no result end the operation local blip = createBlip( row.x1 , row.y1 , row.z1 , row.icons , row.sizes, 255, 0, 0, 0, 0, visibleDistance) --creating the actual blip outputChatBox("loading one blip (#"..blips..")", thePlayer, 255,255,255) --count them ingame to see if it loads completely blips = blips + 1 end mysql:free_result(result) else outputDebugString("blip failed",1) --something went wrong end end addCommandHandler("loadblip",loadOneBlip,false,false) addEventHandler("onResourceStart",root, loadOneBlip) And for more thoughts, yes, the connection to the DB is running good. The script is made serverside. And i also think i did something very wrong here, that being in when i execute the command, neither the blip gets created nor the error message display.
  2. I added this: to the nametag script.. but with 1-2 player working fine, and with more players, always show the chaticon.. How to fix this?
  3. I've recently reinstalled MTA, and connected to a server my friend plays on. It has a whopping 2gb on resources, it's has :~ ton of mods in the form of cars, skins, maps and even music. After finishing the download and waiting about 3m for my computer to load the files (my PC is a beater), MTA just crashed and gave me the following log: Version = 1.5.5-release-11790.1.000 Time = Wed Dec 20 11:15:34 2017 Module = C:\Users\Alexandre\Downloads\GTA San Andreas\gta_sa.exe Code = 0xC0000005 Offset = 0x00137D6E EAX=00000000 EBX=48AF7ED0 ECX=000051BB EDX=000146EC ESI=62F92598 EDI=00000030 EBP=000146EC ESP=0022F3E4 EIP=00537D6E FLG=00210202 CS=001B DS=0023 SS=0023 ES=0023 FS=003B GS=0000 I tried a second time, and the same thing happened. A thing of note is that pressing ESC yielded no response, and if i ALT-TAB'd, even on Windowed, MTA would just plain out crash. I have a modded GTA3.img but i don't think that's relevant as my friend has the same IMG file as me and he can connect just fine. Here is my MTADiag log: https://pastebin.mtasa.com/288186558 Thanks for the help in advance, - throwawayaccount619
  4. Hello everyone I am trying to send a image from MTA Server to my site, however, the file is always empty... I would like to ask a help to solve this. Thanks. Server.lua (MTA) function result(result,error) outputChatBox(tostring(result)) end addEventHandler( "onPlayerScreenShot", root, function ( theResource, status, pixels, timestamp, tag ) outputChatBox("take") callRemote ( "http://domain.com/idk.php", result, pixels ) end ) function doTakeScreenShot() takePlayerScreenShot( getRandomPlayer(), 320, 200 ) end setTimer(doTakeScreenShot, 2000, 1) idk.php (Web) include( "mtaphpsdk_0.4/mta_sdk.php" ); $input = mta::getInput(); $myfile = fopen("newfile.jpeg", "w") or die("Unable to open file!"); fwrite($myfile, $input[0]); fclose($myfile); mta::doReturn(true); Result:
  5. Need to contact mta pubg server owner
  6. so hello so i tried adding days and weeks but all i got was error and i can't figure way how to make days from hours and then weeks from days code: exports.scoreboard:addScoreboardColumn('time') local t = { } function checkValues( source,arg1,arg2) if (arg2 >= 60) then t[ source ][ 'min' ] = tonumber( t[ source ][ 'min' ] or 0 ) + 1 t[ source ][ 'sec' ] = 0 end if (arg1 >= 60) then t[ source ][ 'min' ] = 0 t[ source ][ 'hour' ] = tonumber( t[ source ][ 'hour' ] or 0 ) + 1 end return arg1, arg2 end setTimer( function( ) for _, v in pairs( getElementsByType( "player" ) ) do if (not t[ v ]) then t[ v ] = { ["hour"] = 0, ["min"] = 0, ["sec"] = 0 } end t[ v ][ 'sec' ] = tonumber( t[ v ][ 'sec' ] or 0 ) + 1 local min,sec = checkValues ( v, t[ v ][ 'min' ] or 0, t[ v ][ 'sec' ] or 0 ) local hour = tonumber( t[ v ][ 'hour' ] or 0 ) setElementData( v, "time", tostring( hour )..'h '..tostring( min )..'min.' ) end end, 1000, 0 ) function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local sValue = getElementData( source,'time' ) local hour = tonumber( t[ source ][ 'hour' ] or 0 ) local min = tonumber( t[ source ][ 'min' ] or 0 ) local sec = tonumber( t[ source ][ 'sec' ] or 0 ) setAccountData ( playeraccount, "time-hour", tostring(hour) ) setAccountData ( playeraccount, "time-min", tostring(min) ) setAccountData ( playeraccount, "time-sec", tostring(sec) ) setAccountData ( playeraccount, "time", tostring(sValue) ) end t[ source ] = nil end function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local time = getAccountData ( playeraccount, "time" ) local hou = getAccountData ( playeraccount, "time-hour") local min = getAccountData ( playeraccount, "time-min") local sec = getAccountData ( playeraccount, "time-sec") if ( time ) then setElementData ( source, "time", time ) t[ source ]["hour"] = tonumber(hou) t[ source ]["min"] = tonumber(min) t[ source ]["sec"] = tonumber(sec) else setElementData ( source, "time",0 ) setAccountData ( playeraccount, "time",0 ) end end end addEventHandler ( "onPlayerQuit", root, onPlayerQuit ) addEventHandler ( "onPlayerLogin", root, onPlayerLogin )
  7. I want create a help panel, with html, but i don't know how to make this.. Anyone can help?
  8. Hi, I added an event handler to my static image. but when I actually See the gif code : login = { label = {}, staticimage = {}, edit = {} } login.staticimage[1] = guiCreateStaticImage(557, 336, 400, 404, "imgs/window.png", false) login.staticimage[2] = guiCreateStaticImage(191, 314, 185, 57, "imgs/register.png", false, login.staticimage[1]) login.staticimage[3] = guiCreateStaticImage(14, 308, 167, 73, "imgs/login.png", false, login.staticimage[1]) ---- EVENT : addEventHandler("onClientMouseEnter",login.staticimage[2],function() guiSetAlpha(login.staticimage[2],0.8) outputChatBox("trigger in") end) addEventHandler("onClientMouseLeave",login.staticimage[2],function() guiSetAlpha(login.staticimage[2],0.2) outputChatBox("trigger left") end) guiSetAlpha(login.staticimage[2],0.2)
  9. i want save grid list rows to xml, and load from xml.. but how to make this?
  10. Necesito ayuda por favor! Hola gente, soy algo nuevo en esto de crear scripts, y estoy intentando crear un script de zombies, mediante slothbot, y a esos "zombies" o bots, quiero cambiarles las animaciones al caminar. A ver si me explico mejor, estoy intentando crear bots mediante slothbot, los cuales deben estar destinados a seguir a los jugadores. Hasta ahí todo bien, no es algo tan complejo. Mi problema es el siguiente: ¿Cómo puedo hacer para cambiar la forma en la que caminan dichos bots? ¿Hay alguna forma de cambiar su animación al atacar/caminar? Gracias por su tiempo gente, un saludo grande!
  11. i want make a joinquit script, but i want the join, disconnect..etc messages show in right side, like killmessages, it is possible? if yes, how??
  12. ALGUÉM PODERIA ME PASSA LINK DE ALGUM MOD PARA MTA PARA QUE PAGA A FIANÇA DO PLAYER PRESO ?
  13. Hello everyone! I am new to this scripting stuff so I am looking for help. For the last few days I have been trying to make work SetElementModel and have no success. What I want this script to do is to change one vehicle to another while you are driving it. Any suggestions? Here is link to the site- https://wiki.multitheftauto.com/wiki/SetElementModel. Also here is the code I used. addCommandHandler ( "changeveh", function ( thePlayer, command, newModel ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) newModel = tonumber ( newModel ) if theVehicle and newModel then setElementModel ( theVehicle, newModel ) end end )
  14. ..this is not the full code from my nametag: when i press 'T', the chaticon appear on everybody.. how to fix this? i want, when a player, or me press 'T', the ballon show just on the player, or on me, not on everyplayers... sorry for my terrible english .. :c
  15. Hello everyone! I am new to this scripting stuff so I am looking for help. For the last few days I have been trying to make work SetElementModel and have no success. What I want this script to do is to change one vehicle to another while you are driving it. Any suggestions? Here is link to the site- https://wiki.multitheftauto.com/wiki/SetElementModel
  16. xyair12

    no servers appear

    Hi, how are you friends, I have a problem. When I open the MTA and inside server browsers and no servers appear, there is no server help. thanks.
  17. Zero123

    Help pls

    Because when I want to add a group in acl from my admin panel I get this Error adding objet 'user.Zero' to group 'Moderator' Help pls
  18. Hello I have a nametag script. And i have a chat-icon script too. But i want add the chat-icon thing to nametag script, above the player nametag. And do not appear for me, just another players. This is possible? If yes, how? Sorry for my bad english..
  19. This is the code: function onPlayerQuit ( thePlayer) local playeraccount = getPlayerAccount ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local nametagszin = getPlayerNametagColor ( thePlayer ) setAccountData ( playeraccount, "ntszin", nametagszin ) end end end function onPlayerLogin (_, playeraccount ) local playeraccount = getPlayerAccount ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if ( playeraccount ) then local nametagszin = getAccountData ( playeraccount, "ntszin" ) if ( nametagszin ) then setPlayerNametagColor ( thePlayer, r, g, b ) end end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin ) No error(s)/warning(s) in debugscript 3.. What wrong?
  20. Where can i download overdose effects with script for mta sa?
  21. The resource starts, but the bot does not spawn. function bot () team = createTeam ("AngryBots", 255,255,255) exports [ "slothBot" ]:spawnBot ( 2002.5241699219,1546.9384765625,13.5859375, 90, 124, 0, 0, 29, "waiting", true ) end addCommandHandler("bots",bot) <meta> <info author="Falke" version="2.0.0" type="misc" name="angrybots" description="This script will add Silent Hill to San Andreas" /> <script src="server.lua" type="server" /> <include resource="slothbot" /> </meta> Why does not the bot spawn?? Please, help me! Neither the "nemesi1" script is working now (it worked when i played MTA years ago...). I don't know what is happening ;-; *nemesi1: https://community.multitheftauto.com/index.php?p=resources&s=details&id=5722
  22. Hy! I would like to make a dxDraw indicator that shows stamina. I wanted to make a picture, that fills up to a certain level based on a value, so I tried using dxDrawImageSection and RenderTarget too, but I couldn't make it. It is important that I want it to be relative, so like I have a 200x200 size picture that I draw in 80x80, or in 50x50 and so on based on the user's resolution. Could someone help me in this?
  23. i created a HUD with rectangles (bg rectangle, hp, armor...etc), and i want this make movable, so that move at the same time, but i don't know how to make this possible anyone can help? sorry for my bad english :c
  24. Hello guys, what's up ? I've made myself an blip event script, that attach a blip on the admin on the map, and the user who kills it get a random item. The most complicated part of the script is working fine, but i have a problem... The problem is: When the admin kills himself, the event doesn't end, if i die 10x, i'll have the function still running, so everytime i die it gives the message and the item... The script: (i've already commented all the lines to get easier to understand...) --function blip has paremeter: theplayer function blip (thePlayer) --variable accountname receive the value of the getaccountname of the player, to see the player login accountname = getAccountName(getPlayerAccount(thePlayer)) --if the player who triggered the blip function is a supermoderator or an admin then if isObjectInACLGroup("user." .. accountname, aclGetGroup("SuperModerator")) or isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then --output the message "special event - kill the adm identified as a $ on the map, the winner will get random items" outputChatBox ('#00BFFF==============================================================',getRootElement(),255,255,255,true) outputChatBox ('#00BFFF【 EVENTO ESPECIAL! 】#FFFFFF Mate o ADM identificado com o #098700cifrão ($) verde no mapa',getRootElement(),255,255,255,true) outputChatBox ('#FFFFFFO vencedor ganhará itens aleátorios!',getRootElement(),255,255,255,true) outputChatBox ('#00BFFF==============================================================',getRootElement(),255,255,255,true) --attach a "$" blip to the admin or supermod who started the event blip = createBlipAttachedTo (thePlayer,52,10) --set the admin data blood to 100 setElementData(thePlayer, "blood",100) --set the admin data blip event to true setElementData(thePlayer, "eventoblip",true) --set the max slots of the admin backpack to 350 setElementData(thePlayer, "MAX_Slots",350) end end --add the command /eventoblip that triggers the function blip addCommandHandler("eventoblip", blip) --table that determine what items the player will be given local itens = { {"Banana"}, {"Kiwi"}, {"Pizza"} } --function that calculates the size of the table itens above function tamanho( tabela ) local count = 0 for a in pairs( tabela ) do count = count + 1 end return count end -- function endevent has parameters: ammo, attacker, weapon, bodypart function fimdoevento(ammo, attacker, weapon, bodypart) -- if there is a attacker, and the element that killed him was a player, and the killed player has the data blip event then if attacker and getElementType ( attacker ) == "player" and getElementData(source,"eventoblip") == true then --declaring a local variable item that uses the tablecount system to pickup a random item of the table items local item = itens[math.random(tamanho(itens))][1] --declaring a local variable quantity, that's equal to 1x local quantidade = 1 --destroy the blip on the map after event is over destroyElement(blip) --remove the data blip event from staff setElementData(source, "eventoblip",false) --give to the attacker and the admin(test purposes) the random item, and quantity setElementData(attacker, item , quantidade) setElementData(source, item, quantidade) --output message "congratulations attackername killed the staff and wins X quantity of the X item" outputChatBox ('#00a5ff==============================================================',getRootElement(),255,255,255,true) outputChatBox ("#00a5ff Parabéns [#FF0000" ..getPlayerName(attacker).."#00a5ff] matou o Staff e ganhou [#ff0000 "..quantidade.."x "..item.."#00a5ff]!",getRootElement(),255,255,255,true) outputChatBox ('#00a5ff==============================================================',getRootElement(),255,255,255,true) -- else if there is a attacker, and the attacker killed with a vehicle, and the killed player has the data blip event then elseif attacker and getElementType ( attacker ) == "vehicle" and getElementData(source,"eventoblip") == true then --destroy the blip on the map after event is over destroyElement(blip) --remove the data blip event from staff setElementData(source, "eventoblip",false) --give to the attacker and the admin(test purposes) the random item, and quantity setElementData(attacker, item , quantidade) setElementData(source, item, quantidade) --output message "congratulations attackername killed the staff and wins X quantity of the X item" outputChatBox ('#00a5ff==============================================================',getRootElement(),255,255,255,true) outputChatBox ("#00a5ff Parabéns [#FF0000" ..getPlayerName(attacker).."#00a5ff] atropelou o Staff e ganhou [#ff0000 "..quantidade.."x "..item.."#00a5ff]!",getRootElement(),255,255,255,true) outputChatBox ('#00a5ff==============================================================',getRootElement(),255,255,255,true) -- if none of this conditions is true then the admin accidentally killed himself from falling or other causes else --output message "the staff adminname killed himself, the event is still running" outputChatBox ('#00a5ff==============================================================',getRootElement(),255,255,255,true) outputChatBox ('#00a5ffO Staff ' .. getPlayerName(source) .. ' se matou, o evento continua.' ,getRootElement(),255,255,255,true) outputChatBox ('#00a5ff==============================================================',getRootElement(),255,255,255,true) end end --add an event handler of type onplayerwasted, that triggers the fimdoevento (translating: endevent) function addEventHandler("onPlayerWasted", getRootElement(), fimdoevento) Thank you guys, and please if anyone is thinking to use the script, please have my credits in: Gabriel Bigardi
  25. i want change the needle color if speed >= 240, but does not working how to fix this? what wrong? no error(s)/warning(s)
×
×
  • Create New...