Jump to content

..:D&G:..

Members
  • Posts

    1,028
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by ..:D&G:..

  1. Hello, I am working on a farm system, and I want to attach a sound to a cow. List: cowList = { { animal = { -- model, x, y, z, r -- cow {13, -2750.576171875, 379.568359375, 4.1328125,272}, } }, } In that list will be more than 1 cow, lets say there are 4 cows, how do I attach and play the sound to a random from that list,I don't want all the cows to play the sound at once
  2. Pai nu prea se merita, am observat ca, copii nu vor sa incerce nimic nou, majoritatea stau numai pe un server de cand haul si paraul, ca o baba deaia care are obiceriurile ei si nu se duce la spital. Oricum jucatorii din partea romanilor nu stiu sa aprecieze un bun server, faci server bun pentru niste copii de 7 ani cum spui tu, ei au intrat pe unul prima oara, acolo vor sta pana cade serverul de tot sau le ia foc pc-ul...
  3. Scuzati ca ma bag, dar nu am ce face si am zis sa imi dau si eu cu parerea . Voi vreti o comunitate, mai multe servere care apartin de o comunitate, bine.. Dar nu mai bine lasati cate servere sunt acum, ca multi jucatori nu sunt, si macar sa fie 2-3 servere cu gamemoduri diferite si cu 10-20 jucatori in fiecare, multe servere au 0 jucatori cand altele intr-e 2 si 30... Nu are rost 20 de servere (exemplu) care apartin de o comunitate, mai bine 2-3 cu diferit nume si fondatori. Nu stiu sigur ce vreti sa faceti, poate numai un server... dar si asa, ce gamemod sa aiba? Roleplay? Deja sunt vre-o 3, Play? Deja sunt vre-o 4, Zombi? Vre-o 2... Nu prea are rost, parerea mea
  4. This resource is copied, as far as I know.. -->> https://community.multitheftauto.com/index.php?p= ... ls&id=7477 DONE
  5. Well, no errors but I can only create a pickup when I am logged in as a administrator by the default mta login system... I don't see what makes this thing...
  6. This is what I tried to make, but only the outputChatBox works addEventHandler ( "onClientGUIClick", butAjutor, function ( ) outputChatBox ( "THE BUTTON WAS CLICKED!" ) triggerServerEvent("onClientCallsServerFunction", help , toggleHelp) end ,false )
  7. The function that I want to call is in another resource, that won't work..
  8. Can you make it for me please, its the first time I see/use this code And the example from WIKI confuses..
  9. This confuses me a bit, where do I put the name of the button? ''butAjutor'' triggerServerEvent ( "showHelp", getLocalPlayer( ), butAjutor, true )
  10. Hello, I have a script that pops up a window with help. I also have other script that shows information about the server. I made a button for the help script, when clicked the window should close and the info script should acctivate. Button: local butAjutor = guiCreateButton(601, 28, 133, 33, "Ajutor De Început", false, myWindow) I want the button to execute this: - This currently works on a command function toggleHelp( thePlayer, commandName ) The toggleHelp function is on server side in a script, and the button is on client side on another script.. How do I connect this 2?
  11. Eh... sorry, but this is not a leaked script... I might use ONE, but I am seriously not stupid to ask for help about that script on the forum... If you want to help me then ok, if you don't want, still ok, but just don't shoot the topic with replys that have nothing to do with the topic..
  12. Well... it doesn't really, first when you want to learn scripting, you need to know how to modify one script, then how to change it. and then how to make one. If you can see my posts then you could find out by yourself, thanks for the compliment by the way.
  13. Yes, 2. I am using scripts from many different gamemodes, Venux, basic roleplay, paradise, etc... But what does this have to do with my problem...?
  14. No, its too bugged, I just use the script that puts the game type and map name on, and the social one, I put small bits from different gamemodes together...
  15. Hello, I have a login system saving on mysql. When I try to login it gives me this error: INFO: MYSQL ERROR 1054: Unknown column 'monitored' in 'field list' ERROR: login/slogin.lua:62 attempt to compare number with boolean local accountCheckQuery = mysql:query(accountCheckQueryStr) Line 62 if (mysql:num_rows(accountCheckQuery) > 0) then accountData = mysql:fetch_assoc(accountCheckQuery) mysql:free_result(accountCheckQuery)
  16. Ah, you still don't get me =)) So, I got that code from a resource, not sql or mysql, and I need you to configure that so it saves the ped skin id, ped it, ped name etc. Now, the code saves other things, for that other resource.
  17. I have the sql resource . But thats just an example, I want the table to have the pedid, skinid, x,y,z, etc for this resource, the code from other resource
  18. I can only use /deletetext and /nearbytext... But I can't create, I don't even get the syntaxa..
  19. Dugasz, I see that you are good at mysql, can you make me a table using this code please? This is the first time I have to handle with tables and such... addEventHandler( "onResourceStart", resourceRoot, function( ) -- check for our table to exist if not exports.sql:create_table( '3dtext', { { name = 'textID', type = 'int(10) unsigned', auto_increment = true, primary_key = true }, { name = 'text', type = 'text' }, { name = 'x', type = 'float' }, { name = 'y', type = 'float' }, { name = 'z', type = 'float' }, { name = 'interior', type = 'tinyint(3) unsigned' }, { name = 'dimension', type = 'int(10) unsigned' }, } ) then cancelEvent( ) return end
  20. Hi, when I start this script I got an error, then when I change what the error tells me then I get other error, so I left it original and maybe someone can help me local elements = { } local function loadText( id, text, x, y, z, interior, dimension ) local element = createElement( "3dtext" ) setElementPosition( element, x, y, z ) setElementInterior( element, interior ) setElementDimension( element, dimension ) setElementData( element, "text", tostring( text ) ) elements[ id ] = element end addEventHandler( "onResourceStart", resourceRoot, function( ) -- check for our table to exist if not exports.sql:create_table( '3dtext', { { name = 'textID', type = 'int(10) unsigned', auto_increment = true, primary_key = true }, { name = 'text', type = 'text' }, { name = 'x', type = 'float' }, { name = 'y', type = 'float' }, { name = 'z', type = 'float' }, { name = 'interior', type = 'tinyint(3) unsigned' }, { name = 'dimension', type = 'int(10) unsigned' }, } ) then cancelEvent( ) return end -- local result = exports.sql:query_assoc( "SELECT * FROM 3dtext ORDER BY textID ASC" ) if result then for key, data in ipairs( result ) do loadText( data.textID, data.text, data.x, data.y, data.z, data.interior, data.dimension ) end end end ) addCommandHandler( "createtext", function( player, commandName, ... ) if (exports.global:isPlayerLeadAdmin(player)) then local text = table.concat( { ... }, " " ) local x, y, z = getElementPosition( player ) local insertid,e = exports.sql:query_insertid( "INSERT INTO 3dtext (`text`, x, y, z, interior, dimension) VALUES (" .. table.concat( { "'%s'", x, y, z, getElementInterior( player ), getElementDimension( player ) }, ", " ) .. ")", text ) if insertid then loadText( insertid, text, x, y, z, getElementInterior( player ), getElementDimension( player ) ) outputChatBox( "Text created. (ID " .. insertid .. ")", player, 0, 255, 0 ) else outputDebugString( e ) outputChatBox( "MySQL-Query failed.", player, 255, 0, 0 ) end else outputChatBox( "Syntax: /" .. commandName .. " [text]", player, 255, 255, 255 ) end end, true ) addCommandHandler( "deletetext", function( player, commandName, textID ) if (exports.global:isPlayerLeadAdmin(player)) then textID = tonumber( textID ) if textID then local element = elements[ textID ] if element then if exports.sql:query_free( "DELETE FROM 3dtext WHERE textID = " .. textID ) then outputChatBox( "You deleted text " .. textID .. ".", player, 0, 255, 153 ) destroyElement( element ) -- remove the reference elements[ textID ] = nil else outputChatBox( "MySQL-Query failed.", player, 255, 0, 0 ) end else outputChatBox( "Text not found.", player, 255, 0, 0 ) end else outputChatBox( "Syntax: /" .. commandName .. " [id]", player, 255, 255, 255 ) end end ) addCommandHandler( "nearbytexts", function( player, commandName ) if (exports.global:isPlayerLeadAdmin(player)) then local x, y, z = getElementPosition( player ) local dimension = getElementDimension( player ) local interior = getElementInterior( player ) outputChatBox( "Nearby Texts:", player, 255, 255, 0 ) for key, element in pairs( elements ) do if getElementDimension( element ) == dimension and getElementInterior( element ) == interior then local distance = getDistanceBetweenPoints3D( x, y, z, getElementPosition( element ) ) if distance < 20 then outputChatBox( " Text " .. key .. ": " .. tostring( getElementData( element, "text" ) ), player, 255, 255, 0 ) end end end end end ) ERROR: 3dtext/3dtext.lua:81: unexpected symbol near ')'
  21. I changed the the code a bit: txd = engineLoadTXD("skins/baldbeard.txd") engineImportTXD(txd, 0) dff = engineLoadDFF("skins/head.dff") engineReplaceModel( dff, 0) txd = engineLoadTXD("skins/BIGplayer_torso.txd") engineImportTXD(txd, 0) txd = engineLoadTXD("skins/player_torso.txd") engineImportTXD(txd, 0) And look what I get: WARNING: mods/c_mods.lua:96 Bad usage @ 'engineReplaceModel' [Model ID 0 replace failed]
  22. ERROR: mods/c_mods.lua:96 attempt to call global 'engineImportDFF' (a nil value)
  23. I can't really use debugscript because I have an error that spams it.. The error its from other script..
×
×
  • Create New...