RLP[Farouk] Posted September 27, 2012 Share Posted September 27, 2012 شباب هادا الكود بدي لما يدخل الجوب يدخل فريق بس مش راضي يدخل الفريق سيرفر 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
RLP[Farouk] Posted September 27, 2012 Author Share Posted September 27, 2012 خلص انا حليت المشكلة بس ليش لون الاسم ما بتغيير حسب لون الفريق؟؟؟ Link to comment
abu5lf Posted September 27, 2012 Share Posted September 27, 2012 خلصانا حليت المشكلة بس ليش لون الاسم ما بتغيير حسب لون الفريق؟؟؟ 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now