Jump to content

ماركرات و اسماء متعدده


Recommended Posts

  • Replies 75
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

الي تدور احسها معقده شوي

ولاكن هذا الي قدرت عليه

addEventHandler ( "onClientRender", root, 
function (player) 
    local xc,yc,zc = getElementRotation ( player ) 
    local x, y, z = getElementPosition ( player ) 
    car = createVehicle ( 432,  x, y, z , xc ,yc ,zc ) 
    local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
    setVehicleColor( car, r, g, b ) 
end) 

Link to comment

-- # Client Side 
  
local vehicle = createVehicle ( id,x,y,z ) 
  
addEventHandler("onClientRender",getRootElement(), 
    function ( ) 
        if isElement ( vehicle ) then 
            local x,y,z = getElementRotation ( vehicle ) 
            local r,g,b = math.random(255),math.random(255),math.random(255) 
                setVehicleColor( vehicle,r,g,b ) 
                setElementRotation( vehicle,x,y,z + 0.5 ) 
            end 
        end 
    ) 

شغله وعب ارقمنت السيارة وشوف ( ( = !

Link to comment

ابيك تسوي لي كود اذا ما كان الاعب بـ تيم شرطة و سيارات محددهـ بـ استخدام :

table 
getElementModel 
addEventHandler 
"onVehicleStartEnter" 
getPlayerTeam 
getTeamName 
cancelEvent() 
outputChatBox 

مايخلية يركبها ويقولة انها للشرطة بس ~

Link to comment
local vehicle = createVehicle ( 445,2128.83301, 1522.96802, 10.82031 ) 
  
  
function prstege ( thePlayer ) 
    if ( getTeamName(getPlayerTeam(thePlayer)) == "Police" ) then 
        outputChatBox ( "welcome", thePlayer ) 
    else 
        cancelEvent() 
        outputChatBox ( "this car For group 3ssol", thePlayer ) 
    end 
end 
addEventHandler ( "onVehicleStartEnter",vehicle, prstege ) 

تم وبحمد الله

ولاكن انت قلتلي

getElementModel

هذا يتحقق من الشخصيه

!!

المهم شوف انا مابي اكذب انا الي اخذته من عندي جاهز

if ( getTeamName(getPlayerTeam(thePlayer)) == "Police" ) then

اما الباقي كله من صنعي

تتسلم ي برستيج + اسف تعبتك مععي

Link to comment

اممم شيء حلو سويتة بس عندك خطأ بسيط المفروض يصير تحقق التيم كذآ :

if ( getPlayerTeam ( thePlayer ) and getTeamName(getPlayerTeam(thePlayer)) == "Police" ) then

السبب :

نفرض واحد مامعه تيم؟ بيجي ايرور اكيد .. :)

اممم تقولي

getElementModel ?

هذي بس للشخصيات نو وي !لا مستحيل ذذ هذي تجيب اي شيء متاح بالويكي اوبجكت سيارة لاعب الخ ذذ

Link to comment

سهل ذذ

 Preestege = createPed ( 0, x, y, z ) 
  
 addPedClothes ( Preestege, "tshirtilovels", "tshirt", 0 ) 

طبعا الملابس جبتهم من الويكي

عشان ماتقول كوبي بست خخخخخ

+

عارف يبيله

onResourceStart

ولاكن اختصرت الموضوع ^^

Link to comment

هههههههه برستيج

فله لما تعطيني اختبار وانا اسوي وتشوف صح او خطا

ممكن اختبار اخييير هههههههههههههههه

والله اذا تعبتك خلاص مولازم

:oops::oops::oops::oops:

Link to comment

شوف انا لقيت بل ويكي مثال

ولاكن مابي اسوي نفس الويكي وسويت طريقه من عندي

addCommandHandler ( "give", 
function (player)  
    if not polo then  
        givePedJetPack ( player )  
        outputChatBox ( "تم اعطائك نفاثة", player, 255, 255, 255, true ) 
    else     
        removePedJetPack ( player )   
        outputChatBox ( "تم سحب النفاثة", player, 255, 255, 255, true ) 
    end 
end) 

Link to comment

addCommandHandler("give",  
    function ( player ) 
        if doesPedHaveJetPack ( player ) then 
            removePedJetPack ( player ) 
                                          outputChatBox ( "تم سحب النفاثة", player, 255, 255, 255, true ) 
        else 
            givePedJetPack ( player ) 
                                        outputChatBox ( "تم اعطائك نفاثة", player, 255, 255, 255, true ) 
        end 
    end 
) 

حقك ماراح يصير ذذ

Link to comment

حقك يصير كذا :

polo = false 
addCommandHandler ( "give", 
function (player)  
    if not polo then  
        givePedJetPack ( player )  
        outputChatBox ( "تم اعطائك نفاثة", player, 255, 255, 255, true ) 
        polo = true 
    else     
        removePedJetPack ( player )   
        outputChatBox ( "تم سحب النفاثة", player, 255, 255, 255, true ) 
        polo = false 
    end 
end 
) 

Link to comment

طيب لو عكسناهم

    polo = true 
    addCommandHandler ( "give", 
    function (player) 
        if not polo then 
            givePedJetPack ( player ) 
            outputChatBox ( "تم اعطائك نفاثة", player, 255, 255, 255, true ) 
            polo = false 
        else     
            removePedJetPack ( player )   
            outputChatBox ( "تم سحب النفاثة", player, 255, 255, 255, true ) 
            polo = true 
        end 
    end 
    ) 

ووش فوائد الـ

true

+

false?

Link to comment

خلها بعقلك بـ حسب الفنكشن هذا اعطاء نفاثة بيكون اكيد مامعه اصلا بنسبة 99 % نفاثة بتكون فولس يوم نعطية تكون ترو يوم نسحبها ترو وحقك ماراح يشتغل .. لانك عاكس العملية

Link to comment
طيب لو عكسناهم
    polo = true 
    addCommandHandler ( "give", 
    function (player) 
        if not polo then 
            givePedJetPack ( player ) 
            outputChatBox ( "تم اعطائك نفاثة", player, 255, 255, 255, true ) 
            polo = false 
        else     
            removePedJetPack ( player )   
            outputChatBox ( "تم سحب النفاثة", player, 255, 255, 255, true ) 
            polo = true 
        end 
    end 
    ) 

ووش فوائد الـ

true

+

false?

ترو وفالس هذي مثل الخدعه

تحط للكلمه قيمة ترو وتخليه اذا كانت ترو يخليها فالس

واذا كانت فالس يخليها ترو

وتصير كذا كل شوي تصير العكس

Link to comment

هي نفسها لو تسوي شرط خآرجي بـ الكلمات

polo = "not jetpack" 
         
addCommandHandler ( "give", 
    function (player) 
        if polo == "not jetpack" then 
            givePedJetPack ( player ) 
            outputChatBox ( "تم اعطائك نفاثة", player, 255, 255, 255, true ) 
            polo = "jetpack" 
        else     
            removePedJetPack ( player )   
            outputChatBox ( "تم سحب النفاثة", player, 255, 255, 255, true ) 
            polo = "not jetpack" 
        end 
    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...