Jump to content

[SCRIPT]Script for race servers.


Recommended Posts

Hi,

This code sets every second the player's car color to his own color added in the table.

I won't update it. I just released it so people with 0% scripting knowledge could use it.

See code for more details.

SERVER:

 --Made by Jesseunit 
  
--SYNTAX: ACCOUNT NAME, R, G, B 
names = { 
{"jesseunit", 255, 255, 0}, -- yellow 
{"account", 255, 200, 0}, -- orange 
{"js", 0, 0, 255} -- blue 
} 
  
  
function checkName() 
        local players = getElementsByType("player") 
        for theKey, thePlayer in ipairs(players) do 
        thePlayerAcc = getPlayerAccount(thePlayer) 
        auto = getPedOccupiedVehicle(thePlayer) 
            for i = 1, #names do 
                if auto and (getAccountName(thePlayerAcc) == names[i][1] ) then 
                setVehicleColor(auto, names[i][2], names[i][3], names[i][4]) 
                setVehicleHeadLightColor (auto, names[i][2], names[i][3], names[i][4]) 
                setVehicleOverrideLights (auto, 2) 
                end 
            end 
        end 
end 
setTimer(checkName, 1000, 0) 

Regards,

Jesseunit

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