Jump to content

Question,READ IT please


xTravax

Recommended Posts

  • Moderators
setTimer ( black, 2000, 1) --check timer > function black. 
function black (player)  
local account = getAccountName(getPlayerAccount(player)) --get account 
    if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then --check if it is admin 
    local theVehicle = getPlayerOccupiedVehicle ( player ) -- get the vehicle 
            if theVehicle then -- check if it does exist 
            setVehicleColor ( theVehicle, 0, 0, 0, [0, 0, 0,] [0, 0, 0,] [0, 0, 0] ) --setcolor 
            end 
  
    end 
end 

I used the timer because in a race map, you wont enter your vehicle.. but you spawn with it.

-- Maybe this... I can't test it right now (school).....

I hope it works.

Edited by Guest
Link to comment
  
function setAdminColor (player) 
 local theAccount=getPlayerAccount(player) 
    if theAccount then 
    local accountName = getAccountName(theAccount) 
    if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" ) ) then 
     local vehicle = getPedOccupiedVehicle(player) 
    setVehicleColor ( vehicle, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) -- Black rgb rgb2 rgb3 rgb4 
    setVehicleOverrideLights(vehicle, 2) -- Light on 
    setVehicleHeadLightColor(vehicle, 0, 0, 0, 0) -- u can set the color light r g b alpha 
       else 
    setVehicleColor ( vehicle, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) -- Yellow Normaly Player 
        end      
end 
end 
function spawnAdmin() 
setTimer(setAdminColor,500,1,source) 
end 
addEventHandler("onPlayerLogin",getRootElement(),spawnAdmin) 
addEventHandler("onPlayerSpawn",getRootElement(),spawnAdmin) 
  

This is for admin,u can edit this for supermod and mod.

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