MrJuhis

Members
  • Content count

    10
  • Joined

  • Last visited

Community Reputation

0 Neutral

About MrJuhis

  • Rank
    Member
  • Birthday 13/01/2001

Details

  • Gang
    CIT
  • Interests
    MTA Lua Scripting
  1. MrJuhis

    triggerServerEvent How To Pass Information

    Try these. Contact me on skype if you need more help with scripts, i'm everyday available. Skype: juhis122 Server function money (thePlayer) valor = getPlayerMoney (thePlayer) triggerClientEvent (thePlayer,"Pass.Valor",thePlayer,valor) end addCommandHandler ("show",money) Client function atualiza (valor) outputChatBox (valor) end addEvent ("Pass.Valor",true) addEventHandler ("Pass.Valor",localPlayer,atualiza)
  2. MrJuhis

    Need help with savesystem

    I tried again with code: function SaveTeamOnLogOut() local playerTeam = getPlayerTeam ( source ) local TeamName = getTeamName ( playerTeam ) local playerAccount = getPlayerAccount(source) if playerAccount then setAccountData(playerAccount, "Team", TeamName ) setAccountData(playerAccount, "Occupation", getElementData( source, "Occupation") ) end end addEventHandler("onPlayerQuit",getRootElement(),SaveTeamOnLogOut) function LoadSaveOnLogin() local playerAccount = getPlayerAccount(source) if playerAccount then setPlayerTeam( source, getTeamFromName(getAccountData(playerAccount, "Team"))) setElementData( source, "Occupation",(getAccountData(playerAccount, "Occupation")), true ) end end addEventHandler("onPlayerLogin",getRootElement(),LoadSaveOnLogin) It doesn't work and doesn't output any errors. It moves me again to the staff team.
  3. MrJuhis

    Need help with savesystem

    So this is my code. When i quit from the game and go back to game, i go to the staff team every time i login. Even when i quit on another team but it still goes to the staff team. It looks like it doesn't not save the stats when i quit. Any help is welcome! function SaveTeamOnLogOut() local playerTeam = getPlayerTeam ( source ) local TeamName = getTeamName ( playerTeam ) local playerAccount = getPlayerAccount(source) local r,g,b = getPlayerNametagColor ( source ) setAccountData(playerAccount, "Team", TeamName ) setAccountData(playerAccount, "Tag", r,g,b ) setAccountData(playerAccount, "Occupation", getElementData( source, "Occupation") ) end addEventHandler("onPlayerQuit",getRootElement(),SaveTeamOnLogOut) function LoadSaveOnLogin() local playerAccount = getPlayerAccount(source) local r,g,b = getAccountData(playerAccount, "Tag") setPlayerTeam( source, getTeamFromName(getAccountData(playerAccount, "Team"))) setPlayerNametagColor ( source, r, g, b ) setElementData( source, "Occupation",(getAccountData(playerAccount, "Occupation")), true ) end addEventHandler("onPlayerLogin",getRootElement(),LoadSaveOnLogin) And the errors that script output: WARNING: Bad argument @ 'setPlayerNametagColor' [Expected number at argument 3, got nil]
  4. MrJuhis

    I'm trying to learn how to script

    If you need help with scripting or need examples of something, i can help you. You can add me on skype: juhis122
  5. MrJuhis

    Samp objects for MTA

    This includes SAMP 0.3c objects. Hope this helps.
  6. MrJuhis

    Mapping disappear help.

    This happens when you remove world object. A way to fix this is to put setOcclusionsEnabled after removeWorldModel. Example: removeWorldModel(17512,500,2721.05591, -1753.92749, 10.19558) setOcclusionsEnabled( false )
  7. marker = createMarker ( 1808.4814453125, -1909.2841796875, 13.571605682373, "cylinder", 1.1, 0, 255, 0) addEventHandler ("onMarkerHit", marker, startMission) function startMission(hitElement) if getElementType (hitElement) == "player" then local team = getPlayerTeam (hitElement) if getTeamName (team) ~= "Civilians" then local teamName = getTeamName (team) exports["FFS-TopBar"]:outputTopBar( "You have to be Civilian before using Bus Driver Job (/civilian)", hitElement, 255, 246, 7 ) else setElementData( source, "Occupation", "Bus Driver", true ) exports["FFS-TopBar"]:outputTopBar( "You are now a Bus Driver", source, 0, 255, 43 ) setPlayerNametagColor(source, 255, 246, 7) end end end Can't get it working, when i enter to marker nothing happens.
  8. MrJuhis

    Topic Moved

    Really good!
  9. MrJuhis

    [HELP] Occupation in DxdrawText

    I can't see my occupation on my screen. Help! local sx,sy = guiGetScreenSize() local px,py = 1600,900 local x,y = (sx/px), (sy/py) addEventHandler("onClientRender", root, function(source) dxDrawText( "Current Job: "..getElementData ( source, "Occupation" ).., x*10, y*863, x*247, y*891, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", false, false, true, false, false) -- Your Text Bottom Left end )
  10. When i try to spawn vehicle in F1 Freeroam GUI. It says error. EDIT: I got it fixed! Just deleted settings.xml file and buum fixed