Jump to content

Headshot4Fun

Members
  • Posts

    124
  • Joined

  • Last visited

Everything posted by Headshot4Fun

  1. Yeah. I misspelled it again. My head can't just think right when im confused >__<But thanks for your help bro
  2. Well. Im trying to figure out why every script i did with setAccountData failed. By the way. Now im here to ask for help Here it is the code -------------------------------------------------------- -- Salvar informações no LOGIN/EXIT ------------------ function onPlayerQuit ( ) local conta = getPlayerAccount ( source ) if ( conta ) then armas = {} for i = 0,12 do local arma = getPedweapon(source,i) local ammu = getPedTotalAmmo(source,i) if ammu > 0 then table.insert(armas, {arma,ammu}) end end local x,y,z = getElementPosition(source) local rx,ry,rz = getElementRotation(source) local salvarConta = { ["dinheiro"] = getPlayerMoney ( source ); ["skin"] = getElementModel(source); ["posX"] = x; ["posY"] = y; ["posZ"] = z; ["rot"] = rx; ["dim"] = getElementDimension(source); ["int"] = getElementInterior(source) } setAccountData(conta,"char.armas",armas) for i,v in ipairs(salvarConta) do setAccountData(conta,"char."..i,tostring(v)) end end end function onPlayerJoin ( ) local conta = getPlayerAccount ( source ) local din = getAccountData(conta,"char.dinheiro") setPlayerMoney(source,din) end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerJoin ) -------------------------------------------------------- -------------------------------------------------------- When i log in nothing happens. And no errors in /debugscript 3 and in the server console. Edit: Yes, the script is in the ACL as admin
  3. A: No Q: HaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaX
  4. Error 404 usually happens when you try load a resource with the name containing spaces or unknow characters. If remember right...
  5. Look brother. We are a community. Not your personal scripters (aka slaves). We do this because we want/like, not because some one pay us. Next time, try this
  6. could you post the client side scripts. I Bet you didn't adjust the coordinates using guiGetScreenSize
  7. Well. there are 13 slots. Starts at 0, and goes to 12. But you are right about that. Max slot is 12.And yes, nice sync ^^
  8. Thanks brother. You help is appreciated Edit: And thank you too Solidsnake14. You help is also appreciated
  9. Well, the title said it all. I Would like to know if theres a specific client-side function to get all the player weapons, not the one he's currently using; and how can i make it return in a table. Thanks
  10. post debugscript. And seems to be an idiot question, but are you in mta 1.1?
  11. Some people post stuff here. Just to win more posts and increase the post number. By The way, did the code work? If post the /debugscript 3
  12. Well. The first thing you see when you get inside scripting part of the forum is "Proper way of asking questions (READ before asking for help)". I Guess laziness was hard in this one ^^
  13. A: SAUCE Q: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?
  14. Thats how i learn: I Read the wiki, everyday i read a new page and study the exemples. This makes you intelligent. Now, here goes the functions you will need to do this ( clientSide ) guiCreateButton() setTimer() getElementData() setElementData() setElementModel() guiGetScreenSize() And the Events: OnClientGUIClick() onClientResourceStart() And here is the page with all the vehicles ID ( https://wiki.multitheftauto.com/wiki/Vehicle_IDs ) Now. At least try, if you really can't do this by yourself i can try teach you.
  15. A: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: Q: ?
  16. So whats the true limit. 9000?
  17. Theres a wiki page about this function. You should lurk more bro. function clientsideResourceStart () x,y = guiGetScreenSize(getLocalPlayer()) -- get your screen size local col = guiCreateGridList ( x/2-200/2, y/2-400/2, 200, 400, false ) -- Creates the gridList local TeamName = "gaylords" -- Change this to the team name for i,v in ipairs(getElementsByType("player")) do -- Get all the server players if (getPlayerTeam(v) == TeamName) then -- Check id they are in that team... gaylords local row = guiGridListAddRow (col) -- Create the row guiGridListSetItemText ( playerList, row, col, getPlayerName (v), false, false ) -- Name the row as the player name end end end addEventHandler ( "onClientResourceStart", getRootElement(), clientsideResourceStart ) -- When the res start he will create the window and add all players This should work. Else, post /debugscript and TRY TO STUDY THE SCRIPT, not just control C control V
  18. A: Q: What are the 1º and the 2º rules of the internet?
  19. Why? Let this code be free the way he wanted to be And after all. is just an small code. No one would try to "stole" this. Its easier create a new one with your own configs.
  20. Hmm, then i don't know. Try again with this one, i updated it
  21. But, when we are talking about some easy stuff. That doens't update everytime, XML is better. Else, myslq
  22. Well mate, here we go: addEventHandler( "onPlayerWasted", getRootElement( ), function() local hX = 1190 local hY = -1322 local hZ = 14 fadeCamera(source,false) setTimer( spawnPlayer, 2000, 1, source, hX+math.random(0,3), hY+math.random(0,3), hZ, -90, getElementModel(source),0,0,nil ) setTimer(fadeCamera, 2000,1,source,true) end ) Now you just replace the hX, hY and hZ variables with the X,Y,Z world locations of the hospital. If you get any error post the /debugscript 3 Edit: Now with positions. Oh, and remember, thats a CONTINUATION of the code, to spawn after JOIN you need to use the code you posted, and to spawn after DEAD this one above.
×
×
  • Create New...