Jump to content

مشكلة بالكود !!!!


RLP[Farouk]

Recommended Posts

شباب هادا الكود

بدي لما يدخل الجوب

يدخل فريق

بس مش راضي يدخل الفريق

سيرفر

createBlip ( 1036.0451660156, -1027.365234375, 32.1015625, 56 ) 
  
function createMechanicTeam () 
    Mechanicteam = createTeam ("Mechanic", 255, 255, 0) 
end 
addEventHandler ("onResourceStart", resourceRoot, createMechanicTeam) 
  
function joinMechanic() 
     setPlayerTeam(source,Mechanicteam) 
     setElementModel(source, 50) 
     setElementData( source, "Occupation", "Mechanicteam", true ) 
     outputChatBox("You are now a Mechanic guy.",source,0,255,0) 
end 
addEvent("setMechanic", true) 
addEventHandler("setMechanic",root,joinMechanic) 
  
function Mechanicjob (player,command) 
    skin = getPedSkin (player) 
         if ( skin == 50 ) then 
            local vehicle = getPedOccupiedVehicle(player) 
                if (vehicle) then 
            fixVehicle(vehicle) 
            takePlayerMoney(player,100) 
        end 
    end 
end 
addCommandHandler("repair" , fixCar) 
addCommandHandler("rp" , fixCar) 

Link to comment
خلص

انا حليت المشكلة

بس ليش لون الاسم ما بتغيير حسب لون الفريق؟؟؟

:lol:

addEventHandler (  
    'onResourceStart', resourceRoot, 
    function ( ) 
        createTeam ( 'Mechanic', 255, 255, 0 ) 
        createBlip ( 1036, -1027, 32, 56 ) 
    end 
) 
  
addEvent ( 'setMechanic', true ) 
addEventHandler (  
    'setMechanic', root, 
    function ( ) 
        setPlayerTeam ( source, getTeamFromName ( 'Mechanic' ) ) 
        setElementModel ( source, 50 ) 
        outputChatBox ( 'You are now a Mechanic guy .', source, 0, 255, 0 ) 
        setPlayerNametagColor ( source, getTeamColor ( getTeamFromName ( 'Mechanic' ) ) ) 
    end 
) 

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