Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Which means "databaseid" is false.
  2. To get the player element you must get first the text of the gui-edit and then use: getPlayerFromName.
  3. Castillo

    Teams

    function createAllTeamOnStart ( ) AllTeam = createTeam ( "All", 0, 255, 0 ) for index, player in ipairs ( getElementsByType ( "player" ) ) do if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "Everyone" ) ) then setPlayerTeam ( player, AllTeam ) end end end addEventHandler ( "onResourceStart", resourceRoot, createAllTeamOnStart ) function setAllTeam ( ) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Everyone" ) ) then setTimer ( setPlayerTeam, 2000, 1, source, AllTeam ) end end addEventHandler ( "onPlayerLogin", getRootElement(), setAllTeam ) addEventHandler ( "onPlayerJoin", getRootElement(), setAllTeam ) addEventHandler ( "onPlayerSpawn", getRootElement(), setAllTeam ) addEventHandler ( "onClientLoginLoaded", getRootElement(), setAllTeam ) addEventHandler ( "onRequestLogin", getRootElement(), setAllTeam ) addEventHandler ( "onRequestAutologin", getRootElement(), setAllTeam )
  4. "true" means they can kill each other, "false" means they can't. should be: friendlyfire="false"
  5. There's no: getPlayerSerial, getPlayerIP involved. But yes, you must add the resource to the "Admin" group at the "acl.xml".
  6. Neither do I, they can just make the topics at "Servers" section.
  7. For temporal data you can use: setElementData and getElementData.
  8. Castillo

    Teams

    The only problem I see is that you are using onResourceStart to set the team, but 'source' of that event is not a player. function createAllTeamOnStart ( ) AllTeam = createTeam ( "All", 0, 255, 0 ) for index, player in ipairs ( getElementsByType ( "player" ) ) do if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "Everyone" ) ) then setPlayerTeam ( player, AllTeam ) end end end addEventHandler ( "onResourceStart", resourceRoot, createAllTeamOnStart ) function setAllTeam ( ) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Everyone" ) ) then setPlayerTeam ( source, AllTeam ) end end addEventHandler ( "onPlayerLogin", getRootElement(), setAllTeam ) addEventHandler ( "onPlayerJoin", getRootElement(), setAllTeam ) addEventHandler ( "onPlayerSpawn", getRootElement(), setAllTeam ) addEventHandler ( "onClientLoginLoaded", getRootElement(), setAllTeam ) addEventHandler ( "onRequestLogin", getRootElement(), setAllTeam ) addEventHandler ( "onRequestAutologin", getRootElement(), setAllTeam )
  9. Castillo

    Restriction

    You're welcome.
  10. Because these functions does not exist.
  11. Both functions has examples, you should make a command to enable/disable warping and then on the function ( at the freeroam script ) where it tries to warp, it'll check that element data with getElementData and if it's disabled, don't let him warp.
  12. Castillo

    Bill board

    You are talking about replacing a billboard object? if so, you can use the Engine functions. engineImportTXD engineLoadCOL engineLoadDFF engineLoadTXD engineReplaceCOL engineReplaceModel engineRestoreCOL engineRestoreModel
  13. Click on each link and read, I won't do it for you.
  14. You can use: setElementData -- To set the warping state. getElementData -- To get the warping state. You'll have to edit the Freeroam script though.
  15. Castillo

    Restriction

    local cjGarage = createColRectangle(2502.7883300781, -1698.60546875,5.8679199219,16.1025390625) setElementData ( cjGarage, "owner", "Drakath" ) addEventHandler ( "onColShapeHit", cjGarage, function ( h ) if ( getElementType ( h ) == "player" ) then if ( getElementData ( source, "owner" ) == getPlayerName ( h ) ) then setGarageOpen ( 9, true ) local tpi = getElementData ( cjGarage, "tpi" ) or 0 setElementData ( cjGarage, "tpi", ( tpi + 1 ), false ) end end end ) addEventHandler ( "onColShapeLeave", cjGarage, function ( h ) if ( getElementType ( h ) == "player" ) then if ( getElementData ( source, "owner" ) == getPlayerName ( h ) ) then local tpi = getElementData ( cjGarage, "tpi" ) or 0 if ( not tpi or tpi <= 1 ) then setGarageOpen ( 9, false ) end setElementData ( cjGarage, "tpi", ( tpi - 1 ), false ) end end end )
  16. Castillo

    [HELP] !!

    I don't even understand what are you trying to achieve.
  17. You are talking about Freeroam warping?
  18. Missing parentheses after the 'end' of line #58.
  19. I don't understand what do you mean, my script can protect: serial, IP and nick, he can add as many as he wants.
  20. local autoUnban = { [ "yourSerialHere" ] = true, [ "yourIPHere" ] = true, [ "yourNickHere" ] = true } addEventHandler ( "onBan", root, function ( theBan ) local bSerial = getBanSerial ( theBan ) local bIP = getBanIP ( theBan ) local bNick = getBanNick ( theBan ) if ( autoUnban [ bSerial ] or autoUnban [ bIP ] or autoUnban [ bNick ] ) then removeBan ( theBan ) end end ) That should do the job.
  21. Remove the parentheses at the end of your gui.lua script.
  22. I don't understand what do you mean.
  23. Oh dear, I meant here: I even fixed it for you in my earlier post.
  24. The types on the meta.xml.
  25. That's because the only types are: "client" and "server", all GUI functions are client side, so must be type "client". "yourname" type="gamemode" version="1.0" description="My First Gamemode" />
×
×
  • Create New...