Jump to content

..:D&G:..

Members
  • Posts

    1,028
  • Joined

  • Last visited

  • Days Won

    1

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

  1. Yes But still doesn't wotk :\ "skins/player_torso.txd" /> "skins/BIGplayer_torso.txd" /> "skins/baldbeard.txd" /> "skins/head.dff" />
  2. I knew this... But look what I did: txd = engineLoadTXD ( "skins/baldbeard.txd", 0) engineImportTXD ( txd, 0 ) dff = engineLoadDFF ( "skins/head.dff", 0) engineReplaceModel( dff, 0 ) txd = engineLoadTXD ( "skins/BIGplayer_torso.txd", 0) engineImportTXD ( txd, 0 ) txd = engineLoadTXD ( "skins/player_torso.txd", 0) engineImportTXD ( txd, 0 )
  3. Hello, I want to replace CJ's skin with one of mine, but the skin has 1 .dff file and 3 .txd files. What code do I have to use? Files: head.dff baldbeard.txd BIGplayer_torso.txd player_torso.txd
  4. Hi Ahmad , I will give you the link for GTA as soon as the school finishes
  5. How do I load the X,Y,Z,Dimension,Interior, Skin and Name of the npc from a table? And I want to load all the colums. function loadNpcs () npcsData_q = mysql_query(handler,"SELECT * FROM npc WHERE x='" .. mysql:escape_string(x1) .. "', y='" .. mysql:escape_string(y1) .. "', z='" .. mysql:escape_string(z1) .. "', skin='" .. mysql:escape_string(getElementModel(thePlayer)) .. "'") npcsData_assoc = mysql_fetch_assoc(playerData_q) end addEventHandler ( "onPlayerJoin", getRootElement(), getPlayerDatasFromSQL) addEventHandler("onResourceStart",gResRoot, loadAllpeds)
  6. I have xampp and the mysql database Thanks for the example, I will try that as soon I get home
  7. I get soo many errors that lag my server and spam my console if canPopulate then -- create a new vehicle as we didn't have one before local vehicle = createVehicle( data.model, unpack( v ) ) --[[Like 61]] setTimer(setElementFrozen, 1500, 999999999, vehicle, true)
  8. I can't really understand the wiki How can I load the position, skin, etc? Like this code that loads data from XML... function loadAllpeds () local root = xmlLoadFile ("peds.xml") local pedroot = xmlFindChild (root,"peds",0) if (pedroot) then allpeds = {} for i,v in ipairs (xmlNodeGetChildren(pedroot)) do local x = xmlNodeGetAttribute (v,"x") local y = xmlNodeGetAttribute (v,"y") local z = xmlNodeGetAttribute (v,"z") local nazwa = xmlNodeGetAttribute (v,"name") local number = xmlNodeGetAttribute (v,"num") local skin = xmlNodeGetAttribute (v,"skin") local rot = xmlNodeGetAttribute (v,"rot") local int = xmlNodeGetAttribute (v,"int") local dim = xmlNodeGetAttribute (v,"dim") local ped = createPed (tonumber(skin),tonumber(x),tonumber(y),tonumber(z)) setPedRotation(ped,tonumber(rot)) setElementData (ped,"pedNumber",tonumber(number)) setElementData (ped,"message",tostring(nazwa)) setElementData (ped,"message2","bPed\nID: "..tostring(number)) setElementInterior (ped, tonumber(int)) setElementDimension (ped, tonumber(dim)) -- outputDebugString ("Ped " .. tostring(nazwa) .. " [iD " .. tostring(number) .. "] loaded!") end end end addEventHandler("onResourceStart",gResRoot, loadAllpeds) But I want to load all that from the mysql database.
  9. What is the function that loads data from a MySQL table?
  10. ... Where I've put (DBname) you need to delete that and put your dabatase name -.-, where i've put (password) you need to delete that and put your phpmyadmin password.....
  11. function startConnection() ttHandler = dbConnect("mysql","dbname=(DB Name);host=localhost","root","(password)") if ttHandler then outputDebugString("Toptimes Connection to database successfull") else ttHandler = nil outputDebugString("Toptimes can't connect to database") end end
  12. t_server.lua Because usualy there are all the fuctions releated to the detabase connection and other important stuff...
  13. For those problems you will need to post the code of the script, but it might be because it doesn't connect to the Database...
  14. 1. I think he is saying that when a player clicks the 'Like to be' button, in the 'Player Name' colum, the player's name should be added and on the 'Like to be?' colum, number 1 should be added, and on 'Don't like to be?' colum number 0. And all this needs to be saved in a XML file. 2. He wants to add a player in the XML file, so it shows in the 'Player Name' colum, and when players vote for that player to get admin rights, lets say 2 people clicked on 'Like to be' button, and on the 'Like to be?' colum, numer 2 will be added, and if other people vote yes, number 3 should be added and soo one, and the same think as in 'Don't like to be'. He is also saying that he wants a change-mind option, if a player voted 'Don't like to be', and when he presses 'Like to be', take away 1 from the 'Don't like to be' colum and add 1 to 'Like to be' and vice versa... P.S: You will need an anti-spam for this, so a player can feedback just onces.
  15. Hello, I got the bpeds resource from community, I changed it a bit, and I got rid of anim.lua, info_c.lua and info_s.lua as I need just the gui and the normal script. When I press the create button (CREAZA) all I get is an error in the console, a outputChatBox bad argument at like 103 on server.lua...
  16. I have 2 community accounts, GeorgeHQ and D&G, but I want to use the D&G one, but I forget the password... Can someone delete it or change the password please? I want to use the D&G account because it has the initials of my name, and I am using it on the forums and on MTA as well.
  17. There you go: http://pastebin.mtasa.com/352
  18. Oh come one! Some one should know how to fix this! I can't join any server, I can even test my scripts, I can't play MTA at all !!!
  19. cgui.dll = 1.3.2.5433 core.dll = 1.3.2.5433
  20. When someone joins the server, all the screen is black, just the welcome message and the song plays... Cool GM by the way
  21. When I try to join a server or map editor I get this error:
  22. Hello, I am planning to get a host from Fibre Optic, and I want to know if they are a good host. If get have a good mysql database storage and all this things, good suport and small ping.
×
×
  • Create New...