-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Which means "databaseid" is false.
-
To get the player element you must get first the text of the gui-edit and then use: getPlayerFromName.
-
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 )
-
"true" means they can kill each other, "false" means they can't. should be: friendlyfire="false"
-
There's no: getPlayerSerial, getPlayerIP involved. But yes, you must add the resource to the "Admin" group at the "acl.xml".
-
For temporal data you can use: setElementData and getElementData.
-
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 )
-
Because these functions does not exist.
-
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.
-
You are talking about replacing a billboard object? if so, you can use the Engine functions. engineImportTXD engineLoadCOL engineLoadDFF engineLoadTXD engineReplaceCOL engineReplaceModel engineRestoreCOL engineRestoreModel
-
Click on each link and read, I won't do it for you.
-
You can use: setElementData -- To set the warping state. getElementData -- To get the warping state. You'll have to edit the Freeroam script though.
-
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 )
-
You are talking about Freeroam warping?
-
Missing parentheses after the 'end' of line #58.
-
I don't understand what do you mean, my script can protect: serial, IP and nick, he can add as many as he wants.
-
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.
-
Remove the parentheses at the end of your gui.lua script.
-
I don't understand what do you mean.
-
Oh dear, I meant here: I even fixed it for you in my earlier post.
-
The types on the meta.xml.
-
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" />