[D]HCP

Ajuda com Proteção de Skin

Recommended Posts

Ao invés do Jogador ser Morto ao pegar a Skin, queria que apenas fosse setada (trocada) pra Skin 0

function skin ( )
    if ( getElementType ( source ) == "player" ) then
        if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Console")) then
		else
            if ( getElementModel ( source ) == 12 ) then
                killPed ( source )
            end
        end
    end
end
addEventHandler ( "onElementModelChange", root, skin )

 

Share this post


Link to post
addEventHandler ("onElementModelChange", root, function (thePlayer)
	if (getElementType (thePlayer) == "player") then
		if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Console")) then
			if (getElementModel (thePlayer) == 12) then
				setElementModel (thePlayer, 0)
			end
		end
	end
end)

 

  • Like 1

Share this post


Link to post
10 minutes ago, Jonas^ said:

addEventHandler ("onElementModelChange", root, function (thePlayer)
	if (getElementType (thePlayer) == "player") then
		if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Console")) then
			if (getElementModel (thePlayer) == 12) then
				setElementModel (thePlayer, 0)
			end
		end
	end
end)


 

Já tinha tentado com esse daí... e não deu novamente

Share this post


Link to post

Está dando errado pq vc está usando o parâmetro de função errado. Os parâmetros de função do evento onElementModelChange são oldModel e newModel, basta ler na Wiki.

addEventHandler ("onElementModelChange", root, function (oldModel, newModel)
	if (getElementType (source) == "player") then -- Neste evento, source = elemento que mudou de modelo/skin.
		if (newModel == 12) then -- Se o jogador está tentando pegar a skin de ID 12, então:
			if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then -- Se o jogador que está tentando trocar de skin for Console, então: (acho que vc cometeu erro de lógica, deveria ser quem NÃO FOR Console)
				setElementModel (source, 0) -- Seta skin 0 nele.
			end
		end
	end
end)

Também troquei a ordem das condições para a verificação mais leve acontecer primeiro. Motivos de otimização.

  • Like 1

Share this post


Link to post

Se ele tivesse com o debugscript 3 ativo já teria descoberto isso.

Share this post


Link to post
14 minutes ago, Lord Henry said:

Está dando errado pq vc está usando o parâmetro de função errado. Os parâmetros de função do evento onElementModelChange são oldModel e newModel, basta ler na Wiki.


addEventHandler ("onElementModelChange", root, function (oldModel, newModel)
	if (getElementType (source) == "player") then -- Neste evento, source = elemento que mudou de modelo/skin.
		if (newModel == 12) then -- Se o jogador está tentando pegar a skin de ID 12, então:
			if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then -- Se o jogador que está tentando trocar de skin for Console, então: (acho que vc cometeu erro de lógica, deveria ser quem NÃO FOR Console)
				setElementModel (source, 0) -- Seta skin 0 nele.
			end
		end
	end
end)


Também troquei a ordem das condições para a verificação mais leve acontecer primeiro. Motivos de otimização.

Então como ficaria na linha 4?
script.lua:4 Bad argument @ 'is Object ACL Group' [Expected acl-group at argument 2, gotboolean]

Share this post


Link to post
5 minutes ago, Lord Henry said:

Como está seu arquivo acl.xml? Que fica na pasta deathmatch do seu servidor.

<meta>
	<info author="KRATOS" />
	<script src="script.lua" type="SERVER" />
</meta>

 

Share this post


Link to post
2 minutes ago, Lord Henry said:

Eu disse acl.xml e não meta.xml

eu tirei o aviso mas o que acontece é que não seta a skin pra 0

