Jump to content

شوفو هلكود اذا صحيح


Recommended Posts

السلام عليكم

شوفولي هلكود اذا صحيح عدلت عليه شوي وترجمته للعربي وكل شيئ شوفو عرفت ان اذا نسخنى Syntax ما راح نستفيد شيئ

شوفو الكود عباره عن اذا واحد دخل مقرك ومقرك شرطه يصير عندك 6 نجوم بسابي كود لجروب المعين

شوفو ذا الكود

function policeStationHit ( thePlayer )   
   setPlayerWantedLevel  ( thePlayer، 6  ) 
   outputChatBox  (  getPlayerName  ( thePlayer ) .. "لقد دخل مقر سوات!!"  )  
end 
addEventHandler  (  "onColShapeHit" ، policeStation، policeStationHit ) 

حطلولي فيه كود قروبات وشكرا يكم تحياتي اي خطا فيه قلولي اخذته من ويكي عدلت عليه شوي وفهمته وشكرا للاخ ذا كيلر لي ساعدني لجيبه.

Link to comment

قسم خطا + جرب كذا وشوف

---- Updating

---- تم التعديل

  
addEventHandler  ("onColShapeHit",policeStation, 
function (thePlayer) 
    if getElementsByType (thePlayer) == 'player' then 
        setPlayerWantedLevel  (thePlayer,6 ) 
        name = getPlayerName (thePlayer) 
        outputChatBox  (""..name.." Your Text",thePlayer) 
   end 
end 
) 
  

Link to comment

بدلاً من تنبيه الاعضاء بأنه القسم الخطأ .. لأنه ببساطة العضو العادي لا يمكنه نقل الموضوع Report الرجاء استخدام زر

icon_post_report.gif :صورة الزر

ينقل إلى اقسم البرمجة

Link to comment
قسم خطا + جرب كذا وشوف

---- Updating

---- تم التعديل

  
addEventHandler  ("onColShapeHit",policeStation, 
function (thePlayer) 
    if getElementsByType (thePlayer) == 'player' then 
        setPlayerWantedLevel  (thePlayer,6 ) 
        name = getPlayerName (thePlayer) 
        outputChatBox  (""..name.." Your Text",thePlayer) 
   end 
end 
) 
  

مو نفس اطلب

------------------------------

addEventHandler  ("onColShapeHit",policeStation, 
function (thePlayer) 
 if getElementsByType (thePlayer) == 'player' then 
    if getElementData (thePlayer, "gang") ~= "Group Name" then 
        setPlayerWantedLevel  (thePlayer,6 ) 
        local name = getPlayerName (thePlayer) 
        outputChatBox  (""..name.." لقد دخلت مقر سوات",thePlayer, 255, 255, 0) 
      end 
   end 
end 
) 
  

Link to comment
قسم خطا + جرب كذا وشوف

---- Updating

---- تم التعديل

  
addEventHandler  ("onColShapeHit",policeStation, 
function (thePlayer) 
    if getElementsByType (thePlayer) == 'player' then 
        setPlayerWantedLevel  (thePlayer,6 ) 
        name = getPlayerName (thePlayer) 
        outputChatBox  (""..name.." Your Text",thePlayer) 
   end 
end 
) 
  

مو نفس اطلب

------------------------------

addEventHandler  ("onColShapeHit",policeStation, 
function (thePlayer) 
 if getElementsByType (thePlayer) == 'player' then 
    if getElementData (thePlayer, "gang") ~= "Group Name" then 
        setPlayerWantedLevel  (thePlayer,6 ) 
        local name = getPlayerName (thePlayer) 
        outputChatBox  (""..name.." لقد دخلت مقر سوات",thePlayer, 255, 255, 0) 
      end 
   end 
end 
) 
  

نسيت التحقق من العصابة :)

Link to comment
قسم خطا + جرب كذا وشوف

---- Updating

---- تم التعديل

  
addEventHandler  ("onColShapeHit",policeStation, 
function (thePlayer) 
    if getElementsByType (thePlayer) == 'player' then 
        setPlayerWantedLevel  (thePlayer,6 ) 
        name = getPlayerName (thePlayer) 
        outputChatBox  (""..name.." Your Text",thePlayer) 
   end 
end 
) 
  

مو نفس اطلب

------------------------------

addEventHandler  ("onColShapeHit",policeStation, 
function (thePlayer) 
 if getElementsByType (thePlayer) == 'player' then 
    if getElementData (thePlayer, "gang") ~= "Group Name" then 
        setPlayerWantedLevel  (thePlayer,6 ) 
        local name = getPlayerName (thePlayer) 
        outputChatBox  (""..name.." لقد دخلت مقر سوات",thePlayer, 255, 255, 0) 
      end 
   end 
end 
) 
  

getElementsByType

table getElementsByType ( string theType, [ element startat=getRootElement() ] )

Link to comment
addEventHandler  ("onColShapeHit",policeStation, 
function (thePlayer) 
 if getElementsByType (thePlayer) == 'player' then 
    if getElementData (thePlayer, "gang") ~= "Group Name" then 
        setPlayerWantedLevel  (thePlayer,6 ) 
        local name = getPlayerName (thePlayer) 
        outputChatBox  (""..name.." لقد دخلت مقر سوات",thePlayer, 255, 255, 0) 
      end 
   end 
end 
) 
  

