Jump to content
  • 0

GameGuardian Script


Yusuf197321

Question

2 answers to this question

Recommended Posts

2 hours ago, Yusuf197321 said:

Hello there. I'm making a game guardian script. but there is a problem. I made a script but I need to freeze my value. I don't know how to freeze values in script. I don't know how to write. please help me.

I'm still a novice myself at making scripts but I'll try to help with some suggestions.

Try using the record script function within Game Guardian. That can give you an idea of what you need to do.

Here's one I just recorded and this was the result:

gg.searchNumber("500;1000", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)
gg.refineNumber("1000", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)
revert = gg.getResults(100000, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("1000", gg.TYPE_DWORD)
gg.processResume()

revert = gg.getResults(100000, nil, nil, nil, nil, nil, nil, nil, nil)
local t = gg.getResults(100000, nil, nil, nil, nil, nil, nil, nil, nil)
for i, v in ipairs(t) do
    if v.flags == gg.TYPE_DWORD then
        v.value = "1"
        v.freeze = true
    end
end
gg.addListItems(t)
t = nil

Link to comment
Share on other sites

6 hours ago, sammax71 said:

local t = gg.getResults(100000, nil, nil, nil, nil, nil, nil, nil, nil)

Save the results of your search as a table^

 

6 hours ago, sammax71 said:

for i, v in ipairs(t) do
    if v.flags == gg.TYPE_DWORD then
        v.value = "1"
        v.freeze = true
    end

^For i, v in pairs(*table's variable goes here*) loops through the table indexes all the values and preforms every action/conditional statement in the loop such as 

6 hours ago, sammax71 said:

if v.flags == gg.TYPE_DWORD

Which checks if the value of v's flag is equal in comparison to gg.TYPE_DWORD 

 

6 hours ago, sammax71 said:

 v.value = "1"
        v.freeze = true

v.value = 1 sets the value of v's in the table to 1 and v.freeze = sets the bool freeze to true

Sorry if it was a roundabout way of explaining or if it wasn't necessary to explain, sammax71 did well on providing a solution and using the record script function can be a great way to figure out the proper syntax for an unfamiliar function in gg, but I figured it wouldn't hurt to break down the part that deals specifically with freezing a value with a script.

Hopefully this helps!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.