Jump to content

CowTurbo

Members
  • Posts

    385
  • Joined

  • Last visited

Everything posted by CowTurbo

  1. "mR|TurboCow" /> "TurboCow" skin="28" r="255" g="100" b="0" age="15" x="1768" y="-1950" z="14" i="0" d="0" money="1500" bank="100" /> This my characters.xml function findPlayerIndexByName (accountName) root = xmlLoadFile("characters.xml") local allPlayers = xmlNodeGetChildren (root) local k = -1 for i,v in ipairs (allPlayers) do k = k+1 if (xmlNodeGetAttribute (v,"name") == accountName) then return k end end xmlUnloadFile (root) end And this the findPlayerIndexByName function, i think you will understand what it does.
  2. "characters.xml" type="server" /> in meta.xml
  3. no error already tryed, outputChatBox thing, seems it goes on until end correctly. Same thing with xmlLoadFile
  4. So the problems are that, XMLs wont gonna save/get files. Its like loads, everythings seems to work, saves files, unloads.. and notepad++ says, its change by other program, do you wanna reload it ? I press yes, and its still same. Same is that, it wont gonna load characters. Do no which code put here, but i will put character creating one. function createChar(skin,colred,colgreen,colblue,charactername,age) root = getResourceConfig("characters.xml") local accountName = getAccountName (getPlayerAccount(source)) outputChatBox ( accountName ) -- if not(getCharacterCount (accountName) == nil) or (getCharacterCount (accountName) <= tostring(3)) then if not (checkCharacterNameIsFake(charactername) == "FAKE") then outputChatBox ( "ITS NOT FAIKE" ) outputChatBox ( findPlayerIndexByName (tostring(accountName))) local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName (tostring(accountName))) local newCharacter = xmlCreateChild (root,"character") xmlNodeSetAttribute (newCharacter,"name",charactername) xmlNodeSetAttribute (newCharacter,"skin",skin) xmlNodeSetAttribute (newCharacter,"r",colred) xmlNodeSetAttribute (newCharacter,"g",colgreen) xmlNodeSetAttribute (newCharacter,"b",colblue) xmlNodeSetAttribute (newCharacter,"age",age) xmlNodeSetAttribute (newCharacter,"x",1768.71) xmlNodeSetAttribute (newCharacter,"y",-1950.13) xmlNodeSetAttribute (newCharacter,"z",14.10) xmlNodeSetAttribute (newCharacter,"i",0) xmlNodeSetAttribute (newCharacter,"d",0) xmlNodeSetAttribute (newCharacter,"money",1500) xmlNodeSetAttribute (newCharacter,"bank",500) outputChatBox ( "NEW CHAR CREATED" ) local newVehicle = xmlCreateChild (newCharacter,"vehicle") xmlNodeSetAttribute (newVehicle,"name", "BMX") xmlNodeSetAttribute (newVehicle,"id", 0) local playerIndex = findPlayerIndexByName (tostring(accountName)) local playerNode = xmlFindChild (root,"player",playerIndex) local character = xmlNodeGetChildren (playerNode) triggerClientEvent ("hideCharCrWind",source) triggerClientEvent ("showInfo",source,"Well done! You character have created sucefully! Select character now, and start playing!") if (character[3]) then triggerClientEvent (source,"OpenCharacterSelectWindow",source,accountName,xmlNodeGetAttribute(character[1],"name"),xmlNodeGetAttribute(character[2],"name"),xmlNodeGetAttribute(character[3],"name")) elseif (character[2]) then triggerClientEvent (source,"OpenCharacterSelectWindow",source,accountName,xmlNodeGetAttribute(character[1],"name"),xmlNodeGetAttribute(character[2],"name")) elseif (character[1]) then triggerClientEvent (source,"OpenCharacterSelectWindow",source,accountName,xmlNodeGetAttribute(character[1],"name")) else triggerClientEvent (source,"OpenCharacterSelectWindow",source,accountName) end else triggerClientEvent ("showInfo",source,"Error, this character name is already in use.") end -- else -- triggerClientEvent ("showInfo",source,"Error, the character max is 3 characters!\nYou have: 3 characters!\nYou can't add new ones any more!") --end xmlSaveFile (root) xmlUnloadFile (root) end addEvent ("createNewCharacter",true) addEventHandler ("createNewCharacter",getRootElement(), createChar ) Plz, help someone, its 5000+ code This problem comed, when i stoped developting one day, it were just standing on the resource folder. I wasnt got time for script, and now when i started it again, it wont gonna work ( maybe i fucked up something before let it stand ? )
  5. They like no rules and cheating and war..
  6. An edit of JasperNL=D House system Rules: 1.Do not edit this script without asking! 2.Dont say you have make it! This script is maked by JasperNL=D and edited by mR|TurboCow! Install: To install this resource, go to your resources folder, usuly it is: C:/Program Files/MTA San Andreas/Server/Mods/Deathmatch/Resources Download the file from community !!!!!!!!!!Unzip it!!!!!!!!!!!! You must do it before make it work!!! Put the folder to your resources folder Refresh resources Start script, go in server and make house, and have fun Info: This script is based by JasperNL=D Home system. Now it got much edits. Don't say i stole it, i have asked premission to edit it, and upload it to here. Updates: * New House GUI * Lock/Unlock System * 1 Pickup and 1 Marker ( Green/blue house pickup, Entering marker ) * House Making GUI * Sell Price and Street have added * Maybe was something more .. How to make Home? Login using your admin account Press F5 or do /createhome ( Only for admins ) You getted house creting gui Fill in all edits Press Create! button restart script Buy a home! If you got eny problems, ask in comments! Please rate! =D Forgoted to say, do /keyhouse to lock/unlock your home, or do /home to warp to your home Press Mouse 2 when u are creating house to hide cursor/show cursor! Good luck. © mR|TurboCow --------------------------- Change log 1.3.0 Added destroy house command do /destroyHouse for that Added houses reload, no need to restart script enymore! --------------------------- Change log 1.3.2 Fixed Green/blue house bug. Added 3 interiors. --------------------------- Change Log 1.4.0 Added (Un)lock button to house gui, no more /keyhouse using! Added Some settings, see server.lua for them. Now you can chose marker type, marker color, size, and how much houses player can buy ( currently 1 or 2 ) Thx to sE|Villr for idea. Link:https://community.multitheftauto.com/index.php?p=resources&s=details&id=1841
  7. CowTurbo

    Music

    Meta.xml is only for makeing resource know which scripts are u using at this folder. So, make a new file. Lets make it as example mysound.lua now open mysound.lua and copy paste this to there: addEventHandler ( "onClientResourceStart",getResourceRootElement(getThisResource()), function ( ) playSound ( 'mysong.mp3' ) -- put the song in your map folder end ) First, replace 'mysong' to your song name. ( Do not delete .mp3 ) Now open the meta.xml add those lines to there: ( Replace mysong to your song name ) save files, and restart script, should work. If u maked everything right
  8. ahh, im so stupid, lets see does it work too
  9. function onShoot ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) triggerServerEvent ( "addOneMore",getLocalPlayer(), weapon ) end addEventHandler("onClientPlayerWeaponFire", getRootElement(), onShoot) this will trigger for all players who see someone shooting. How to make it that when player shoots then it will be triggered only for him ?
  10. how to get player all weapons what he got ?
  11. ya, i have changed, but can't test it, i don't have 2 computers. I hope it works =) thx for help.
  12. function login(username,password) local account = getAccount (username,password) if (account) then logIn (source,account,password) triggerClientEvent ("hideLogin",source, username, password) else triggerClientEvent (source,"infoUp",source,"Username/Password is invalid!") end end addEvent ("loginPlayer",true) addEventHandler ("loginPlayer",getRootElement(), login )
  13. Agree with you, and about that last day thing we haven't get one free day back. 1 day just without server, but with money.
  14. always get's stuck after that when i do something with guis Maybe someone can explain me what i have do wrong. Gui popup for every player when player joins and have logged in. code: Client: langWindow = guiCreateWindow(244,181,341,173,"Chose your language, please!",false) guiWindowSetMovable(langWindow,false) guiWindowSetSizable(langWindow,false) eng = guiCreateStaticImage(34,58,126,74,"images/images.jpeg",false,langWindow) est = guiCreateStaticImage(183,58,126,74,"images/images2.jpeg",false,langWindow) guiSetVisible ( langWindow, false ) function showWindow () if ( source == getLocalPlayer()) then guiSetVisible ( langWindow, true ) showCursor ( true ) end end addEvent ( "showWindow", true ) addEventHandler ( "showWindow", getRootElement(), showWindow ) Server: function login(username,password) local account = getAccount (username,password) if (account) then logIn (source,account,password) triggerClientEvent ("hideLogin",source, username, password) else triggerClientEvent (source,"infoUp",source,"Username/Password is invalid!") end end addEvent ("loginPlayer",true) addEventHandler ("loginPlayer",getRootElement(), login ) Hide login function have that triggerEvent ( "showWindow", getLocalPlayer() ) =)
  15. MTA San Andreas Snowplowing! About? One day, i was thinked about city snow plowing game. I was asking in other forums about that, and they wasn't know it. Only thing what i founded, was an Snow mode for Farming Simulator. That was too boring. So i decided to make one by my own. And here's the results.. Features: * You can plow snow - It gonna move the plow to the other side, * You can use 3 different tractors - 1 plow tractor - Claas 2 plow tractor - New Holland ( Claas Remade ) 3 plow tractor - MTZ 80 ( Belarus ) * Inside Viev - Look inside of your tractor, * Flashing Light - turn the yellow light on top of tractor ON * Ice Streets - If you are not plowing, then the streets are under ice for vehicle. 6 Feb 2011 * You can bring snowo ut of streets using truck. Need to edit truck mode still. Credits JasperNL=D - Thanks for helping me on some of the functions, and ofcourse, he told me to use irc chat ( fix it for me, it wasn't working ) mR|killingsombody, Andi, mR|Siim - Thx for testing the scripts. Pictures Videos Video 1 - Made by me, 1. Video of snowplow 1.Video - it just removes, don't plow to other side. In Siim video it does it. ( Siim show it badly ) Video 2 - Made by Killingsombody ( tryed out he'snew camera of mobile phone ) https://www.youtube.com/watch?v=0RABAE-yzL4 Video 3 - Made by mR|Siim https://www.youtube.com/watch?v=0RABAE-yzL4 Video 4 - Made by me How can you help? Host - I need an hoster for this mode, it can be clan server too. 3D Model maker - I need a 3D Model maker, for plow. Join to the server! IP:[/b]217.18.70.180:22003 Name:[EST|ENG]Snowplowing Roleplay |Teams, Jobs, Houses, Medics, Cops, Fuel and much more!
  16. Sorry about doublepost, but else noone wont read it Enyway, i got host for now at serverffs.com, so can some admin's move this topic to the "Servers to play" topic? Server IP: 217.18.70.180:22003 Server name: [EST|ENG]Snowplowing Roleplay |Teams, Jobs, Houses, Medics, Cops, Fuel and much more! Join and try it out =)
  17. use [lua] [/lua] tags please
  18. it going to be fucked up after 300+ yea
×
×
  • Create New...