Jump to content

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


Recommended Posts

  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

اول شيئ الماركر اول ما يروح الماركر لي حاطتها انا

بس يلق الماركر يصير عنده 6 نجوم

ويقله في شات تم اعطائك ست نجوم بسبب,,,

انت منت "حاتط" ايفينت دخول الماركر

راجع قسم الشروحات قبل تسوي كود

Link to comment

يعني كذا يصير+كودي قصدي اول ما لاعب يلمس الماركر احداثياتها يصير عنده 6 نجوم ومو من راسي جايبهم لاني مو انا صانعهم

addEventHandler ( "onMarkerHit", marker1 , movingObject ) 
local myMarker = createMarker(2491.8000488281,-1671.4000244141,15.10000038147, 'cylinder', 2.0, 255, 0, 0, 150) 
function ( thePlayer ) 
setPlayerWantedLevel ( thePlayer, 6 ) 
outputChatBox ( getPlayerName ( thePlayer ) .. " لقد اصبح عندك 6 نجوم بسبب ..... " ) 
   end 
 end 
  

Link to comment
يعني كذا يصير+كودي قصدي اول ما لاعب يلمس الماركر احداثياتها يصير عنده 6 نجوم ومو من راسي جايبهم لاني مو انا صانعهم
addEventHandler ( "onMarkerHit", marker1 , movingObject ) 
local myMarker = createMarker(2491.8000488281,-1671.4000244141,15.10000038147, 'cylinder', 2.0, 255, 0, 0, 150) 
function ( thePlayer ) 
setPlayerWantedLevel ( thePlayer, 6 ) 
outputChatBox ( getPlayerName ( thePlayer ) .. " لقد اصبح عندك 6 نجوم بسبب ..... " ) 
   end 
 end 
  

X

رتـبهم كـ التالي ,

createMarker 
Event : 'onMarkerHit' 
function () 
getElementType 
setPlayerWantedLevel 
outputChatBox 
end 
) 
Link to comment

يعني كذا يصير الكود

local myMarker = createMarker(2491.8000488281,-1671.4000244141,15.10000038147, 'cylinder', 2.0, 255, 0, 0, 150) 
addEventHandler ( "onMarkerHit", marker1 , movingObject ) 
function ( thePlayer ) 
  if getElementType ( hitElement ) == 'player' then 
setPlayerWantedLevel ( thePlayer, 6 ) 
outputChatBox ( getPlayerName ( thePlayer ) .. " لقد اصبح عندك 6 نجوم بسبب ..... " ) 
    end 
end 
  

Link to comment

شوفو هذا اذا الصح

local myMarker = createMarker(2491.8000488281,-1671.4000244141,15.10000038147, 'cylinder', 2.0, 255, 0, 0, 150) 
        addEventHandler( "onMarkerHit", marker, 
      if (getElementType(player) == ("player")) then 
        if   ( getElementData(player, "Group" ) ~= "Hassan" ) then 
                  setPlayerWantedLevel ( thePlayer, 6 ) 
              outputChatBox ( getPlayerName ( thePlayer ) .. " لقد اصبح عندك 6 نجوم بسبب ..... " ) 
            end 
        end 
  

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
طيب اعمل الكود بعدين انتحر كيف تبي

شوف ذا ظبطه انا شوفه اذا منيح

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 ) 

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

جرب كذا

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

Group Name حط اسم القروب

gang خلها اذا تستخدم مود قروبات العقرب

root ملاحظه : اذا تبي التنبيه الي يطلع في الشات للكل خله

source اذا تبيه للاعب لحاله خله

: مثال

outputChatBox  ("** [ "..getPlayerName ( source ).." ] دخل مقر سوات", root, 255, 255, 255, true ) 

هذا للكل

----

وهذا للاعب لحاله

outputChatBox  ("** [ "..getPlayerName ( source ).." ] دخل مقر سوات", source, 255, 255, 255, true ) 

=[ تم التعديل ]=

Edited by Guest
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 ) 

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

جرب كذا

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

Group Name حط اسم القروب

gang خلها اذا تستخدم مود قروبات العقرب

root ملاحظه : اذا تبي التنبيه الي يطلع في الشات للكل خله

source اذا تبيه للاعب لحاله خله

: مثال

outputChatBox  ("** [ "..getPlayerName ( source ).." ] دخل مقر سوات", root, 255, 255, 255, true ) 