<acl>
    <group name="Everyone">
        <acl name="Default"></acl>
        <object name="user.*"></object>
        <object name="resource.*"></object>
    </group>
    <group name="Moderator">
        <acl name="Moderator"></acl>
        <object name="resource.mapcycler"></object>
        <object name="resource.mapmanager"></object>
        <object name="resource.resourcemanager"></object>
        <object name="resource.votemanager"></object>
    </group>
    <group name="SuperModerator">
        <acl name="Moderator"></acl>
        <acl name="SuperModerator"></acl>
    </group>
    <group name="Admin">
        <acl name="Moderator"></acl>
        <acl name="SuperModerator"></acl>
        <acl name="Admin"></acl>
        <acl name="RPC"></acl>
        <object name="resource.admin"></object>
        <object name="resource.webadmin"></object>
        <object name="resource.acpanel"></object>
        <object name="resource.Painel-Login"></object>
        <object name="resource.save-system"></object>
        <object name="user.demolidor"></object>
        <object name="resource.[Scr]Joinquit"></object>
    </group>
    <group name="Console">
        <acl name="Moderator"></acl>
        <acl name="SuperModerator"></acl>
        <acl name="Admin"></acl>
        <acl name="RPC"></acl>
        <object name="user.Console"></object>
        <object name="user.Nutella"></object>
        <object name="user.Jaque"></object>
        <object name="user.Dudus2"></object>
        <object name="resource.gpp"></object>
        <object name="user.Marcelo.S"></object>
        <object name="user.Largaticha"></object>
        <object name="user.queste"></object>
        <object name="user.Douglas"></object>
    </group>
    <group name="RPC">
        <acl name="RPC"></acl>
        <object name="user.Douglas"></object>
    </group>
    <group name="MapEditor">
        <acl name="Default"></acl>
        <acl name="MapEditor"></acl>
        <object name="resource.editor_main"></object>
        <object name="resource.edf"></object>
    </group>
    <group name="raceACLGroup">
        <acl name="Default"></acl>
        <acl name="raceACL"></acl>
        <object name="resource.race"></object>
    </group>
    <group name="DevGroup">
        <acl name="DevACL"></acl>
    </group>
    <group name="autoGroup_mapmanager">
        <acl name="autoACL_mapmanager"></acl>
        <object name="resource.mapmanager"></object>
    </group>
    <group name="Chefao">
        <object name="user.Marcelo.S"></object>
    </group>
    <group name="Chefe">
        <object name="user.Nutella"></object>
    </group>
    <group name="SChefe">
        <object name="user.queste"></object>
    </group>
    <group name="Gerente.G"></group>
    <group name="Gerente">
        <object name="user.dkzinho157"></object>
    </group>
    <group name="AdminGeral"></group>
    <group name="AdminR7">
        <object name="user.demolidor"></object>
    </group>
    <group name="BracoDireito">
        <object name="user.NathanF"></object>
        <object name="user.Largaticha"></object>
    </group>
    <group name="TAG-R7"></group>
    <group name="supervisor"></group>
    <group name="GerenteG"></group>
    <group name="Supervisor"></group>
    <group name="QT">
        <object name="user.Jaque"></object>
    </group>
    <group name="CDT">
        <object name="user.Douglas"></object>
    </group>
    <group name="FN">
        <object name="user.Ribeiroo"></object>
        <object name="user.AsTx"></object>
        <object name="user.darkanjo"></object>
    </group>
    <group name="DDB"></group>
    <group name="DDBA"></group>
    <group name="GDB"></group>
    <group name="ATL">
        <object name="user.zk777"></object>
    </group>
    <group name="A">
        <object name="user.dhcp"></object>
    </group>
    <acl name="Default">
        <right name="general.ModifyOtherObjects" access="false"></right>
        <right name="general.http" 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.gamemode" access="false"></right>
        <right name="command.changemode" access="false"></right>
        <right name="command.changemap" access="false"></right>
        <right name="command.stopmode" access="false"></right>
        <right name="command.stopmap" access="false"></right>
        <right name="command.skipmap" access="false"></right>
        <right name="command.restart" access="false"></right>
        <right name="command.refresh" access="false"></right>
        <right name="command.refreshall" access="false"></right>
        <right name="command.addaccount" access="false"></right>
        <right name="command.delaccount" access="false"></right>
        <right name="command.debugscript" access="false"></right>
        <right name="command.chgpass" access="false"></right>
        <right name="command.loadmodule" access="false"></right>
        <right name="command.unloadmodule" access="false"></right>
        <right name="command.reloadmodule" access="false"></right>
        <right name="command.upgrade" access="false"></right>
        <right name="command.mute" access="false"></right>
        <right name="command.crun" access="false"></right>
        <right name="command.srun" access="false"></right>
        <right name="command.run" access="false"></right>
        <right name="command.unmute" access="false"></right>
        <right name="command.kick" access="false"></right>
        <right name="command.ban" access="false"></right>
        <right name="command.banip" access="false"></right>
        <right name="command.unbanip" access="false"></right>
        <right name="command.reloadbans" access="false"></right>
        <right name="command.shutdown" access="false"></right>
        <right name="command.install" access="false"></right>
        <right name="command.aexec" access="false"></right>
        <right name="command.whois" access="false"></right>
        <right name="command.whowas" access="false"></right>
        <right name="command.aclrequest" access="false"></right>
        <right name="command.authserial" access="false"></right>
        <right name="command.reloadacl" access="false"></right>
        <right name="function.executeCommandHandler" access="false"></right>
        <right name="function.setPlayerMuted" access="false"></right>
        <right name="function.addAccount" access="false"></right>
        <right name="function.addBan" access="false"></right>
        <right name="function.setUnbanTime" access="false"></right>
        <right name="function.setBanAdmin" access="false"></right>
        <right name="function.setBanReason" access="false"></right>
        <right name="function.setBanNick" access="false"></right>
        <right name="function.removeBan" access="false"></right>
        <right name="function.removeAccount" access="false"></right>
        <right name="function.setAccountName" access="false"></right>
        <right name="function.setAccountPassword" access="false"></right>
        <right name="function.kickPlayer" access="false"></right>
        <right name="function.banPlayer" access="false"></right>
        <right name="function.getBans" access="false"></right>
        <right name="function.reloadBans" access="false"></right>
        <right name="function.setServerPassword" access="false"></right>
        <right name="function.getServerPassword" access="false"></right>
        <right name="function.callRemote" access="false"></right>
        <right name="function.fetchRemote" access="false"></right>
        <right name="function.startResource" access="false"></right>
        <right name="function.stopResource" access="false"></right>
        <right name="function.restartResource" access="false"></right>
        <right name="function.createResource" access="false"></right>
        <right name="function.copyResource" access="false"></right>
        <right name="function.addResourceMap" access="false"></right>
        <right name="function.addResourceConfig" access="false"></right>
        <right name="function.removeResourceFile" access="false"></right>
        <right name="function.setResourceDefaultSetting" access="false"></right>
        <right name="function.removeResourceDefaultSetting" access="false"></right>
        <right name="function.redirectPlayer" access="false"></right>
        <right name="function.aclReload" access="false"></right>
        <right name="function.aclSave" access="false"></right>
        <right name="function.aclCreate" access="false"></right>
        <right name="function.aclDestroy" access="false"></right>
        <right name="function.aclSetRight" access="false"></right>
        <right name="function.aclRemoveRight" access="false"></right>
        <right name="function.aclCreateGroup" access="false"></right>
        <right name="function.aclDestroyGroup" access="false"></right>
        <right name="function.aclGroupAddACL" access="false"></right>
        <right name="function.aclGroupRemoveACL" access="false"></right>
        <right name="function.aclGroupAddObject" access="false"></right>
        <right name="function.aclGroupRemoveObject" access="false"></right>
        <right name="function.refreshResources" access="false"></right>
        <right name="function.setServerConfigSetting" access="false"></right>
        <right name="function.updateResourceACLRequest" access="false"></right>
        <right name="function.shutdown" access="false"></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.freeze" 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.createteam" access="false"></right>
        <right name="command.destroyteam" access="false"></right>
        <right name="command.givevehicle" access="false"></right>
        <right name="command.repair" access="false"></right>
        <right name="command.blowvehicle" access="false"></right>
        <right name="command.destroyvehicle" 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.delete" access="false"></right>
        <right name="command.execute" 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="command.setfpslimit" access="false"></right>
        <right name="command.unban" access="false"></right>
        <right name="command.banserial" access="false"></right>
        <right name="command.unbanserial" access="false"></right>
        <right name="command.listbans" access="false"></right>
    </acl>
    <acl name="Moderator">
        <right name="general.ModifyOtherObjects" access="false"></right>
        <right name="command.gamemode" access="true"></right>
        <right name="command.changemode" access="true"></right>
        <right name="command.changemap" access="true"></right>
        <right name="command.stopmode" access="true"></right>
        <right name="command.stopmap" access="true"></right>
        <right name="command.skipmap" access="true"></right>
        <right name="command.mute" access="true"></right>
        <right name="command.unmute" access="true"></right>
        <right name="command.whois" access="true"></right>
        <right name="command.whowas" access="true"></right>
        <right name="function.setPlayerMuted" access="true"></right>
        <right name="function.kickPlayer" access="true"></right>
        <right name="function.banPlayer" access="true"></right>
        <right name="function.getBans" access="true"></right>
        <right name="function.addBan" access="true"></right>
        <right name="function.startResource" access="true"></right>
        <right name="function.stopResource" access="true"></right>
        <right name="function.restartResource" access="true"></right>
        <right name="function.redirectPlayer" access="true"></right>
        <right name="general.adminpanel" access="true"></right>
        <right name="general.tab_players" access="true"></right>
        <right name="general.tab_resources" access="false"></right>
        <right name="general.tab_maps" access="false"></right>
        <right name="general.tab_server" access="true"></right>
        <right name="general.tab_bans" access="false"></right>
        <right name="general.tab_adminchat" access="true"></right>
        <right name="command.kick" access="false"></right>
        <right name="command.freeze" access="true"></right>
        <right name="command.setnick" access="true"></right>
        <right name="command.shout" access="true"></right>
        <right name="command.spectate" access="true"></right>
        <right name="command.slap" access="true"></right>
        <right name="command.setgroup" access="false"></right>
        <right name="command.sethealth" access="true"></right>
        <right name="command.setarmour" access="true"></right>
        <right name="command.setmoney" access="false"></right>
        <right name="command.setskin" access="true"></right>
        <right name="command.setteam" access="true"></right>
        <right name="command.giveweapon" access="true"></right>
        <right name="command.setstat" access="true"></right>
        <right name="command.jetpack" access="true"></right>
        <right name="command.warp" access="true"></right>
        <right name="command.setdimension" access="true"></right>
        <right name="command.setinterior" access="true"></right>
        <right name="command.createteam" access="false"></right>
        <right name="command.destroyteam" access="false"></right>
        <right name="command.givevehicle" access="true"></right>
        <right name="command.repair" access="true"></right>
        <right name="command.blowvehicle" access="true"></right>
        <right name="command.destroyvehicle" access="true"></right>
        <right name="command.customize" access="true"></right>
        <right name="command.setcolor" access="true"></right>
        <right name="command.setpaintjob" access="true"></right>
        <right name="command.listmessages" access="true"></right>
        <right name="command.readmessage" access="true"></right>
        <right name="command.listresources" access="true"></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.delete" access="false"></right>
        <right name="command.restart" access="false"></right>
        <right name="command.execute" 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="true"></right>
        <right name="command.blendweather" access="true"></right>
        <right name="command.setblurlevel" access="true"></right>
        <right name="command.setwaveheight" access="true"></right>
        <right name="command.setskygradient" access="true"></right>
        <right name="command.setgamespeed" access="true"></right>
        <right name="command.setgravity" access="true"></right>
        <right name="command.settime" access="true"></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>
    </acl>
    <acl name="SuperModerator">
        <right name="general.ModifyOtherObjects" access="false"></right>
        <right name="command.start" access="true"></right>
        <right name="command.stop" access="true"></right>
        <right name="command.restart" access="true"></right>
        <right name="command.kick" access="true"></right>
        <right name="command.ban" access="true"></right>
        <right name="command.banip" access="true"></right>
        <right name="command.unbanip" access="true"></right>
        <right name="command.reloadbans" access="true"></right>
        <right name="command.refresh" access="true"></right>
        <right name="command.refreshall" access="true"></right>
        <right name="command.loadmodule" access="true"></right>
        <right name="command.unloadmodule" access="true"></right>
        <right name="command.reloadmodule" access="true"></right>
        <right name="command.addaccount" access="true"></right>
        <right name="command.delaccount" access="true"></right>
        <right name="command.chgpass" access="true"></right>
        <right name="function.addAccount" access="true"></right>
        <right name="function.removeAccount" access="true"></right>
        <right name="function.setAccountName" access="true"></right>
        <right name="function.setAccountPassword" access="true"></right>
        <right name="general.adminpanel" access="true"></right>
        <right name="general.tab_players" access="true"></right>
        <right name="general.tab_resources" access="true"></right>
        <right name="general.tab_maps" access="true"></right>
        <right name="general.tab_server" access="true"></right>
        <right name="general.tab_bans" access="true"></right>
        <right name="general.tab_adminchat" access="true"></right>
        <right name="command.freeze" access="true"></right>
        <right name="command.mute" access="true"></right>
        <right name="command.setnick" access="true"></right>
        <right name="command.shout" access="true"></right>
        <right name="command.spectate" access="true"></right>
        <right name="command.slap" access="true"></right>
        <right name="command.setgroup" access="false"></right>
        <right name="command.sethealth" access="true"></right>
        <right name="command.setarmour" access="true"></right>
        <right name="command.setmoney" access="true"></right>
        <right name="command.setskin" access="true"></right>
        <right name="command.setteam" access="true"></right>
        <right name="command.giveweapon" access="true"></right>
        <right name="command.setstat" access="true"></right>
        <right name="command.jetpack" access="true"></right>
        <right name="command.warp" access="true"></right>
        <right name="command.setdimension" access="true"></right>
        <right name="command.setinterior" access="true"></right>
        <right name="command.createteam" access="true"></right>
        <right name="command.destroyteam" access="true"></right>
        <right name="command.givevehicle" access="true"></right>
        <right name="command.repair" access="true"></right>
        <right name="command.blowvehicle" access="true"></right>
        <right name="command.destroyvehicle" access="true"></right>
        <right name="command.customize" access="true"></right>
        <right name="command.setcolor" access="true"></right>
        <right name="command.setpaintjob" access="true"></right>
        <right name="command.listmessages" access="true"></right>
        <right name="command.readmessage" access="true"></right>
        <right name="command.listresources" access="true"></right>
        <right name="command.stopall" access="false"></right>
        <right name="command.delete" access="false"></right>
        <right name="command.execute" access="false"></right>
        <right name="command.setpassword" access="true"></right>
        <right name="command.setwelcome" access="true"></right>
        <right name="command.setgame" access="true"></right>
        <right name="command.setmap" access="true"></right>
        <right name="command.setweather" access="true"></right>
        <right name="command.blendweather" access="true"></right>
        <right name="command.setblurlevel" access="true"></right>
        <right name="command.setwaveheight" access="true"></right>
        <right name="command.setskygradient" access="true"></right>
        <right name="command.setgamespeed" access="true"></right>
        <right name="command.setgravity" access="true"></right>
        <right name="command.settime" access="true"></right>
        <right name="command.setfpslimit" access="false"></right>
        <right name="command.unban" access="true"></right>
        <right name="command.banserial" access="true"></right>
        <right name="command.unbanserial" access="true"></right>
        <right name="command.listbans" access="true"></right>
    </acl>
    <acl name="Admin">
        <right name="general.ModifyOtherObjects" access="true"></right>
        <right name="general.http" access="true"></right>
        <right name="command.shutdown" access="true"></right>
        <right name="command.install" access="true"></right>
        <right name="command.aexec" access="true"></right>
        <right name="command.debugscript" access="true"></right>
        <right name="command.upgrade" access="true"></right>
        <right name="command.crun" access="true"></right>
        <right name="command.srun" access="true"></right>
        <right name="command.run" access="true"></right>
        <right name="command.aclrequest" access="true"></right>
        <right name="command.authserial" access="true"></right>
        <right name="command.reloadacl" access="true"></right>
        <right name="function.addBan" access="true"></right>
        <right name="function.setUnbanTime" access="true"></right>
        <right name="function.setBanAdmin" access="true"></right>
        <right name="function.setBanReason" access="true"></right>
        <right name="function.setBanNick" access="true"></right>
        <right name="function.removeBan" access="true"></right>
        <right name="function.reloadBans" access="true"></right>
        <right name="function.executeCommandHandler" access="true"></right>
        <right name="function.setServerPassword" access="true"></right>
        <right name="function.getServerPassword" access="true"></right>
        <right name="function.createResource" access="true"></right>
        <right name="function.copyResource" access="true"></right>
        <right name="function.addResourceMap" access="true"></right>
        <right name="function.addResourceConfig" access="true"></right>
        <right name="function.removeResourceFile" access="true"></right>
        <right name="function.setResourceDefaultSetting" access="true"></right>
        <right name="function.removeResourceDefaultSetting" access="true"></right>
        <right name="function.aclReload" access="true"></right>
        <right name="function.aclSave" access="true"></right>
        <right name="function.aclCreate" access="true"></right>
        <right name="function.aclDestroy" access="true"></right>
        <right name="function.aclSetRight" access="true"></right>
        <right name="function.aclRemoveRight" access="true"></right>
        <right name="function.aclCreateGroup" access="true"></right>
        <right name="function.aclDestroyGroup" access="true"></right>
        <right name="function.aclGroupAddACL" access="true"></right>
        <right name="function.aclGroupRemoveACL" access="true"></right>
        <right name="function.aclGroupAddObject" access="true"></right>
        <right name="function.aclGroupRemoveObject" access="true"></right>
        <right name="function.refreshResources" access="true"></right>
        <right name="function.setServerConfigSetting" access="true"></right>
        <right name="function.updateResourceACLRequest" access="true"></right>
        <right name="function.shutdown" access="true"></right>
        <right name="general.adminpanel" access="true"></right>
        <right name="general.tab_players" access="true"></right>
        <right name="general.tab_resources" access="true"></right>
        <right name="general.tab_maps" access="true"></right>
        <right name="general.tab_server" access="true"></right>
        <right name="general.tab_bans" access="true"></right>
        <right name="general.tab_adminchat" access="true"></right>
        <right name="command.kick" access="true"></right>
        <right name="command.freeze" access="true"></right>
        <right name="command.mute" access="true"></right>
        <right name="command.setnick" access="true"></right>
        <right name="command.shout" access="true"></right>
        <right name="command.spectate" access="true"></right>
        <right name="command.slap" access="true"></right>
        <right name="command.setgroup" access="true"></right>
        <right name="command.sethealth" access="true"></right>
        <right name="command.setarmour" access="true"></right>
        <right name="command.setmoney" access="true"></right>
        <right name="command.setskin" access="true"></right>
        <right name="command.setteam" access="true"></right>
        <right name="command.giveweapon" access="true"></right>
        <right name="command.setstat" access="true"></right>
        <right name="command.jetpack" access="true"></right>
        <right name="command.warp" access="true"></right>
        <right name="command.setdimension" access="true"></right>
        <right name="command.setinterior" access="true"></right>
        <right name="command.createteam" access="true"></right>
        <right name="command.destroyteam" access="true"></right>
        <right name="command.givevehicle" access="true"></right>
        <right name="command.repair" access="true"></right>
        <right name="command.blowvehicle" access="true"></right>
        <right name="command.destroyvehicle" access="true"></right>
        <right name="command.customize" access="true"></right>
        <right name="command.setcolor" access="true"></right>
        <right name="command.setpaintjob" access="true"></right>
        <right name="command.listmessages" access="true"></right>
        <right name="command.readmessage" access="true"></right>
        <right name="command.listresources" access="true"></right>
        <right name="command.start" access="true"></right>
        <right name="command.stop" access="true"></right>
        <right name="command.stopall" access="false"></right>
        <right name="command.delete" access="true"></right>
        <right name="command.restart" access="true"></right>
        <right name="command.execute" access="true"></right>
        <right name="command.setpassword" access="true"></right>
        <right name="command.setwelcome" access="true"></right>
        <right name="command.setgame" access="true"></right>
        <right name="command.setmap" access="true"></right>
        <right name="command.setweather" access="true"></right>
        <right name="command.blendweather" access="true"></right>
        <right name="command.setblurlevel" access="true"></right>
        <right name="command.setwaveheight" access="true"></right>
        <right name="command.setskygradient" access="true"></right>
        <right name="command.setgamespeed" access="true"></right>
        <right name="command.setgravity" access="true"></right>
        <right name="command.settime" access="true"></right>
        <right name="command.setfpslimit" access="true"></right>
        <right name="command.ban" access="true"></right>
        <right name="command.unban" access="true"></right>
        <right name="command.banip" access="true"></right>
        <right name="command.unbanip" access="true"></right>
        <right name="command.banserial" access="true"></right>
        <right name="command.unbanserial" access="true"></right>
        <right name="command.listbans" access="true"></right>
    </acl>
    <acl name="RPC">
        <right name="function.callRemote" access="true"></right>
        <right name="function.fetchRemote" 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.createteam" access="false"></right>
        <right name="command.destroyteam" access="false"></right>
        <right name="command.givevehicle" access="false"></right>
        <right name="command.repair" access="false"></right>
        <right name="command.blowvehicle" access="false"></right>
        <right name="command.destroyvehicle" 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.delete" access="false"></right>
        <right name="command.restart" access="false"></right>
        <right name="command.execute" 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="command.setfpslimit" access="false"></right>
        <right name="function.shutdown" 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>
    </acl>
    <acl name="MapEditor">
        <right name="general.ModifyOtherObjects" access="true"></right>
        <right name="function.startResource" access="true"></right>
        <right name="function.stopResource" access="true"></right>
        <right name="function.restartResource" access="true"></right>
        <right name="function.createResource" access="true"></right>
        <right name="function.copyResource" access="true"></right>
        <right name="function.renameResource" access="true"></right>
        <right name="function.deleteResource" access="true"></right>
        <right name="function.addResourceMap" access="true"></right>
        <right name="function.addResourceConfig" access="true"></right>
        <right name="function.removeResourceFile" access="true"></right>
        <right name="function.setResourceDefaultSetting" access="true"></right>
        <right name="function.removeResourceDefaultSetting" access="true"></right>
        <right name="function.xmlLoadFile" access="true"></right>
        <right name="function.refreshResources" 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.createteam" access="false"></right>
        <right name="command.destroyteam" access="false"></right>
        <right name="command.givevehicle" access="false"></right>
        <right name="command.repair" access="false"></right>
        <right name="command.blowvehicle" access="false"></right>
        <right name="command.destroyvehicle" 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.delete" access="false"></right>
        <right name="command.restart" access="false"></right>
        <right name="command.execute" 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="command.setfpslimit" access="false"></right>
        <right name="function.shutdown" 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>
    </acl>
    <acl name="raceACL">
        <right name="general.ModifyOtherObjects" access="true"></right>
        <right name="function.xmlLoadFile" access="true"></right>
        <right name="function.startResource" access="true"></right>
        <right name="function.stopResource" access="true"></right>
        <right name="function.restartResource" 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.createteam" access="false"></right>
        <right name="command.destroyteam" access="false"></right>
        <right name="command.givevehicle" access="false"></right>
        <right name="command.repair" access="false"></right>
        <right name="command.blowvehicle" access="false"></right>
        <right name="command.destroyvehicle" 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.delete" access="false"></right>
        <right name="command.restart" access="false"></right>
        <right name="command.execute" 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="command.setfpslimit" access="false"></right>
        <right name="function.shutdown" 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>
    </acl>
    <acl name="DevACL">
        <right name="resource.performancebrowser.http" access="true"></right>
        <right name="resource.ajax.http" 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.createteam" access="false"></right>
        <right name="command.destroyteam" access="false"></right>
        <right name="command.givevehicle" access="false"></right>
        <right name="command.repair" access="false"></right>
        <right name="command.blowvehicle" access="false"></right>
        <right name="command.destroyvehicle" 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.delete" access="false"></right>
        <right name="command.restart" access="false"></right>
        <right name="command.execute" 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="command.setfpslimit" access="false"></right>
        <right name="function.shutdown" 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>
    </acl>
    <acl name="autoACL_mapmanager">
        <right name="function.startResource" access="false" who="" pending="true" date=""></right>
        <right name="function.restartResource" access="false" who="" pending="true" date=""></right>
        <right name="function.stopResource" access="false" who="" pending="true" date=""></right>
        <right name="function.refreshResources" access="false" who="" pending="true" date=""></right>
    </acl>
