Jump to content

تصحيح كود


Recommended Posts

function teamInfo ( source ) 
    local 255, 196, 0 
    local playerTeam = getPlayerTeam( source ) 
    local text = getPlayerName ( source ) 
    if ( playerTeam ) then 
        text = text .. " is on " .. getTeamName ( playerTeam ) 
        255, 196, 0 = getTeamColor ( playerTeam ) 
        text = text .. " with team colors: " .. tostring(255) .. ", " .. tostring(196) .. ", " .. tostring(0) 
    else 
        text = text .. " is not on a team." 
    end 
    outputChatBox ( text ) 
end 
addCommandHandler ( "teamcolor", teamInfo ) 
  

Link to comment
function teamInfo ( source ) 
    local r, g, b 
    local playerTeam = getPlayerTeam( source ) 
  
    -- Make a string to print out the player's team information 
    local text = getPlayerName ( source ) 
  
    if ( playerTeam ) then -- If the player is on a team (team is not false) 
        -- Add the team name to the string 
        text = text .. " is on " .. getTeamName ( playerTeam ) 
  
        -- Get the red, green, and blue values of the team's color 
        r, g, b = getTeamColor ( playerTeam ) 
  
        -- Convert the colors to strings and add them to the string 
        text = text .. " with team colors: " .. tostring(r) .. ", " .. tostring(g) .. ", " .. tostring(b) 
    else                   -- if he's not on a team 
        text = text .. " is not on a team." 
    end 
  
    -- Print the string with the player's team information 
    outputChatBox ( text ) 
end 
  
-- Add console command to print out your team information 
addCommandHandler ( "teamInfo", teamInfo ) 

https://wiki.multitheftauto.com/wiki/GetTeamColor

Link to comment
function teamInfo ( source ) 
    local 255, 196, 0 
    local playerTeam = getPlayerTeam( source ) 
    local text = getPlayerName ( source ) 
    if ( playerTeam ) then 
        text = text .. " is on " .. getTeamName ( playerTeam ) 
        r, g, b = getTeamColor ( playerTeam ) 
        text = text .. " with team colors: " .. tostring(255) .. ", " .. tostring(196) .. ", " .. tostring(0) 
    else 
        text = text .. " is not on a team." 
    end 
    outputChatBox ( text ) 
end 
addCommandHandler ( "teamcolor", teamInfo ) 
  
  
  

Link to comment

اتوقع ذا صح؟؟

انا عدلته شوفه

function teamInfo ( source ) 
    local r, g, b 
    local playerTeam = getPlayerTeam( source ) 
    local text = getPlayerName ( source ) 
    if ( playerTeam ) then 
        text = text .. " is on " .. getTeamName ( playerTeam ) 
        255, 196, 0 = getTeamColor ( playerTeam ) 
        text = text .. " with team colors: " .. tostring(r) .. ", " .. tostring(g) .. ", " .. tostring(b) 
    else 
        text = text .. " is not on a team." 
    end 
    outputChatBox ( text ) 
end 
addCommandHandler ( "teamcolor", teamInfo ) 
  
  
  

Edited by Guest
Link to comment
اتوقع ذا صح؟؟

انا عدلته شوفه

function teamInfo ( source ) 
    local r, g, b 
    local playerTeam = getPlayerTeam( source ) 
    local text = getPlayerName ( source ) 
    if ( playerTeam ) then 
        text = text .. " is on " .. getTeamName ( playerTeam ) 
        255, 196, 0 = getTeamColor ( playerTeam ) 
        text = text .. " with team colors: " .. tostring(r) .. ", " .. tostring(g) .. ", " .. tostring(b) 
    else 
        text = text .. " is not on a team." 
    end 
    outputChatBox ( text ) 
end 
addCommandHandler ( "teamcolor", teamInfo ) 
  
  
  

يب , رح جرب عدل اللي قدام getTeamColor

Link to comment
اتوقع ذا صح؟؟

انا عدلته شوفه

function teamInfo ( source ) 
    local r, g, b 
    local playerTeam = getPlayerTeam( source ) 
    local text = getPlayerName ( source ) 
    if ( playerTeam ) then 
        text = text .. " is on " .. getTeamName ( playerTeam ) 
        255, 196, 0 = getTeamColor ( playerTeam ) 
        text = text .. " with team colors: " .. tostring(r) .. ", " .. tostring(g) .. ", " .. tostring(b) 
    else 
        text = text .. " is not on a team." 
    end 
    outputChatBox ( text ) 
end 
addCommandHandler ( "teamcolor", teamInfo ) 
  
  
  

يب , رح جرب عدل اللي قدام getTeamColor

تعرف انه هذا اول كود اسويه بنفسي

شكرا لمساعتك

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