Jump to content

مساعدة بسيطه


Adham

Recommended Posts

السلام عليكم

انا سويت سكريبت عباره عن

اي حد يكتب في ف8 TeamColor

يعمل له لون سياره

انا عاوز

مش كلو يقدر يكتب TeamColor

عاوز اليكون في تيم

يعني لازم يكون في تيم عشان يعمل لون للسياره

لو واحد مب في تيم

يكتب في ف8 TeaMCOlor

ما يحصل شي في عربيتو

الفي تيم فقط

Link to comment

حط تيم لي تبي يفتح

بالاسل

local Groups = { "اسم قروب", "اسم قروب" } 
  
function isPlayerAdmin(player) 
    for k,v in ipairs ( Groups ) do 
        if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) ) then 
            return true 
        end 
    end 
end 

Link to comment

كلنت

addCommandHandler( 'TeamColor',function () 
triggerServerEvent("changeLocalPlayerVehicleColor", localPlayer, 255, 0, 0,'Red') 
end 
end) 
  

سرفر

   addEvent("changeLocalPlayerVehicleColor", true) 
    addEventHandler("changeLocalPlayerVehicleColor", root, function(r, g, b,Message) 
        local vehicle = getPedOccupiedVehicle(source) 
        if vehicle then 
            setVehicleColor(vehicle, r, g, b) 
            outputChatBox(Message, source,  r, g, b) 
        else 
            outputChatBox("اركب العربية  ياقدع", source, 255, 0, 0) 
        end 
    end) 

Link to comment

-- Server Side

addCommandHandler ( "TeamColor", function ( player ) 
    if ( getPlayerTeam ( player ) ) == getTeamFromName ( "اسم التيم" ) then  
            outputChatBox ( "* يجب ان  تكون في التيم", player, 255, 0, 0, true )  
        return 
    end 
    local vehicle = getPedOccupiedVehicle ( player ) 
        if ( vehicle ) then 
            setVehicleColor ( vehicle, 255, 0, 0 ) 
            outputChatBox ( "* تم تغيير اللون", player, 255, 0, 0, true ) 
        else 
            outputChatBox ( "* اركب العربية  ياقدع", player, 255, 0, 0, true ) 
        end 
    end 
) 
Link to comment

# Server Side

addCommandHandler("C.Veh", 
function ( player , _ , R , G , B ) 
  
if ( R ) and tonumber ( R ) and ( G ) and tonumber ( G ) and ( B ) and tonumber ( B ) then 
  
aVehicle = getPedOccupiedVehicle ( player ) 
  
if ( aVehicle ) then 
  
setVehicleColor ( aVehicle , R , G , B ) 
  
outputChatBox ( "تم تلوين سيارتك بنجاح", player , tonumber ( R ) , tonumber ( G ) , tonumber ( B ) , true ) 
  
else outputChatBox ( "يرجى ركوب السيارة" , player , tonumber ( R ) , tonumber ( G ) , tonumber ( B ) , true ) 
  
        end 
else outputChatBox ( "الرجاء كتابة ارقام فقط " , player , 255 , 255 , 255 , true ) 
    end 
end 
    ) ; 

مثال

C.Veh 255 255 255 

تكتبه بأف8

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