هذا للكل

----

وهذا للاعب لحاله

outputChatBox  ("** [ "..getPlayerName ( source ).." ] دخل مقر سوات", source, 255, 255, 255, true ) 

انت على اي اساس حطيت سورس؟

هو كوده صحيح اصلاً او على الأقل الكوبي بست حقه صحيح :mrgreen:

Link to comment

@TAPL انا ياطويل العمر حطيت سورس عند اسم الاعب عشان يجيب اسمه لحاله وسورس عند زيادة النجوم عشان يزيدها له لحاله

element وانا صراحه مادري وش فايدة

قلها لي لاهنت ^^

@Hassan Meke

كودك صحيح جربه

+ اذا تبيه بماركر تفضل

local myMarker = createMarker( x, y, z, "cylinder", size, r, b, g ) 
  
addEventHandler("onMarkerHit", root, function(  element  ) 
        if ( getElementType ( element ) == "player" then 
        setPlayerWantedLevel( element, 6 ) 
        outputChatBox  ("** [ "..getPlayerName ( element ).." ] دخل مقر سوات", root, 255, 255, 255, true ) 
    end 
end ) 

وهذي معلومات انشاء الماركر

r, g, b = 255, 255, 255 -- لون الماركر

size = 1.5 -- حجم الماركر

x, y, z = 100, 100, 100 -- احداثيات الماركر

Link to comment
انا رآح آسآعدك بـ الي آقدر عليه لأكن مدري صح ولأ
givePlayerMoney(source,1000) 
outputChatBox("تم أعطأئك نقود") 
local armor = setPedArmor (source) 
outputChatBox( "Your armor: " .. armor )  

هذا انت مسويه ولا قاطفه

Link to comment
@TAPL انا ياطويل العمر حطيت سورس عند اسم الاعب عشان يجيب اسمه لحاله وسورس عند زيادة النجوم عشان يزيدها له لحاله

element وانا صراحه مادري وش فايدة

قلها لي لاهنت ^^

@Hassan Meke

كودك صحيح جربه

+ اذا تبيه بماركر تفضل

local myMarker = createMarker( x, y, z, "cylinder", size, r, b, g ) 
  
addEventHandler("onMarkerHit", root, function(  element  ) 
        if ( getElementType ( element ) == "player" then 
        setPlayerWantedLevel( element, 6 ) 
        outputChatBox  ("** [ "..getPlayerName ( element ).." ] دخل مقر سوات", root, 255, 255, 255, true ) 
    end 
end ) 

وهذي معلومات انشاء الماركر

r, g, b = 255, 255, 255 -- لون الماركر

size = 1.5 -- حجم الماركر

x, y, z = 100, 100, 100 -- احداثيات الماركر

انت فاهم السورس غلط

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

Link to comment

انت حاط سورس وسورس حدث دخول الكول شيب هو الكول شيب نفسه فـ ما ينفع

تحط البريمتر اللي بداخل الاقواس

addEventHandler( "onColShapeHit", resourceRoot, function ( element ) 
     if ( getElementType ( element ) == "player" ) then 
        -- source = colShape 
        -- element = player 
  end 
end ) 
Link to comment
addEventHandler( "onColShapeHit", resourceRoot, function ( element ) 
     if ( getElementType ( element ) == "player" ) then 
     f source == colshape then 
     f elemnt== player then 
  end 
end ) 

كذا يصير اخي زاحف؟

addEventHandler( "onColShapeHit", resourceRoot, function ( element ) 
     if ( getElementType ( element ) == "player" ) then 
    if source == colshape then 
end 
  end 
end ) 

Link to comment
addEventHandler( "onColShapeHit", resourceRoot, function ( element ) 
     if ( getElementType ( element ) == "player" ) then 
     f source == colshape then 
     f elemnt== player then 
  end 
end ) 

كذا يصير اخي زاحف؟

i اولا ناقص حرف

وثانيا الالمنت معرفة فوق ما يحتاج حنا نتحقق من العنصر اللي دخل الماركر لو االلاعب يسوي لي الكود

وناقصك اندين

كذا يصير :

addEventHandler( "onColShapeHit", resourceRoot, function ( element ) 
    if ( getElementType ( element ) == "player" ) then 
     if source == colshape then 
       -- your code 
  end 
 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...