Jump to content

طلب فنكش


baba

Recommended Posts

  
اسم الزر = createObject ( 5822, -1084.52, -1634.81, 76.36 ) 
function objectRandomization ()   
    local randomobjectnumber = math.random(1, 18000) 
  
    setElementModel ( myobject, randomobjectnumber ) 
end 
  
setTimer ( objectRandomization, 2500, 0 ) 
  

function setCopSkin () 
    setPedSkin ( source, 280 ) 
    outputChatBox ( "You are now a cop.", source, 255, 0, 0 ) 
end 
addEventHandler ( "onPlayerSpawn", getRootElement(), setCopSkin ) 

ممكن لو سمحتو توضحوهم لي اكثر

Link to comment
  
اسم الزر = createObject ( 5822, -1084.52, -1634.81, 76.36 ) 
function objectRandomization ()   
    local randomobjectnumber = math.random(1, 18000) 
  
    setElementModel ( myobject, randomobjectnumber ) 
end 
  
setTimer ( objectRandomization, 2500, 0 ) 
  

function setCopSkin () 
    setPedSkin ( source, 280 ) 
    outputChatBox ( "You are now a cop.", source, 255, 0, 0 ) 
end 
addEventHandler ( "onPlayerSpawn", getRootElement(), setCopSkin ) 

ممكن لو سمحتو توضحوهم لي اكثر

الكود الاول ، ماله علاقة بالشخصية .. بالنسبة للثأني :

function setCopSkin () 
    setPedSkin ( source, 280 ) -- يغير شخصية اللاعب لـ 280 
    outputChatBox ( "You are now a cop.", source, 255, 0, 0 ) -- ويكتب له بالشات  
end 
addEventHandler ( "onPlayerSpawn", getRootElement(), setCopSkin ) -- هذا الحدث لما اللاعب يرسبن 

Link to comment
 myobject = createObject ( 5822, -1084.52, -1634.81, 76.36 ) -- هنا ليه حاط اسم زر , وهو صناعة اوبجكت 
function objectRandomization ()   
    local randomobjectnumber = math.random(1, 18000) -- هنا نجيب رقم عشوائي من 1 الى 18000 
    setElementModel ( myobject, randomobjectnumber ) -- نغير شكل الاوبجكت حسب الرقم العشوائي الي بيطلع 
end 
setTimer ( objectRandomization, 2500, 0 ) -- نسوي تايمر ع الوظيفه 

function setCopSkin () 
    setElementModel ( source, 280 ) -- نغير الشخصيه 
    outputChatBox ( "You are now a cop.", source, 255, 0, 0 ) -- اخراج نص بالشات 
end 
addEventHandler ( "onPlayerSpawn", getRootElement(), setCopSkin ) -- حدث اول ما الاعب ينتقل 

ملاحظه

local randomobjectnumber = math.random(1, 18000)

1

الى

18000

فيه رقم اوبجكتات ومافيه رقم اوبجكتات

انصحك

تسوي جدول

وتحط فيه ايدي الاوبجكتات

وتطلعها عشوائيه عشان ما يجيك اخطاء

Edited by Guest
Link to comment
function setCopSkin () 
    setPedSkin ( source, 280 ) -- يغير شخصية اللاعب لـ 280 
    outputChatBox ( "You are now a cop.", source, 255, 0, 0 ) -- ويكتب له بالشات 
end 
addEventHandler ( "onPlayerSpawn", getRootElement(), setCopSkin ) -- هذا الحدث لما اللاعب يرسبن 

انا ابي اكبس على زر يعطوني الشخصيه +

ممكن توضيح

Link to comment

كتبهم ikAkA07 القسم هذا للمساعدة يعني مو معناتها نبرمج عنك و واضح انك مو فاهم شي بالبرمجة وجالس تنسخ امثلة الويكي الي ما لها اي علاقة حتى بالفنكشات الي

https://wiki.multitheftauto.com/wiki/Scripting_Introduction

https://wiki.multitheftauto.com/wiki/Introduction_to_Scripting_the_GUI

https://wiki.multitheftauto.com/wiki/Debugging

https://forum.multitheftauto.com/viewforum.php?f=164

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