Jump to content

Vladimir5

Members
  • Posts

    210
  • Joined

  • Last visited

Everything posted by Vladimir5

  1. Hm... Where's I can add me to permissions?
  2. It's code on gates with password... I need auto close/open gates... Gates with Marker:) local marker1 = createMarker( -1530, 483, 6.3, "cylinder", 10, 0, 255, 255, 0 ) local gate1 = createObject( 976, -1534.4836425781, 482.15185546875, 6.1875 ) local marker1 = createMarker( -1530, 483, 6.3, "cylinder", 10, 0, 255, 255, 0 ) local gate1 = createObject( 976, -1534.4836425781, 482.15185546875, 6.1875 ) -- Local Functions function openGate1( hitElement ) if (getElementType(hitElement) == "player" ) then moveObject( gate1, 1500, -1534.4836425781, 482.15185546875, 2.9375 ) end end addEventHandler( "onMarkerHit", marker1, openGate1 ) function closeGate1( leftElement ) if (getElementType(leftElement) == "player" ) then moveObject( gate1, 1500, -1534.4836425781, 482.15185546875, 6.1875 ) end end addEventHandler( "onMarkerLeave", marker1, closeGate1 ) Please help me! How do to gates open on ACL grouP!?
  3. local marker1 = createMarker( -1530, 483, 6.3, "cylinder", 10, 0, 255, 255, 0 ) local gate1 = createObject( 976, -1534.4836425781, 482.15185546875, 6.1875 ) -- Local Functions function openGate1( hitElement ) if (getElementType(hitElement) == "player" ) then moveObject( gate1, 1500, -1534.4836425781, 482.15185546875, 2.9375 ) end end addEventHandler( "onMarkerHit", marker1, openGate1 ) function closeGate1( leftElement ) if (getElementType(leftElement) == "player" ) then moveObject( gate1, 1500, -1534.4836425781, 482.15185546875, 6.1875 ) end end addEventHandler( "onMarkerLeave", marker1, closeGate1 ) It's code... Of owner SAUR's Its ok?
  4. Hi all! Who can give code gates witch will be open on ACL(Admins,moderators) Just I creating Freeroam/Role play server.
  5. I'll test it,thanks. Nice job man! Works!
  6. addEventHandler("onPlayerQuit",root, function() -- adding on player quit event hisAcc = getPlayerAccount(source) -- get the player account if hisAcc and not isGuestAccount(hisAcc) then -- if he is logged in hisTeam = getPlayerTeam(source) -- get his team if hisTeam then -- if got the team hisTeamName = getTeamName(hisTeam) -- get the team name if hisTeamName then setAccountData(hisAcc,"team",hisTeamName) -- save the team in value "team" at his account end outputDebugString( "Quit getTeamName "..tostring( hisTeamName ) ) end outputDebugString( "Quit getPlayerTeam "..tostring( hisTeam ) ) end outputDebugString( "Quit getPlayerAccount "..tostring( hisAcc ) ) end ) addEventHandler("onPlayerLogin",root, function(_,theCurrentAccount) -- adding on player login event hisAcc = theCurrentAccount hisTeamName = getAccountData(hisAcc,"team") -- get the saved value [ team name ] if hisTeamName then -- if got the value hisTeam = getTeamFromName(hisTeamName) -- get the team from the name saved if hisTeam then -- if got the team setPlayerTeam(source,hisTeam) -- set his team to the saved team end outputDebugString( "Login getTeamFromName "..tostring( hisTeam ) ) end outputDebugString( "Login getAccountData "..tostring( hisTeamName ) ) end ) It is server.lua
  7. I made script to save teams addEventHandler("onPlayerQuit",root, function() -- adding on player quit event hisAcc = getPlayerAccount(source) -- get the player account if hisAcc and not isGuestAccount(hisAcc) then -- if he is logged in hisTeam = getPlayerTeam(source) -- get his team if hisTeam then -- if got the team hisTeamName = getTeamName(hisTeam) -- get the team name if hisTeamName then setAccountData(hisAcc,"team",hisTeamName) -- save the team in value "team" at his account end outputDebugString( "Quit getTeamName "..tostring( hisTeamName ) ) end outputDebugString( "Quit getPlayerTeam "..tostring( hisTeam ) ) end outputDebugString( "Quit getPlayerAccount "..tostring( hisAcc ) ) end ) addEventHandler("onPlayerLogin",root, function(_,theCurrentAccount) -- adding on player login event hisAcc = theCurrentAccount hisTeamName = getAccountData(hisAcc,"team") -- get the saved value [ team name ] if hisTeamName then -- if got the value hisTeam = getTeamFromName(hisTeamName) -- get the team from the name saved if hisTeam then -- if got the team setPlayerTeam(source,hisTeam) -- set his team to the saved team end outputDebugString( "Login getTeamFromName "..tostring( hisTeam ) ) end outputDebugString( "Login getAccountData "..tostring( hisTeamName ) ) end ) And saw the error in Console... [2011-12-19 19:32:29] ERROR: Client triggered serverside event requestServerInfo, but event is not added serverside [2011-12-19 19:32:33] LOGOUT: Zer0 logged out as 'Zer0' [2011-12-19 19:32:36] INFO: Login getTeamFromName userdata: 00000072 [2011-12-19 19:32:36] INFO: Login getAccountData Team [2011-12-19 19:32:36] LOGIN: (Admin, Everyone) Zer0 successfully logged in as 'Zer0' (IP: 5.183.238.126 Serial: 0E24BA9A4E4A97C2C0991896E9D372E3) [2011-12-19 19:32:37] ERROR: Client triggered serverside event requestServerInfo, but event is not added serverside What for error?
×
×
  • Create New...