Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    players check

    I didn't say look for errors, I said see what these two variables return, their values.
  2. Remove your GTA completely and install it again?
  3. Castillo

    players check

    Debug the script, see what "team1Count" and "team2Count" returns.
  4. Are you sure that it doesn't show anything? because lately lot of people has been telling me that nothing shows up, but then I go to my test server and it spams the debug with errors from their scripts.
  5. Could be that the data is set after the player spawns, which means it will return "nil".
  6. setElementData(source, "lvl1", progCount) "source" must be "localPlayer".
  7. Castillo

    players check

    How are you executing that function?
  8. You mean turn an object which is not breakable on GTA to be breakable? if so, that's not possible.
  9. Where did you get the script?
  10. Castillo

    players check

    And what is the problem...?
  11. firstMarker = createMarker ( -35, 35, 121.5, "arrow", 250, 0, 250, 255 ) setElementInterior ( firstMarker, 900 ) function firstTP ( markerhit, matchingDimension ) if ( markerhit == firstMarker ) then setElementInterior ( source, 901, -214, 16, 197 ) end end addEventHandler ( "onPlayerMarkerHit", root, firstTP )
  12. Castillo

    ACL teamsaver

    function createTeamsOnStart() MainTeam = createTeam(":O Awesome Players!", 255, 50, 0) end addEventHandler("onResourceStart", resourceRoot, createTeamsOnStart) function setTeam(_, account) local acc = getAccountName ( account ) if isObjectInACLGroup ("user."..acc, aclGetGroup ( "SuperModerator" ) ) then if not getTeamFromName(team) then MainTeam = createTeam(team, 255, 50, 0) end setPlayerTeam(source, MainTeam) end end addEventHandler("onPlayerLogin", root, setTeam) function setTeam2(_, account) local acc = getAccountName ( account ) if isObjectInACLGroup ("user."..acc, aclGetGroup ( "Admin" ) ) then if not getTeamFromName(team) then MainTeam = createTeam(team, 255, 50, 0) end setPlayerTeam(source, MainTeam) end end addEventHandler("onPlayerLogin", root, setTeam2) function unassignTeam ( ) local team = getPlayerTeam ( source ) if ( team ) then setPlayerTeam ( source, nil ) local players = countPlayersInTeam ( team ) if ( players == 0 ) then destroyElement ( team ) end end end addEventHandler ( "onPlayerLogout", root, unassignTeam )
  13. Castillo

    players check

    I don't get what do you mean.
  14. You can create a table containing all blips for each player, then destroy it.
  15. I've just read on the wiki this:
  16. I don't really understand the problem.
  17. This is the official MTA forums, you must go and ask these questions on whatever server you are playing at.
  18. A "nightstick" isn't a fire arm, so how could it "fire"?
  19. Castillo

    JSON problem

    Got it, you must convert your number to a string. local storWeapon = fromJSON ( getElementData ( housePickup [ houseID ], "IGChousing.storedweapons" ) ) if ( type ( storWeapon ) == "table" ) then local tableWeapon = storWeapon local slot = tostring ( getSlotFromWeapon ( weapon ) ) if tableWeapon [ slot ] then tableWeapon [ slot ] = weapon ..",".. tableWeapon [ slot ] + ammo setElementData ( housePickup [ houseID ], "IGChousing.storedweapons", toJSON ( tableWeapon ) ) outputChatBox ( "In" ) else tableWeapon [ slot ] = weapon ..",".. ammo setElementData ( housePickup [ houseID ], "IGChousing.storedweapons", toJSON ( tableWeapon ) ) outputChatBox ( "NotIn" ) end
  20. Castillo

    JSON problem

    Mind posting the "storWeapon" result?
  21. Castillo

    JSON problem

    local storWeapon = fromJSON ( getElementData ( housePickup [ houseID ], "IGChousing.storedweapons" ) ) if ( type ( storWeapon ) == "table" ) then local tableWeapon = storWeapon if tableWeapon [ getSlotFromWeapon ( weapon ) ) ] then tableWeapon [ getSlotFromWeapon ( weapon ) ] = weapon ..",".. tableWeapon [ getSlotFromWeapon ( weapon ) ] + ammo setElementData ( housePickup [ houseID ], "IGChousing.storedweapons", toJSON ( tableWeapon ) ) outputChatBox ( "In" ) else tableWeapon [ getSlotFromWeapon ( weapon ) ] = weapon ..",".. ammo setElementData ( housePickup [ houseID ], "IGChousing.storedweapons", toJSON ( tableWeapon ) ) outputChatBox ( "NotIn" ) end This won't work btw: weapon ..",".. tableWeapon [ getSlotFromWeapon ( weapon ) ] + ammo You are trying to increase a string...
  22. Castillo

    JSON problem

    You are checking the slot, do you know that?
×
×
  • Create New...