Jump to content

pcisoft

Members
  • Posts

    50
  • Joined

  • Last visited

Everything posted by pcisoft

  1. try this untested i'm using the phone. function getTextureNameFromID(model) if model and tonumber(model) then for k, v in ipairs(engineGetModelTextureNames(model)) do return v end end end Thanks, but is there a way to reverse the function and get an ID from Texture ? Regards.
  2. pcisoft

    notfixed.

    hh Fast Reply, Im CAG's Owner
  3. He just started playing MTA:SA two days ago, do you seriously think he's a server owner? Randy, you mean you want to open the Freeroam F1 panel with other key. Well, the freeroam panel can be opened too with the command "/fr", so do this: -Open the console (press F8). -Type "bind [key] fr" and press enter. The key can be for example F3, now when you press F3 you'll open it without having to press the default F1 key. I hope I helped you hahaha this is a nice tuto for new Players
  4. use MySQL if you got an SQL Server, SQLite for a file with extension .sql or .db you can read other scripts or wiki for this, cauz me too Im not pretty as this...
  5. pcisoft

    notfixed.

    Sure that you are CIF Owner ?
  6. Hello! Please, is there any way to retrieve the Texture name of a skin or car by it's ID ? Regards
  7. pcisoft

    Delete

    Couldn't use Walid's answer
  8. pcisoft

    Delete

    Holly **** No one Replyes I will stop playing MTA and close my server cauz forum doesn't Reply on me
  9. pcisoft

    Delete

    WHY NO REPLY IT WAS 2 DAYS!!
  10. pcisoft

    Delete

    try to use tables. local music = {} music[localPlayer] = ... Im not good at tables Does it mean if the player is in table then return end ? and add that player to the table if he executes this command or something ? but it's a PlaySound3D Function how to return end is there a function to get Players listenning to Sound in that 3D zone Thanks!
  11. pcisoft

    Delete

    Why no reply ?!?!
  12. pcisoft

    dbQuery ?

    debugscript 3 What ?
  13. pcisoft

    dbQuery ?

    Anyone help please
  14. :fp: now I know why when I was an idiot scripter this script haven't worked :fp: Reason: addEventHandler("onMarkerHit", gateo) Example from Wiki: (https://wiki.multitheftauto.com/wiki/OnMarkerHit) local myMarker = createMarker(-2596.625, 579.358, 15.626, 'cylinder', 2.0, 255, 0, 0, 150) -- create myMarker function MarkerHit( hitElement, matchingDimension ) -- define MarkerHit function for the handler local elementType = getElementType( hitElement ) -- get the hit element's type outputChatBox( elementType.." inside myMarker", getRootElement(), 255, 255, 0 ) -- attach the element's type with the text, and output it end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) -- attach onMarkerHit event to MarkerHit function he forgot to write the marker before the function :fp: xXMADEXx's script haven't worked with me cauz there is no specific marker to hit or to leave in the addEventHandler
  15. pcisoft

    Delete

    Delete please
  16. pcisoft

    dbQuery ?

    Haven't worked can you come test with me in my server please ? be Developer if you want Server Name: CAG
  17. pcisoft

    dbQuery ?

    Ya3tik essa7a wallahi 5sartou aka COG fera8, d5altlou 9olt hetha chyetla3 Tefeh ye5i tla3 mezyen barcha, 5sartou w barra ---------------------------------------------------------TRANSLATE TO ENGLISH------------------------------------------------------ Thanks you Im sad about COG cauz It's empty, I visited it and thinked that it's a noob server but found that they are good Scripts Im sad about it
  18. pcisoft

    dbQuery ?

    Haven't Worked It doesn't save anything local db = dbConnect("sqlite", "database.db") dbExec (db, "CREATE TABLE IF NOT EXISTS repairkits (account, amount)") function saveRepairKits( acc ) local accname = getAccountName(acc) local cur = getElementData(source, "Repair.Kits") if cur then local results = dbPoll( dbQuery( db, "SELECT * FROM repairkits WHERE account=?", accname ), -1 ) if results and type(results) == "table" and #results > 0 then return dbExec( db, "UPDATE repairkits SET amount=? WHERE account=?", tonumber( cur ), accname ) end dbExec (db, "INSERT INTO repairkits (account, amount) VALUES (?, ?)",accname, tonumber(cur)) end end function LoadRepairs ( _, acc ) local kitt = dbPoll ( dbQuery ( db, "SELECT * FROM repairkits WHERE account=?", getAccountName( acc )), -1 ) if kitt then for k,v in ipairs ( kitt ) do setElementData(source, "Repair.Kits", v['amount']) end end end addEventHandler ( "onPlayerLogin", root, LoadRepairs ) addEventHandler ( "onPlayerLogout", root, saveRepairKits ) Anyhelp please have you tested your script ?
  19. pcisoft

    dbQuery ?

    Hello, I'm Creating a Repair-Kit System, While tried to setAccountData to store repair kits it doesn't work I want repair kits to be saved as Element Data and I replaced the Account data with Database Code: function saveRepairKits(player, kits) local acc = getPlayerAccount(player) local accname = getAccountName(acc) local cur = getElementData(player, "Repair.Kits") local itemnames = val3.amount if cur ~= nil then dbExec (db, "UPDATE repairkits SET amount=? WHERE account=?", tonumber(cur), accname) else dbExec (db, "INSERT INTO repairkits (account, amount) VALUES (?, ?)",accname, tonumber(cur)) end end function LoadRepairs (player, kits) local kitt = dbPoll ( dbQuery ( db, "SELECT * FROM repairkits WHERE account=?" ), getAccountName(getPlayerAccount(player)), -1 ) setElementData(player, "Repair.Kits", kitt) end addEventHandler ( "onPlayerLogin", rootElement, LoadRepairs ) addEventHandler ( "onPlayerLogout", rootElement, saveRepairKits ) That's my storation code that doesn't work, that's my first Database script can anyone tell me how to load repairkits from db and set it as the player's data and when he logout save his repairkits in database (UPDATE if exsists or INSERT INTO if doesn't exist in table) Thanks!!
  20. yes but I need the original object to change DFF in autodesk!
  21. I want to replace the default GTA object with a custom one (like CIT2 Spawn Vehicle custom object)
  22. Yes Please, where to find objects files in GTA:SA folder ? and what is COL and LODDistance Thanks!
  23. @_@ tnajem tzid tfasarli ? (Can you explain more?)
  24. Hello everyone, I want to create a custom object in my server and replace any other useless object ID with it so what function I need to use ? THANKS!
  25. Thanks for Rapid Reply and for Informations <3
×
×
  • Create New...