Jump to content

Wei

Members
  • Posts

    814
  • Joined

  • Last visited

Everything posted by Wei

  1. show your code allready fix it. It wasn't anything wrong with a code. I've removed and install again server and now works. It wasn't working for any code!
  2. When I use setElementData and I reconnect it is removed why ? same as setAccountData
  3. Wei

    Team save problem

    ofc. And no debug errors. Onli some errors from login panel...
  4. whats wrong here ? function setTeam() local account = getPlayerAccount(source) -- gets players account local team = getAccountData (account, "team") -- gets players team if (team) and getTeamFromName(team) then setPlayerTeam(source, getTeamFromName(team)) -- sets players team end end addEventHandler("onPlayerLogin",root,setTeam) -- sets players team on login function save() local team = getPlayerTeam(source) -- Gets the players team local account = getPlayerAccount(source) if (team) and not isGuestAccount(account) then -- Checks to see if the player is a guest or not setAccountData(account, "team", getTeamName(team)) --saves team end end addEventHandler("onPlayerQuit", getRootElement(), save) -- saves team on quit
  5. Somebudy helped me allready... I needed to add root at ..., root, 255...
  6. g_Root = getRootElement() addEventHandler('onPlayerJoin', g_Root, function() outputChatBox("* #FF4000'" .. getPlayerName(source) .. "'#00FF00 has joined the game", 0, 255, 0, true) end )
  7. I think you can make it Via mysql. To connect server and website to the mysql. I don't know how to do that but I know it's possible...
  8. add the in alc.xml group "Admin"
  9. Wei

    Playerblip panel

    Jayz your code is not working Jaysds1 your code is workin thank you very much
  10. Wei

    Playerblip panel

    now both buttons doesn't work and no errors
  11. Wei

    Playerblip panel

    I did not only copy it I've added the getPlayerFromName and stuff but not work
  12. Wei

    Playerblip panel

    Don't work...
  13. Wei

    Playerblip panel

    Same again...
  14. Wei

    Playerblip panel

    same... it only make more blips on it
  15. Wei

    Show bank money

    addCommandHandler ( "money", function ( thePlayer ) local account = getPlayerAccount ( thePlayer ) if ( not isGuestAccount ( account ) ) then local balance = tonumber ( getAccountData ( account, "bank.balance" ) ) or 0 outputChatBox (getPlayerName(thePlayer).." balance is $".. balance, root, 0, 255, 0 ) -- Use predefined variable root. end end ) It will output chat like Blazy balance is $1542222
  16. Wei

    Playerblip panel

    Blip works now but Unblip doesn't
  17. Wei

    Playerblip panel

    You not make your window showing. Edited. I forgot then at the end. Window is working now but it doesn't blip player
  18. Wei

    Playerblip panel

    function randomFunction(button) if (button) ~= "left" then return end if (source == closeBut) then guiSetVisible( playerBlipWindow, false) showCursor(false) elseif ( source == blipUnblipBut ) then local playerName = guiGridListGetItemText ( gridListOfPlayers, guiGridListGetSelectedItem ( gridListOfPlayers ), 1 ) playerBlip = createBlipAttachedTo( playerName, 40 ) setElementData(getLocalPlayer(), "isPlayerBlipped", true) elseif ( getElementData(getLocalPlayer(), "isPlayerBlipped", true)) and (source == blipUnblipBut) then destroyElement(playerBlip) setElementData(getLocalPlayer(), "isPlayerBlipped", false) end end addEventHandler("onClientGUIClick", resourceRoot, randomFunction, true) Whats wrong. Error: Bag argument @ createBlipAttachedTo
  19. Wei

    Playerblip panel

    Hi. I don't know how to add players to grid and how I can get selected item, how can I remove blip. Please help me. This is my gui: playerBlipWindow = guiCreateWindow(384,150,199,294,"Player blip panel",false) guiWindowSetSizable(playerBlipWindow,false) gridListOfPlayers = guiCreateGridList(9,23,181,201,false,playerBlipWindow) guiGridListSetSelectionMode(gridListOfPlayers,2) guiGridListAddColumn(gridListOfPlayers,"Players",0.2) blipUnblipBut = guiCreateButton(9,232,85,52,"Blip/ \n Unblip",false,playerBlipWindow) closeBut = guiCreateButton(97,233,85,52,"Close",false,playerBlipWindow)
  20. http://mta.dzek.eu/peds/ Is easy way function applyMods() local skin = engineLoadTXD ( "(file).txd" ) engineImportTXD ( skin, (skin id) ) end addEventHandler("onClientResourceStart", getRootElement(), applyMods) It's a bit harder(for starter) but same.
×
×
  • Create New...