</acl>

 

Share this post


Link to post
3 minutes ago, [D]HCP said:

Você está logado com alguma destas contas?

  • Nutella
  • Jaque
  • Dudus2
  • Marcelo.S
  • Largaticha
  • queste
  • Douglas

Share this post


Link to post

Só pra lembrar que:

A acl 'Admin' tem as mesmas permissões da console in-game.

Repare bem nas acl do grupo 'Admin' e no grupo 'Console'

<acl name="Moderator"></acl>
<acl name="SuperModerator"></acl>
<acl name="Admin"></acl>
<acl name="RPC"></acl>

 

Share this post


Link to post
52 minutes ago, Lord Henry said:

Você está logado com alguma destas contas?

  • Nutella
  • Jaque
  • Dudus2
  • Marcelo.S
  • Largaticha
  • queste
  • Douglas

Não. Mudei o script pra ACL "A"

mas mesmo me removendo de lá e tento pegar skin não acontece nada, no caso, seria setar skin pra 0
 

  1. <group name="A">
  2. <object name="user.dhcp"></object>

Share this post


Link to post

Coloque você mesmo na ACL A e tente novamente.

1 hour ago, [D]HCP said:

<meta>
	<info author="KRATOS" />
	<script src="script.lua" type="SERVER" />
</meta>

 

