Jump to content

Kapil

Members
  • Posts

    80
  • Joined

  • Last visited

Everything posted by Kapil

  1. here http://kihc.pastebin.com/m56722c09 that is the defaul acl.xml, replace your with that one. UPDATED n FIXED Fixed Bugs - /leave and /house enter were bugged after /buildhouse. Updates - House messages are colored. - /buildhouse has been upgraded, read Usage Guide for details. - /house commands are wrapped.
  2. damn, these are mind blowing, heart attacking, head-aching bugs, i willl find and fix tomorow. Its 22:00 here.
  3. damn, these are mind blowing, heart attacking, head-aching bugs, i willl find and fix tomorow. Its 22:00 here.
  4. i tried with [ ], it worked for me. I could build houses and my name was successfully saved.
  5. i tried with [ ], it worked for me. I could build houses and my name was successfully saved.
  6. oh, i will check. EDIT: what is the clan tag bug ?
  7. oh, i will check. EDIT: what is the clan tag bug ?
  8. maybe u have messed up xml files, try reseting those files( Copy and replace the files from \KIHC\Rest to \KIHC ).
  9. maybe u have messed up xml files, try reseting those files( Copy and replace the files from \KIHC\Rest to \KIHC ).
  10. rule that we should avoid xml for storage ? u must be kidding. i also heard files and much faster than sql for loading and unloading.
  11. rule that we should avoid xml for storage ? u must be kidding. i also heard files and much faster than sql for loading and unloading.
  12. why ? i have already used getDistanceBetweenPoints3D.
  13. why ? i have already used getDistanceBetweenPoints3D.
  14. as the pickups were a bit buggy in MTA, when u do /house enter, it check whether you are within 5m radius from the pickup. If you are within the radius you will be set inside, else you wont. If i didnt implement this, ppl can just do /house enter from a far distance from the house, and cheat players. It will be used as a sort of teleport, which wont be good for rp servers.
  15. as the pickups were a bit buggy in MTA, when u do /house enter, it check whether you are within 5m radius from the pickup. If you are within the radius you will be set inside, else you wont. If i didnt implement this, ppl can just do /house enter from a far distance from the house, and cheat players. It will be used as a sort of teleport, which wont be good for rp servers.
  16. Description: With this you can save and load your players stats, information etc, whenever, whatever, wherever you want, even after server restarts. Script Feature - createData( name ) - existData( name ) - setData( name , key , value ) - getData( name , key , value ) Usage Guide - Firstly, copy all the code into the script you want to use it. - Once you have done, you can now use them just like you use functions. - Do createData( name ) to create a new user data , where name is users name. - Do existData( name ) to check if a user data exist, where name is users name. - Do setData( name , key , value ) to set a value for a existing user data key or a new user data key. - Do getData( name , key ) to get the value of a user data key. Examples createData( name ) local name = getClientlName( source ) createData( name ) existData( name ) local name = getClientName( source ) if not existData( name ) then createData( name ) end setData( name , key , value) local name = getClientName( source ) local health = getElementHealth( source ) setData( name , "health" , tostring(health) ) getData( name , key ) local name = getClientName( source ) local health = tonumber(getData( name , "health" )) setElementHealth( source , health ) Non-Sense I had to make a user data storage system for KIHC, it took a long time to make it, so i thought i would release it. Source function onLoad( ) if not xmlLoadFile( "database.xml" ) then xmlSaveFile( xmlCreateFile( "database.xml" , "main" ) ) end end addEventHandler( "onGamemodeStart" , getRootElement() , onLoad ) function createData( name ) local file = xmlLoadFile( "database.xml" ) local node = xmlCreateSubNode( file, "account" ) xmlNodeSetAttribute( node, "name" , name ) xmlSaveFile( file ) if node then return true else return false end end function existData( name ) local file = xmlLoadFile( "database.xml" ) local count = 0 local found = 1 local node = 2 while found ~= name do node = xmlFindSubNode( file, "account" , count ) if not node then return false end found = xmlNodeGetAttribute( node, "name" ) count = count + 1 if not found then return false end end return true end function setData( name , key , value) local file = xmlLoadFile( "database.xml" ) local count = 0 local found = 1 local node = 2 while found ~= name do node = xmlFindSubNode( file, "account" , count ) found = xmlNodeGetAttribute( node, "name" ) count = count + 1 if not found then return false end end xmlNodeSetAttribute( node, key , value ) xmlSaveFile( file ) return true end function getData( name , key ) local file = xmlLoadFile( "database.xml" ) local count = 0 local found = 1 local node = 2 while found ~= name do node = xmlFindSubNode( file, "account" , count ) found = xmlNodeGetAttribute( node, "name" ) count = count + 1 if not found then return false end end return xmlNodeGetAttribute( node , key ) end
  17. Description: With this you can save and load your players stats, information etc, whenever, whatever, wherever you want, even after server restarts. Script Feature - createData( name ) - existData( name ) - setData( name , key , value ) - getData( name , key , value ) Usage Guide - Firstly, copy all the code into the script you want to use it. - Once you have done, you can now use them just like you use functions. - Do createData( name ) to create a new user data , where name is users name. - Do existData( name ) to check if a user data exist, where name is users name. - Do setData( name , key , value ) to set a value for a existing user data key or a new user data key. - Do getData( name , key ) to get the value of a user data key. Examples createData( name ) local name = getClientlName( source )createData( name ) existData( name ) local name = getClientName( source )if not existData( name ) then createData( name )end setData( name , key , value) local name = getClientName( source )local health = getElementHealth( source )setData( name , "health" , tostring(health) ) getData( name , key ) local name = getClientName( source )local health = tonumber(getData( name , "health" ))setElementHealth( source , health ) Non-Sense I had to make a user data storage system for KIHC, it took a long time to make it, so i thought i would release it. Source function onLoad( ) if not xmlLoadFile( "database.xml" ) then xmlSaveFile( xmlCreateFile( "database.xml" , "main" ) ) end endaddEventHandler( "onGamemodeStart" , getRootElement() , onLoad ) function createData( name ) local file = xmlLoadFile( "database.xml" ) local node = xmlCreateSubNode( file, "account" ) xmlNodeSetAttribute( node, "name" , name ) xmlSaveFile( file ) if node then return true else return false end end function existData( name ) local file = xmlLoadFile( "database.xml" ) local count = 0 local found = 1 local node = 2 while found ~= name do node = xmlFindSubNode( file, "account" , count ) if not node then return false end found = xmlNodeGetAttribute( node, "name" ) count = count + 1 if not found then return false end end return trueend function setData( name , key , value) local file = xmlLoadFile( "database.xml" ) local count = 0 local found = 1 local node = 2 while found ~= name do node = xmlFindSubNode( file, "account" , count ) found = xmlNodeGetAttribute( node, "name" ) count = count + 1 if not found then return false end end xmlNodeSetAttribute( node, key , value ) xmlSaveFile( file ) return trueend function getData( name , key ) local file = xmlLoadFile( "database.xml" ) local count = 0 local found = 1 local node = 2 while found ~= name do node = xmlFindSubNode( file, "account" , count ) found = xmlNodeGetAttribute( node, "name" ) count = count + 1 if not found then return false end end return xmlNodeGetAttribute( node , key )end
  18. /scripter was removed, you need to have banIP rights( admin ) to do /buildhouse.
  19. /scripter was removed, you need to have banIP rights( admin ) to do /buildhouse.
×
×
  • Create New...