Jump to content

[HELP] How to make car never blow


Recommended Posts

0 = x

0 = y

6 = z

and you Can get Them by Admin Panel

--serverSide

function damage (thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
    local driver = getVehicleOccupant ( thePlayer) 
    if ( driver ) then  
    setVehicleDamageProof(driver, true) 
    outputChatBox('Your vehicle is Damage Proof',thePlayer,255,255,0) 
    else 
    outputChatBox('You Must Be Admin to do this',thePlayer,255,255,0) 
end 
end 
end 
addEventHandler ( "onVehicleEnter", getRootElement(), damage ) 

Link to comment
newvehicle = createVehicle(602, 0, 0, 6) 

602 is ID of car

0, -?

0, -?

6, -???????????????

here:
model: The vehicle ID of the vehicle being created.

x: A floating point number representing the X coordinate on the map.

y: A floating point number representing the Y coordinate on the map.

z: A floating point number representing the Z coordinate on the map.

Main_Page

try this,

Server-side:

addEventHandler("onVehicleEnter",root,function(player,seat,jacked) 
    if(player)and(seat==0)then 
        acc = getAccountName(getPlayerAccount(player)) 
        if(isObjectInACLGroup("user."..acc,aclGetGroup("Admin")))then 
            setVehicleDamageProof(source,true) 
        end 
    end 
end) 

Edited by Guest
Link to comment

Joker, you must learn LUA! You're trying create a server and you don't know absolutely NOTHING about LUA. Everytime you're asking here for a script ready.

-

Jaysds, bro, don't make codes to Joker. If you read the other topics created by him, you'll see: he's a big lazy member. He don't want learn LUA, he don't want work.

Link to comment
Lazy member... the functions already were posted.

P.S: Is not "whant", is "want". There's not letter "h".

yeh yeh sorry :) :) i type very fast

how it's possible to press "H" button when buttons with letters "W" and "A" are not even close to it? :lol:

ps. "whant" was hilarious ;)

Link to comment

Just because StanleySathler corrected him about "whant" I'm gonna correct you all with saying that it isn't "LUA" it's "Lua"

And what I could see you never checked the vehicle model?

But as StanleySathler said, I've seen several topics from this "Joker" guy where he requests us to script, he doesn't even try himself.

Link to comment

I don't see how hard it is to make this script work from you guys. It's a simple script guys.

local hydra = createVehicle(model, x, y, z) 
  
addEventHandler("onVehicleEnter", root, 
    function(player, seat, jacked) 
        if isGuestAccount(getPlayerAccount(player)) then return end 
        if seat == 0 then 
            if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup("Admin")) then 
                setVehicleDamageProof(hydra, true) 
                setVehicleDoorsUndamageable(hydra, true) 
            else 
                setVehicleDamageProof(hydra, false) 
                setVehicleDoorsUndamageable(hydra, false) 
            end 
        end 
    end 
) 

Don't understand anything from this script? I suggest to learn lua first.

Scripting Introduction to MTA:SA

Edited by Guest
Link to comment

myonlake, is not hard. But we are not free scripters, then we don't wanna create a free script. If you read what I said, you'll see that JokeR is lazy and don't wanna work.

Your example does work, but not for only admins. For it, you must increment to Jaysds example, getting the group of ACL.

Link to comment

Edited my code.

@Jaysds1: I suppose you didn't pay attention to the 'jacked' part there, since in my opinion, it makes no sense if the admin entering the car can only set the vehicle invincible if he doesn't jack it from a player. So you can just take off the part where the 'jacked' is mentioned.

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