Jump to content

Anubhav

Members
  • Posts

    2,277
  • Joined

  • Last visited

Everything posted by Anubhav

  1. You can use XML but its laggy. It is easy to learn. Use some of they functions listed below: xmlCopyFile xmlCreateFile xmlDestroyNode xmlLoadFile xmlNodeGetAttribute xmlNodeGetValue xmlNodeSetAttribute xmlNodeSetValue xmlSaveFile xmlUnloadFile xmlCreateChild xmlFindChild xmlNodeGetAttributes xmlNodeGetChildren xmlNodeGetName xmlNodeGetParent xmlNodeSetName
  2. Anubhav

    map dimension

    Yes , i do . Add me on skype , anubhav.agarwal87 and np.
  3. I suggest 8.1 . I have it and its very fast.
  4. Anubhav

    map dimension

    add to your meta.xml of your map:
  5. I agree its unique script and its realy hard to make theese type of scripts. I Prefer i like this but its seems old game. As ProGear said "But in all honestly it's all in good sport" , i agree with it also.
  6. Taxem , i am a old member of it and u know. Please add me on skype , i got some problems.
  7. Threule if that would be added it would look cool. Damien your scripts ARE Pro keep making them!
  8. Anubhav

    Solved

    Are you sure? Try using /buymap MapName If it does not work. add me on skype anubhav.agarwal87
  9. Anubhav

    Solved

    Which line number in this script is it?
  10. createVehicle addCommandHandler -- to type /commandName VehID
  11. Anubhav

    Solved

    function buyMap(player, command, ...) local account = ( ( getPlayerAccount( player ) and not isGuestAccount( getPlayerAccount( player ) ) ) and getPlayerAccount( player ) or false ) if ( account ) then local cashHave = tonumber( getAccountData( account, "cash" ) ) if g_ForcedNextMap then outputChatBox( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) return end end local query = #{...}>0 and table.concat({...},' ') or nil if not query then if g_ForcedNextMap then outputChatBox( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) else outputChatBox( 'Next map is not set', player, 255, 0, 0 ) end return end local map = findMap(query) if not map then outputChatBox(errormsg, player) return end if(cashHave >= 10) then if lastmap_B == map then outputChatBox( 'That map has been played too much recently.', player, 255, 0, 0 ) else g_ForcedNextMap = map outputChatBox(getPlayerName(player).. " bought map '" ..getMapName(g_ForcedNextMap).. "' for $10. (/bm)", g_Root, 0, 240, 0) setAccountData( account, "cash", cashHave - 10 ) lastmap_B = g_ForcedNextMap end else outputChatBox("You don't have enough money. ($10)", player, 255, 0, 0) end end addCommandHandler('bm', buyMap) addCommandHandler('buymap', buyMap)
  12. Anubhav

    colshop

    I Will give you server. function colh(player) setPedOnFire(ped,true) end addEventHandler("onColShapeHit",colsp1,colh)
  13. You can create vehicles with LUA. Do it will it to make it easy. Some functions which will help you getPlayerTeam createVehicle setVehicleLocked
  14. spawnPlayer(source, 1177.51917, -1324.05542, 14.07470,-90, math.random (1,50), 0, 0, false) setElementFrozen(source,false) try this. It is sure that the player won't be frozen.
  15. Anubhav

    Question

    KRZO you don't realy need a handler. I have resource using it and it works without it.
  16. Anubhav

    Question

    txd = engineLoadTXD ( "data/euros.txd" ) engineImportTXD ( txd, 587 ) dff = engineLoadDFF ( "data/euros.dff", 587 ) engineReplaceModel ( dff, 587 )
  17. Sorry for triple reply, Third theme released. Download (onlyThisVersion): http://www.upload.ee/files/3883391/images.rar.html Screens: -NA Credits: Anubhav (Designer,Idea)
  18. Hello members , Please help me. How do i move a window with it and using OutInBounce. I din't understood the wiki page.. Please help!
  19. Hello Members Off MTA, Today i am releasing my 3rd version of Theme. I Hope you like it. Download (onlyThisVersion): http://www.upload.ee/files/3883163/images.rar.html Screens: -NA Credits: Anubhav (Designer,Idea) __ SOON NEW VERSION And it will come today!
  20. https://wiki.multitheftauto.com/wiki/On ... ayerWasted -- Doesn't return's. https://wiki.multitheftauto.com/wiki/TriggerServerEvent --Returns true if the event trigger has been sent, false if invalid arguments were specified.
  21. spawnPlayer guiCreateWindow guiCreateMemo addEventHandler Use the functions written up. It's realy easy!
  22. Welcome to Anubhav's Tutorials TUTORIAL 1 - Checking money Lets start! First we will start with basic functions which are not complicated. We will do money checking script. Make sure its server in meta.xml 1. We will start with a function named checkMoney. function checkMoney() 2. To check player's money we must use getPlayerMoney and we will add the first argument. function checkMoney() getPlayerMoney(thePlayer) 3. We will make local. function checkMoney() local money = getPlayerMoney(thePlayer) 4. We will need to output the money so we will use. Arguments: 1st is the text you want to take out. i used money.. with it. function checkMoney() local money = getPlayerMoney(thePlayer) outputChatBox("You have $"..money,player) 5. We will end the function function checkMoney() local money = getPlayerMoney(thePlayer) outputChatBox("You have $"..money,player) end 6. Last thing , we need to add the command so we can check anytime we want. function checkMoney() local money = getPlayerMoney(thePlayer) outputChatBox("You have $"..money,player) end addCommandHandler("money",checkMoney) Use /money to get your money! TUTORIAL 2 - Exports What is exports? Export is like selling things to other country but here it is used as functions not goods ( items ). Lets start@! We will make changeAccountPassword script which will change the account password. 1. We will add the function named changeAccountPassword function changeAccountPassword() 2. We will make a end to end the function! function changeAccountPassword() end 3. Now we will make add getPlayerAccount to get what account to set. function changeAccountPassword(account) local account = getPlayerAccount(account) end 4. We will check if got the account. [/lua] function changeAccountPassword(account) local account = getPlayerAccount(account) if account then end [/lua] 5. We will add a end to end if and check if it was guest account , if it was then return and add one more end. function changeAccountPassword(account) local account = getPlayerAccount(account) if account then if (isGuestAccount(account)) then return outputChatBox("changeAccountPassword Error: Bad Argument @ 1",root) end end end 6. We will add else because it was a account and output it that it was succesfully found. function changeAccountPassword(account) local account = getPlayerAccount(account) if account then if (isGuestAccount(account)) then return outputChatBox("changeAccountPassword Error: Bad Argument @ 1",root) end else outputChatBox("changeAccountPassword has got the account!",root) end end 7. Now we will get the account password was entered in second argument! and we will update outputChatBox. NOTE: It must be a number. function changeAccountPassword(account,password) local account = getPlayerAccount(account) if account then if (isGuestAccount(account)) then return outputChatBox("changeAccountPassword Error: Bad Argument @ 1",root) end else local password = tonumber(password) outputChatBox("changeAccountPassword has got the account! Now checking for password",root) end end 8. We will check if he typed the second argument if not then return and say outputChatBox and add one more end. function changeAccountPassword(account,password) local account = getPlayerAccount(account) if account then if (isGuestAccount(account)) then return outputChatBox("changeAccountPassword Error: Bad Argument @ 1",root) end else local password = tonumber(password) outputChatBox("changeAccountPassword has got the account! Now checking for password",root) if not password then return outputChatBox("changeAccountPassword Error: Bad Argument @ 2", root) end end end 9. We will add a else and outputChatBox that it was totaly correct and setted. function changeAccountPassword(account,password) local account = getPlayerAccount(account) if account then if (isGuestAccount(account)) then return outputChatBox("changeAccountPassword Error: Bad Argument @ 1",root) end else local password = tonumber(password) outputChatBox("changeAccountPassword has got the account! Now checking for password",root) if not password then return outputChatBox("changeAccountPassword Error: Bad Argument @ 2", root) end else outputChatBox("changeAccountPassword was sucessfully finished without any errors.", root) setAccountPassword(account,password) end end 10. Last thing you need to update meta. You need to add the line: <export function="changeAccountPassword" type="server"/> Remember to take it as server sided only. Use: exports.yourResourceName:changeAccountPassword(account, password) Thanks anubhav.
  23. Anubhav

    Hello.

    I Know how to do this things. To make it visible and light enough like it set its alpha to 170 and its color to 0,0,0
×
×
  • Create New...