Não sei se faz diferença, mas coloque o SERVER todo em letra minúscula.

Share this post


Link to post
9 minutes ago, Lord Henry said:

Coloque você mesmo na ACL A e tente novamente.

Não sei se faz diferença, mas coloque o SERVER todo em letra minúscula.

Pois é, ainda não foi

Share this post


Link to post

Eu testei aqui e parece que ele não seta a skin, mas ele verifica o escopo e retorna a mensagem, testa ai @Lord Henry

 

addEventHandler ("onElementModelChange", root, function (oldModel, newModel)
	if (getElementType (source) == "player") then -- Neste evento, source = elemento que mudou de modelo/skin.
		if not isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then -- Se o jogador que está tentando trocar de skin não for Console, então:
			if (newModel == 12) then -- Se o jogador está tentando pegar a skin de ID 12, então:
				outputChatBox ("Esta skin é privada! Você não pode usar ela.", source, 255, 30, 30)
				setElementModel (source, 0) -- Seta skin 0 nele.
			end
		end
	end
end)

 

Share this post


Link to post

Realmente há um bug e ele não funciona se for instantâneo. Criando um pequeno timer irá contornar esse bug.

addEventHandler ("onElementModelChange", root, function (oldModel, newModel)
	if (getElementType (source) == "player") then -- Neste evento, source = elemento que mudou de modelo/skin.
		if not isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then -- Se o jogador que está tentando trocar de skin não for Console, então:
			if (newModel == 12) then -- Se o jogador está tentando pegar a skin de ID 12, então:
				outputChatBox ("Esta skin é privada! Você não pode usar ela.", source, 255, 30, 30)
				setTimer (function (thePlayer) -- source não existe dentro de timers, por isso passa ele por um parâmetro de função.
					setElementModel (thePlayer, 0) -- Seta skin 0 nele. (não funciona se for instantâneo, por isso o timer)
				end, 100, 1, source)
			end
		end
	end
end)

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.