Jump to content

Antiblur, godmode, warp command and one-tap nitrous scripts?


Azortharion

Recommended Posts

So basically what the title says.

I Googled and got to many threads on the forum, copying Castillo's many scripts, and having my friend write a meta.xml for them. (I have no clue of all this).

In-game, however, I could get the "Godmode has been Enabled" thingie in the chatbox, but it had no effect. My admin friend and I could still kill each other. We added the resource (called it godmode) to the admin ACL but it did not help.

Could someone throw in a script here that includes a command + an Admin-only check?

Thanks a lot for helping out tarded me.

EDIT: How come /warp and /goto do not work on my server? Can someone add a slash command script, simply "/goto will warp you to their location?

Also needing an antiblur script that removes the blur when you drive fast and use nitrous.

ALSO needing a one-tap nitrous system (e.g, instead of nitrous charges, I want it to be like NFS-style, you hold it down and release when you want it to stop).

--

It's a whole bunch to ask, but I'd kill for those things on my server!

Edited by Guest
Link to comment
We don't accept requests here, learn to script or pay someone to do it.

You could post your current script and see if we can find the problem.

Well alright, written by yourself under "server" and "client", I called the script files simply "server.lua,", and "client.lua".

For the godmode:

server:

function toggleGodMode(thePlayer) 
local account = getPlayerAccount(thePlayer) 
if (not account or isGuestAccount(account)) then return end 
local accountName = getAccountName(account) 
if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then 
    if getElementData(thePlayer,"invincible") then 
        setElementData(thePlayer,"invincible",false) 
        outputChatBox("God Mode is now Disabled.",thePlayer,0,255,0) 
    else 
        setElementData(thePlayer,"invincible",true) 
        outputChatBox("God Mode is now Enabled.",thePlayer,0,255,0) 
        end 
    end 
end 
addCommandHandler("godmode",toggleGodMode) 

Client:

addEventHandler ( "onClientPlayerDamage",root, 
function () 
    if getElementData(source,"invincible") then 
        cancelEvent() 
    end 
end) 
  
addEventHandler("onClientPlayerStealthKill",localPlayer, 
function (targetPlayer) 
    if getElementData(targetPlayer,"invincible") then 
        cancelEvent() 
    end 
end) 

And the meta.xml my friend made:

<meta> 
    <script src="client.lua" /> 
    <script src="server.lua" /> 
    
</meta> 

Link to comment

Exactly, the client script has to be defined as client side in meta.xml

P.S:

function toggleGodMode ( thePlayer ) 
    local account = getPlayerAccount ( thePlayer ) 
    if ( not account or isGuestAccount ( account ) ) then 
        return 
    end 
  
    local accountName = getAccountName ( account ) 
    if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then 
        local state = ( not getElementData ( thePlayer, "invincible" ) ) 
        setElementData ( thePlayer, "invincible", state ) 
        outputChatBox ( "God Mode is now ".. ( state and "Enabled" or "Disabled" ) ..".", thePlayer, 0, 255, 0 ) 
    end 
end 
addCommandHandler ( "godmode", toggleGodMode ) 

same script, but "improved".

Link to comment

Thank you, Castillo!

So unlike the ones who created the old threads and got it working, I'm gonna explain others who seek help how to do it: here is everything you need:

server.lua file (edit in notepad, save as .lua)

function toggleGodMode ( thePlayer ) 
    local account = getPlayerAccount ( thePlayer ) 
    if ( not account or isGuestAccount ( account ) ) then 
        return 
    end 
  
    local accountName = getAccountName ( account ) 
    if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then 
        local state = ( not getElementData ( thePlayer, "invincible" ) ) 
        setElementData ( thePlayer, "invincible", state ) 
        outputChatBox ( "God Mode is now ".. ( state and "Enabled" or "Disabled" ) ..".", thePlayer, 0, 255, 0 ) 
    end 
end 
addCommandHandler ( "godmode", toggleGodMode ) 

Client.lua (same procedure, put this in notepad and save as client.lua

addEventHandler ( "onClientPlayerDamage",root, 
function () 
    if getElementData(source,"invincible") then 
        cancelEvent() 
    end 
end) 
  
addEventHandler("onClientPlayerStealthKill",localPlayer, 
function (targetPlayer) 
    if getElementData(targetPlayer,"invincible") then 
        cancelEvent() 
    end 
end) 

Next create "meta.xml", same procedure, only you save as "meta.xml" now:

    

Put them all in a .zip (NOT .RAR) document and upload to your server.

Thanks a lot again. :)

Link to comment
...

ALSO needing a one-tap nitrous system (e.g, instead of nitrous charges, I want it to be like NFS-style, you hold it down and release when you want it to stop).

--

It's a whole bunch to ask, but I'd kill for those things on my server!

I'm not retarded.he wants nitro holding system for Freeroam hes my damn friend.

Link to comment
...

ALSO needing a one-tap nitrous system (e.g, instead of nitrous charges, I want it to be like NFS-style, you hold it down and release when you want it to stop).

--

It's a whole bunch to ask, but I'd kill for those things on my server!

It is a freeroam server, I did not mention it was a race server in that quote at all.

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...