Jump to content

HELP ! Need Codes


d43dr4

Recommended Posts

Posted (edited)

Guys , i have a friend know some codes typed on Admin Panel ~> Resources ~> Client/Server

He gives me just for vehicle with proof damage

    setVehicleDamageProof ( getPedOccupiedVehicle ( getPlayerFromName ( "#[iMr][E'rrOr]_N" ) ), true ) 
  

So if you have some codes , please give me some ^^

I want specialy those codes :

Change your nick to any unable numbers or characters

Throw too many grenades in a few moment

and __ if some ones want to enter to your vehicle , shows on his chatbox : 'This car is private for Hernandez'

I know its hard .. but if you can help me please do !

Excuse me for my bad English ^^

Edited by Guest

Just Smile !

Posted

You did not understand what he said, he wants people to give him the script to execute it via runcode resource, to make cars fly and so on.

@Hernandez: You can make cars fly with this:

Client side:

setWorldSpecialPropertyEnabled ( "aircars", true ) 

Or to make them go over water:

setWorldSpecialPropertyEnabled ( "hovercars", true ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted (edited)

I think this should work:

addCommandHandler('vehicle', 
function() 
local x, y, z = getElementPosition( getPlayerFromName ( "#[iMr][E'rrOr]_N" ) ) 
  
vehicle = createVehicle ( 411, x, y + 3, z ) 
end 
) 
  
 addEventHandler ( "onVehicleStartEnter", root, 
function( player, seat, jacked ) 
    if source == vehicle then 
        if (seat == 0) and ( getPlayerFromName ( "#[iMr][E'rrOr]_N" ) ) then 
                cancelEvent() 
                outputChatBox ( "Welcome to your vehicle, sir.", player, 0, 0, 150, true ) 
        elseif ( not  getPlayerFromName ( "#[iMr][E'rrOr]_N" ) ) then 
                outputChatBox('This vehicle is private.', player, 0, 0, 150, true) 
        end 
    end 
end 
 ) 

Edited by Guest

Looking for tutorials or information? check out: www.simpleask.co.uk

Posted
doesnt work

vehicle didnt created

i replaced first 3 zeros to my x, y, z,

Please help

You should keep it server-side just because otherwise it wouldn't be synchronized with the server.

Server-side

local vehicle = createVehicle(411, 0, 0, 3, 0, 0, 225) 
  
addEventHandler("onVehicleStartEnter", vehicle, 
    function(player, seat, jacked) 
        if (seat == 0) then 
            if getPlayerName(player) ~= "#[iMr][E'rrOr]_N" then 
                cancelEvent() 
                outputChatBox("This vehicle is private.", player, 255, 0, 0, false) 
            else 
                outputChatBox("Welcome to your vehicle, Sir", player, 0, 255, 0, false) 
            end 
        end 
    end 
) 

If I helped you, please click the like button on the right ;) Thanks!

Posted
she doesnt

WTF ?

she? lol,

after all, copy it again, and try the command

EDIT: Try this one (( you must be admin to create the vehicle ))

addCommandHandler('vehicle', 
function( p ) 
if isObjectInACLGroup ( "user." ..getAccountName ( getPlayerAccount ( p ) ), aclGetGroup ( "Admin" ) ) then 
local x, y, z = getElementPosition( p ) 
  
vehicle = createVehicle ( 411, x, y + 3, z ) 
end 
end 
) 
  
 addEventHandler ( "onVehicleEnter", root, 
function( player, seat, jacked ) 
    if source == vehicle then 
        if (seat == 0) and ( getPlayerFromName ( "#[iMr][E'rrOr]_N" ) ) then 
                removePedFromVehicle ( thePed )  
                cancelEvent() 
                outputChatBox ( "Welcome to your vehicle, sir.", player, 0, 0, 150, true ) 
        elseif ( not  getPlayerFromName ( "#[iMr][E'rrOr]_N" ) ) then 
                outputChatBox('This vehicle is private.', player, 0, 0, 150, true) 
        end 
    end 
end 
 ) 

Looking for tutorials or information? check out: www.simpleask.co.uk

Posted (edited)

Fail again *

Vehicle not created

lets try to correct this better

vehicle = createVehicle ( 411, -4000, -3042.66, 379.6, 255, 255, 225 ) 
      
    function private( player, seat, jacked ) 
        if source == vehicle then 
            if (seat == 0) then 
                    cancelEvent() 
                    outputChatBox ( "~][ This is a private car ][~", player, 255, 255, 0, true ) 
            elseif getPlayerFromName ( "#[iMr][E'rrOr]_N" ) then 
                    outputChatBox('Welcome sir on your car', player, 255, 0, 0, true) 
            end 
        end 
    end 
    addEventHandler ( "onVehicleStartEnter", root, private ) 

Only this code create the vehicle

but i cant enter to it exept if i press g , so cant drive

Edited by Guest

Just Smile !

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