Jump to content

Taalasmaa

Members
  • Posts

    197
  • Joined

  • Last visited

Everything posted by Taalasmaa

  1. No problem, but keep the wiki.multitheftauto.com in your mind.
  2. Very nice job Slothman.. I'm building survive mode and this will be more than pérfect for it
  3. Hello admins.. I was wondering if you could change my name from "Talasma" To "Taalasmaa" Thank You I would be glad. Regards Taalasmaa
  4. BE PATIENT!!! Here's the script.. Please visit in http://www.wiki.multitheftauto.com in future, i wont help you with this kind of cases if you dont go there. okay .. CLIENT-SIDE (client.lua) -- Please go to wiki.multitheftauto.com so i dont need to help you in future -- -- Here's working script -- -- Taalasmaa handles -- function gui ( ) window = guiCreateWindow ( 0.4, 0.3, 0.3, 0.4, "Welcome "..getPlayerName ( getLocalPlayer () ), true ) mymoney = guiCreateLabel ( 0.25, 0.10, 0.8, 0.12, "Your money: $"..getPlayerMoney ( source ), true, window ) guiCreateLabel ( 0.1, 0.25, 0.8, 0.12, "Player:", true, window ) guiCreateLabel ( 0.1, 0.44, 0.8, 0.12, "Money:", true, window ) editBox1 = guiCreateEdit( 0.3, 0.26, 0.7, 0.12, "", true, window ) editBox2 = guiCreateEdit( 0.3, 0.42, 0.7, 0.12, "", true, window ) give = guiCreateButton ( 0.1, 0.58, 0.8, 0.12, "Give!", true, window ) addEventHandler ( "onClientGUIClick", give, give1, false ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), gui ) -------------- function show_gui ( ) guiSetText ( mymoney, "Your money: $"..getPlayerMoney ( source ) ) guiSetText ( window, "Welcome "..getPlayerName ( getLocalPlayer () ) ) if ( guiGetVisible ( window ) == true ) then guiSetVisible ( window, false ) showCursor ( false ) else guiSetVisible ( window, true ) showCursor ( true ) end end function close_gui ( ) showCursor ( false ) guiSetVisible ( window, false ) end function Keys ( ) bindKey ( "F7", "down", show_gui ) end addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), Keys ) addEventHandler ( "onClientResourceStart",getResourceRootElement(getThisResource()), close_gui ) --------------- function give1 ( ) eee = guiGetText ( editBox1 ) ddd = guiGetText ( editBox2 ) triggerServerEvent ( "theMoney", getLocalPlayer(), eee,ddd ) -- This sends datas to the server where is the function -- end --------------- SERVERSIDE Example: (server.lua) function giveThem ( userplayer,money ) -- The datas we just sent local cash = getPlayerMoney(source) if (cash > tonumber(money)) then -- if player who is sending money got that much money that he want to send moneyToGive = getPlayerFromName(userplayer) -- get the player who we want to give the moneys if (moneyToGive ~= false) then -- if there player exist givePlayerMoney(moneyToGive,money) -- give his money name = getPlayerName(source) takePlayerMoney(source,money) -- take the money amount from the sender outputChatBox("You've given money amount of: " .. money .. "$ for: " .. userplayer,source,255,255,0) -- just stuff you can change this -- outputChatBox(name .. " has given you money amount of: " .. money .. "$!",moneyToGive,255,255,0) -- the player who get the money will see this, can be changed too -- else outputChatBox("Player did not exist",source,255,0,0) -- if there wasnt player end else outputChatBox("You are trying to send amount of money that you even dont have?",source,255,0,0) -- if the sender does not have the amount of money he wants to send end end addEvent( "theMoney", true ) addEventHandler( "theMoney", getRootElement(), giveThem ) Regards Taalasmaa
  5. Hello MTA Community. I have a question about a website stats. Okay, so how can I send scoreboard data's like Ping, Money (Custom column), kills, deaths to the webscript.. Do i need to put the website script to the same box where is the gameserver, I wish there could be way so i don't need to put them to same box than the gameserver. Regards Taalasmaa
  6. It is exactly as name suggests. Anyway, webmap should be on your server by default. Type "start webmap" in your server console and connect to your server through your internet browser: (not MTA itself) http://: For instance, if running a local server with HTTP port of 22005: http://127.0.0.1:22005 You should connect to the server, and you should now be prompted to enter your username and password. Enter the username and password of an account with admin rights in-game. Now look on the left of the screen, there should be something called "webmap" there. Click on it and there it is, you can now see where everyone is on your server without being on it. Working now. Is there way to make it visible for everyone, because currently only accounts who have admin rights, can connect.. This would be good if everybody could see webmap
  7. Hey, I have a question about webmap.. How does it work and how do I install it to linux server? Sorry about short information
  8. I got it working. Thanks anyway for everyone who helped me :b!
  9. function test2() if not xmlLoadFile( "test.xml" ) then local mission = xmlCreateFile ( "test.xml", "root" ); local new1 = xmlCreateChild( mission, "Car" ); vehicle = getPedOccupiedVehicle(source) xmlNodeSetAttribute( new1, "Veh", vehicle ); xmlSaveFile( mission ); end end addCommandHandler("test", test2) Okay, tried this1 too, now. It's not giving ANY errors in debugscript.. Just shows in test.xml. And, I was in a car, lol.
  10. function test2() if not xmlLoadFile( "test.xml" ) then local mission = xmlCreateFile ( "test.xml", "root" ); local new1 = xmlCreateChild( mission, "newFinish" ); xmlSaveFile( mission ); end end addCommandHandler("test", test2) Tried this too. It only Gives <root/> To test.xml file. It's not creating "newFinish".
  11. Really weird.. I added resourceRoot = getResourceRootElement( getThisResource( ) ) addEventHandler("onResourceStart", resourceRoot, function( ) local mission = xmlCreateFile ( "test.xml", "root" ); outputChatBox("test.xml created succesfully") end ) and removed old test.xml for test, but it's not EVEN creating new test.xml
  12. Still not working . Any other things?
  13. test.xml is in the same directory than the script itself. Name is test.xml And I got the file, so far. Also I checked that test.xml doesn't have any big letters like "Test.xml"-
  14. Yo, I'm very and I mean very newbie in XML. I can script lua very well, but I'm not ever practised XML's. I'm just testing this: function test2(thePlayer) mission = xmlLoadFile("test.xml") local newFinish = xmlCreateChild(mission, "newMission" ); x,y,z = getElementPosition(thePlayer) xmlNodeSetAttribute( newFinish, "posX", x ); xmlNodeSetAttribute( newFinish, "posY", y ); xmlNodeSetAttribute( newFinish, "posZ", z ); end addCommandHandler("test", test2) Why this isn't working. In debugscript it's giving Bad Arguement @ xmlCreateChild, Bad Arguement @ xmlNodeSetAttribute Thanks.
  15. sounds good, I will try it
  16. -.- I mean how to custom chatbox VIA SCRIPT. Not via mta menu .....
  17. Yo MTA! I have a question. You guys know that you can edit chatbox via settings. I'm planning that all players who joins to my server will get custom chatbox. Is there events/functions which with I could edit chatbox. Hope you understood what i'm trying to say. Regards Taalasmaa
  18. Yes, you need to script it. Why do you believe that you can do a script via acl... Omg...
  19. Nobody will do a script for you. Check out: https://wiki.multitheftauto.com/wiki/HasObjectPermissionTo You need to learn by yourself. We're not here for do a ready scripts for you.
  20. Nope, It wasn't even here http://code.google.com/p/multitheftauto-resources/downloads/list Damn, I really like to get interstate69 .
  21. Nope, It wasn't even here http://code.google.com/p/multitheftauto-resources/downloads/list Damn, I really like to get interstate69 .
  22. Yo, guys. I'd like to get interstate69 gamemode running in my server. I downloaded it from MTA Community, upgraded it and when I started it, It gave thousands of errors, well then I fixed all errors by my hand, now there's no errors at all, but still it's not showing weapons in main menu (where you can choose weapons for car) Anyway, Is there any working version of interstate69. I'm really glad if somebody can answer for this question. Thanks
  23. Yo, guys. I'd like to get interstate69 gamemode running in my server. I downloaded it from MTA Community, upgraded it and when I started it, It gave thousands of errors, well then I fixed all errors by my hand, now there's no errors at all, but still it's not showing weapons in main menu (where you can choose weapons for car) Anyway, Is there any working version of interstate69. I'm really glad if somebody can answer for this question. Thanks
  24. Hey, I've opened own radio server/program, which plays music from my server. Is there way to hear this radio station in MTA, so when you connect to the server, music starts playing from web. I guess it's impossible..
  25. Hey, I've opened own radio server/program, which plays music from my server. Is there way to hear this radio station in MTA, so when you connect to the server, music starts playing from web. I guess it's impossible..
×
×
  • Create New...