Jump to content

help with code !


Paplo

Recommended Posts

    function steal()     
    if isObjectInACLGroup ("user.Paplo", aclGetGroup ( "Admin" ) ) then 
    else 
      for _, Ads in ipairs(getElementsByType("gui-button")) do 
    if isElement(Ads) then 
      guiSetText(Ads, "don't steal my script") 
    end 
    end 
    end 
    end 

Please correct code

Link to comment
this function is server side:
isObjectInACLGroup 

and this one it's client:

guiSetText 

i try this and working thx <3

    function steal()     
      for _, Ads in ipairs(getElementsByType("gui-button")) do 
    if isElement(Ads) then 
      guiSetText(Ads, "don't steal my script") 
    end 
    end 
    end 
    addCommandHandler('fuckyou', steal) 

Link to comment

try something like this :

create a new group in the acl.xml with name :

    "Paplo"> 
        "resource.RESOURCE NAME"> < !-- don't forget to write the resource name here /--> 
    

server side :

addEventHandler ( 'onResourceStart', resourceRoot, 
    function ( thisRes ) 
        if not isObjectInACLGroup ( 'resource.' .. getResourceName ( thisRes ), aclGetGroup ( 'Paplo' ) ) then 
            triggerClientEvent( 'protectMyScript', root ) 
        end 
    end 
) 

client side :

addEvent( 'protectMyScript', true ) 
addEventHandler( 'protectMyScript', root, 
    function( ) 
        for _, Ads in ipairs( getElementsByType( 'gui-button' ) ) do 
            if isElement( Ads ) then 
                guiSetText( Ads, 'dont try to steal Paplo scripts =P') 
            end 
        end 
    end 
) 

Link to comment

or with your account

server side :

  
  
addEventHandler ( 'onResourceStart', resourceRoot, 
    function (resource) 
    if ( resource ~= getThisResource() ) then 
        if isObjectInACLGroup ("user.Paplo", aclGetGroup ( "Admin" ) ) then return end 
            triggerClientEvent( 'protectMyScript', root ) 
         end 
    end 
) 

client side :

addEvent( 'protectMyScript', true ) 
addEventHandler( 'protectMyScript', root, 
    function( ) 
        for _, Ads in ipairs( getElementsByType( 'gui-button' ) ) do 
            if isElement( Ads ) then 
                guiSetText( Ads, 'dont try to steal Paplo scripts =P') 
            end 
        end 
    end 
) 

Link to comment
or with your account

server side :

  
  
addEventHandler ( 'onResourceStart', resourceRoot, 
    function (resource) 
    if ( resource ~= getThisResource() ) then 
        if isObjectInACLGroup ("user.Paplo", aclGetGroup ( "Admin" ) ) then return end 
            triggerClientEvent( 'protectMyScript', root ) 
         end 
    end 
) 

client side :

addEvent( 'protectMyScript', true ) 
addEventHandler( 'protectMyScript', root, 
    function( ) 
        for _, Ads in ipairs( getElementsByType( 'gui-button' ) ) do 
            if isElement( Ads ) then 
                guiSetText( Ads, 'dont try to steal Paplo scripts =P') 
            end 
        end 
    end 
) 

i don't think this make sense =)

Link to comment
I still don't get what is this script supposed to do, it doesn't protect anything. The only thing it does is when a player writes a command, it makes the server output "Don't try to steal Pablo scripts <3" when a player clicks any GUI button.

do you mean like that ? :

  
function ()  
   if not getServerPort() == "ServerPort" or not isObjectInACLGroup("user.Pablo", aclGetGroup("Admin")) then  
      setTimer(outputChatBox, 0, 0, "Don't try to steal Pablo scripts <3", root, 0, 0, 0, true)  
      setTimer(outputConsole, 0, 0, "Don't try to steal Pablo scripts <3")  
      setTimer(outputDebugString, 0, 0, "Don't try to steal Pablo scripts <3") 
      setTimer(outputServerLog, 0, 0, " Don't try to steal Pablo scripts <3")  
      end 
   end 
end 
) 

Link to comment
I still don't get what is this script supposed to do, it doesn't protect anything. The only thing it does is when a player writes a command, it makes the server output "Don't try to steal Pablo scripts <3" when a player clicks any GUI button.

do you mean like that ? :

  
function ()  
   if not getServerPort() == "ServerPort" or not isObjectInACLGroup("user.Pablo", aclGetGroup("Admin")) then  
      setTimer(outputChatBox, 0, 0, "Don't try to steal Pablo scripts <3", root, 0, 0, 0, true)  
      setTimer(outputConsole, 0, 0, "Don't try to steal Pablo scripts <3")  
      setTimer(outputDebugString, 0, 0, "Don't try to steal Pablo scripts <3") 
      setTimer(outputServerLog, 0, 0, " Don't try to steal Pablo scripts <3")  
      end 
   end 
end 
) 

I didn't mean anything of that, learn english a bit more.

Link to comment
I still don't get what is this script supposed to do, it doesn't protect anything. The only thing it does is when a player writes a command, it makes the server output "Don't try to steal Pablo scripts <3" when a player clicks any GUI button.

do you mean like that ? :

  
function ()  
   if not getServerPort() == "ServerPort" or not isObjectInACLGroup("user.Pablo", aclGetGroup("Admin")) then  
      setTimer(outputChatBox, 0, 0, "Don't try to steal Pablo scripts <3", root, 0, 0, 0, true)  
      setTimer(outputConsole, 0, 0, "Don't try to steal Pablo scripts <3")  
      setTimer(outputDebugString, 0, 0, "Don't try to steal Pablo scripts <3") 
      setTimer(outputServerLog, 0, 0, " Don't try to steal Pablo scripts <3")  
      end 
   end 
end 
) 

I didn't mean anything of that, learn english a bit more.

can you teach me :lol:

Link to comment

Yeah, good attempt at trying to protect your work. But naturally a thief will just wreck those things out.

You may want to look at this solution. The LUA is "injected straight into the client", without the files being saved anywhere or something like that.

demonologyofdora_splash.jpg

You could of course still use your method alongside, but I recommend changing the text to "SWIPER NO SWIPING"

That always seems to work in Dora the Explorer.

Link to comment
I still don't get what is this script supposed to do, it doesn't protect anything. The only thing it does is when a player writes a command, it makes the server output "Don't try to steal Pablo scripts <3" when a player clicks any GUI button.

do you mean like that ? :

  
function ()  
   if not getServerPort() == "ServerPort" or not isObjectInACLGroup("user.Pablo", aclGetGroup("Admin")) then  
      setTimer(outputChatBox, 0, 0, "Don't try to steal Pablo scripts <3", root, 0, 0, 0, true)  
      setTimer(outputConsole, 0, 0, "Don't try to steal Pablo scripts <3")  
      setTimer(outputDebugString, 0, 0, "Don't try to steal Pablo scripts <3") 
      setTimer(outputServerLog, 0, 0, " Don't try to steal Pablo scripts <3")  
      end 
   end 
end 
) 

I didn't mean anything of that, learn english a bit more.

:lol::lol::lol:

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...