papam77 Posted February 24, 2013 Posted February 24, 2013 Hello i need any script for Donator Group in "TAB" When player connect to server he/she will add to "TAB" Donator group. <group name="Donators"> <acl name="Donators"></acl> <acl name="DonatorsTeam"></acl> <object name="user.papam77"></object> <object name="user.Vopic"></object> <acl name="Donators"> <right name="resource.votemanager" access="true"></right> <right name="general.adminpanel" access="false"></right> <right name="general.tab_players" access="false"></right> <right name="general.tab_resources" access="false"></right> <right name="general.tab_maps" access="false"></right> <right name="general.tab_server" access="false"></right> <right name="general.tab_bans" access="false"></right> <right name="general.tab_adminchat" access="false"></right> <right name="command.kick" access="false"></right> <right name="command.freeze" access="false"></right> <right name="command.mute" access="false"></right> <right name="command.setnick" access="false"></right> <right name="command.shout" access="false"></right> <right name="command.spectate" access="false"></right> <right name="command.slap" access="false"></right> <right name="command.setgroup" access="false"></right> <right name="command.sethealth" access="false"></right> <right name="command.setarmour" access="false"></right> <right name="command.setmoney" access="false"></right> <right name="command.setskin" access="false"></right> <right name="command.setteam" access="false"></right> <right name="command.giveweapon" access="false"></right> <right name="command.setstat" access="false"></right> <right name="command.jetpack" access="false"></right> <right name="command.warp" access="false"></right> <right name="command.setdimension" access="false"></right> <right name="command.setinterior" access="false"></right> <right name="command.givevehicle" access="false"></right> <right name="command.repair" access="false"></right> <right name="command.blow" access="false"></right> <right name="command.destroy" access="false"></right> <right name="command.customize" access="false"></right> <right name="command.setcolor" access="false"></right> <right name="command.setpaintjob" access="false"></right> <right name="command.listmessages" access="false"></right> <right name="command.readmessage" access="false"></right> <right name="command.listresources" access="false"></right> <right name="command.start" access="false"></right> <right name="command.stop" access="false"></right> <right name="command.stopall" access="false"></right> <right name="command.restart" access="false"></right> <right name="command.execute" access="false"></right> <right name="command.delete" access="false"></right> <right name="command.setpassword" access="false"></right> <right name="command.setwelcome" access="false"></right> <right name="command.setgame" access="false"></right> <right name="command.setmap" access="false"></right> <right name="command.setweather" access="false"></right> <right name="command.blendweather" access="false"></right> <right name="command.setblurlevel" access="false"></right> <right name="command.setwaveheight" access="false"></right> <right name="command.setskygradient" access="false"></right> <right name="command.setgamespeed" access="false"></right> <right name="command.setgravity" access="false"></right> <right name="command.settime" access="false"></right> <right name="function.shutdown" access="false"></right> <right name="command.setfpslimit" access="false"></right> <right name="command.ban" access="false"></right> <right name="command.unban" access="false"></right> <right name="command.banip" access="false"></right> <right name="command.unbanip" access="false"></right> <right name="command.banserial" access="false"></right> <right name="command.unbanserial" access="false"></right> <right name="command.listbans" access="false"></right> <right name="command.votemap" access="true"></right>
iPrestege Posted February 24, 2013 Posted February 24, 2013 createTeam setPlayerTeam "onPlayerJoin" or "onPlayerLogin"
iPrestege Posted February 24, 2013 Posted February 24, 2013 You wan't it on player login to check player group?
papam77 Posted February 24, 2013 Author Posted February 24, 2013 Yes, if player login automaticaly check it and add to group if player is in group Donators
iPrestege Posted February 24, 2013 Posted February 24, 2013 addEventHandler("onResourceStart", resourceRoot, function () Donator = createTeam ( "Donator group", 0, 255, 0 ) end ) addEventHandler("onPlayerLogin",root, function () if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Donators")) then setPlayerTeam(source, Donator) end end ) Server Side!
papam77 Posted February 24, 2013 Author Posted February 24, 2013 Player is in Team but only for 0.5sec. Why ?
iPrestege Posted February 24, 2013 Posted February 24, 2013 No That's Not Right? ? should to be in the team! any error? debugscript 3 ??
iPrestege Posted February 24, 2013 Posted February 24, 2013 Type it on console and you will get if there's error in this script ^
papam77 Posted February 24, 2013 Author Posted February 24, 2013 http://www.img.tpx.cz/uploads/errors.png
iPrestege Posted February 24, 2013 Posted February 24, 2013 (edited) Post the script not mine i mean that one have error . Edited February 24, 2013 by Guest
papam77 Posted February 24, 2013 Author Posted February 24, 2013 So work it now ! ty. But add to this KFCModerator and KFCSuperModerator in 1 group every admins mods smods function createAdminTeamOnStart () AdminTeam = createTeam ( "Proklatě Dobré Kuře", 0, 255, 255 )-- create a new team and named it 'Admin' end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler function setAdminTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then -- if he is admin setPlayerTeam(source, AdminTeam) -- set him to admin team end end addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) -- add an event handler
papam77 Posted February 24, 2013 Author Posted February 24, 2013 That i need to one group more acls ACL: KFCModerator KFCSuperModerator Admin
iPrestege Posted February 24, 2013 Posted February 24, 2013 function createAdminTeamOnStart () KFCMOD = createTeam ( "KFCModerator", 0, 255, 255 ) KFCSUP = createTeam ( "KFCSuperModerator", 0, 255, 255 ) ADMIN = createTeam ( "Admin", 0, 255, 255 ) end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler function setAdminTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then setPlayerTeam(source, ADMIN) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("KFCModerator")) then setPlayerTeam(source, KFCMOD) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("KFCSuperModerator")) then setPlayerTeam(source, KFCSUP) end end addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) Like that?
iPrestege Posted February 24, 2013 Posted February 24, 2013 Like That? function createAdminTeamOnStart () theTeam = createTeam ( "Proklatě Dobré Kuře", 0, 255, 255 ) end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler function setAdminTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then setPlayerTeam(source, theTeam) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("KFCModerator")) then setPlayerTeam(source, theTeam) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("KFCSuperModerator")) then setPlayerTeam(source, theTeam) end end addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now