getElementsByType > getElementType

Link to comment
همم , والله ما انتبهت , ثاني شي انا نسخت كود الي فوق وعدلت عليه , ما انتبهت لهذيك

مو مشكلة .. وعندكـ اغلأط ثانية > كودكـ يصير كذا > #

addEventHandler( "onColShapeHit", policeStation, function ( element ) 
 if ( getElementType ( element ) == "player" ) then 
    if ( getElementData ( element, "gang") ~= "Group Name" ) then 
            setPlayerWantedLevel  ( element, 6 ) 
            outputChatBox  ("** [ "..getPlayerName ( element ).." ] دخل مقر سوات", root, 255, 255, 0, true ) 
         end 
     end 
end ) 

Link to comment

التحقق من النوع , قلت اني ما انتبهت له لأني نسخت كود الاخ

Valenteno

وعدلت عليه

وطبعا

ما لاحظت انه حاط

getElementsByType

ونبهني عليها

والحين يقول ان عندي اخطاء ثانيه من وين جابها

انا ما ادري !!

Link to comment
التحقق من النوع , قلت اني ما انتبهت له لأني نسخت كود الاخ

Valenteno

وعدلت عليه

وطبعا

ما لاحظت انه حاط

getElementsByType

ونبهني عليها

والحين يقول ان عندي اخطاء ثانيه من وين جابها

انا ما ادري !!

بالنسبة ل getElementsByType

هذا خطا منى وانا اكتبها لانى كنت ضغطت عليها ضغطتين من البرنامج حتى تتكتب على انها كلمة

getElementType

وانا عمرى ماستخدمها فى التحقق من اللاعب

getElementsByType

حتى شوف اى كود انا حاطه

Link to comment
التحقق من النوع , قلت اني ما انتبهت له لأني نسخت كود الاخ

Valenteno

وعدلت عليه

وطبعا

ما لاحظت انه حاط

getElementsByType

ونبهني عليها

والحين يقول ان عندي اخطاء ثانيه من وين جابها

انا ما ادري !!

( root ) المفروض مخرج الشات يجي للكل وتحط ( thePlayer ) حاط بـ مخرج الشات

Edited by Guest
Link to comment
  • 4 months later...
addEventHandler("onPlayerLogin",getRootElement(),outputOnLogin )  
getPlayerAccount(thePlayer) 
 if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then 
 createMarker(-2596.625, 579.358, 15.626, 'cylinder', 2.0, 255, 0, 0, 150) 
    end 
  
end 

هيك صح شباب؟

لا قلنا وش تبي تسوي

:?:

Link to comment
addEventHandler("onPlayerLogin",getRootElement(),outputOnLogin )  
getPlayerAccount(thePlayer) 
 if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then 
 createMarker(-2596.625, 579.358, 15.626, 'cylinder', 2.0, 255, 0, 0, 150) 
    end 
  
end 

هيك صح شباب؟

مدري وش تبي تسوي بس ذآ آلتصحيح

#تم التعديل

  
function outputOnLogin( ) 
    local accName = getAccountName ( getPlayerAccount ( source ) ) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "admin" ) ) then 
    createMarker(-2596.625, 579.358, 15.626, 'cylinder', 2.0, 255, 0, 0, 150) 
    end 
end 
addEventHandler ( 'onPlayerLogin', getRootElement ( ), outputOnLogin)  

بس آذآ عدت تشغيل المود يروح الماركر لازم اي ادمن يدخل بعدين يجي الماركر

Edited by Guest
Link to comment
addEventHandler("onPlayerLogin",getRootElement(),outputOnLogin )  
getPlayerAccount(thePlayer) 
 if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then 
 createMarker(-2596.625, 579.358, 15.626, 'cylinder', 2.0, 255, 0, 0, 150) 
    end 
  
end 

هيك صح شباب؟

مدري وش تبي تسوي بس ذآ آلتصحيح

  
function outputOnLogin( thePlayer ) 
    local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "admin" ) ) then 
    createMarker(-2596.625, 579.358, 15.626, 'cylinder', 2.0, 255, 0, 0, 150) 
    end 
end 
addEventHandler ( 'onPlayerLogin', getRootElement ( ), outputOnLogin)  

بس آذآ عدت تشغيل المود يروح الماركر لازم اي ادمن يدخل بعدين يجي الماركر

x

ليه حاط thePlayer

حط سورس

او

function outputOnLogin( _, acc ) 
    local accName = getAccountName ( acc ) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "admin" ) ) then 
    createMarker(-2596.625, 579.358, 15.626, 'cylinder', 2.0, 255, 0, 0, 150) 
    end 
end 
addEventHandler ( 'onPlayerLogin', getRootElement ( ), outputOnLogin)  

Link to comment
^

آظن مآتفرق

كيف ماتفرق روح صفحة الويكي

انا اقلك

انت معرف بالفنكشن

function outputOnLogin( thePlayer ) 

وحاط

0_o

local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 

والويكي يقول

account thePreviousAccount, account theCurrentAccount, bool autoLogin 

اتمنى فهمت يالمخرف

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