Jump to content

تصحيح كود بسيط


Recommended Posts

السلام عليكم ورحمه الله وبركاته

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

بس لما ضفت معه شات خرب

الشات يعني لما يجي على الماركرر بغير التيم الي انا حدته

يجيه كللام بشات مثال انت مب ب تيم الشرطه

بس خرب

ارجو التصليح

الكود:

addEventHandler("onClientMarkerHit",root, 
function (hit) 
 if source == marker2 then 
  if getElementType(hit) == "player" then 
   if isPedInVehicle(hit) then return end 
    if localPlayer == hit then  
  if (getPlayerTeam(hit) ~= getTeamFromName("No Team")then return   exports["guimessages"]:outputClint("sss",player,255, 0, 0) end    -- هنا العطل 
    
   guiSetVisible(Harvestwindow,true) 
      showCursor(true) 
      local oldSkin = getElementModel(localPlayer) 
      guiGridListSetSelectedItem ( GUIEditor.gridlist[1], 0, 0) 
    end 
   end 
  end 
 end 
 ) 

Link to comment
addEventHandler("onClientMarkerHit",root, 
function (hit) 
 if source == marker2 then 
  if getElementType(hit) == "player" then 
   if isPedInVehicle(hit) then return end 
    if localPlayer == hit then 
  if (getPlayerTeam(hit) ~= getTeamFromName("No Team")then return   exports["guimessages"]:outputClint("sss",source,255, 0, 0) end    -- هنا العطل 
    
   guiSetVisible(Harvestwindow,true) 
      showCursor(true) 
      local oldSkin = getElementModel(localPlayer) 
      guiGridListSetSelectedItem ( GUIEditor.gridlist[1], 0, 0) 
    end 
   end 
  end 
 end 
 ) 

. source بالـ player مدام الخطا من المسج الي يطلع ,, تاكد اذا المود هو شغال + استبدلت لك ال

Link to comment
addEventHandler("onClientMarkerHit",root, 
function (hit) 
 if source == marker2 then 
  if getElementType(hit) == "player" then 
   if isPedInVehicle(hit) then return end 
    if localPlayer == hit then 
  if (getPlayerTeam(hit) ~= getTeamFromName("No Team")then return   exports["guimessages"]:outputClint("sss",source,255, 0, 0) end    -- هنا العطل 
    
   guiSetVisible(Harvestwindow,true) 
      showCursor(true) 
      local oldSkin = getElementModel(localPlayer) 
      guiGridListSetSelectedItem ( GUIEditor.gridlist[1], 0, 0) 
    end 
   end 
  end 
 end 
 ) 

. source بالـ player مدام الخطا من المسج الي يطلع ,, تاكد اذا المود هو شغال + استبدلت لك ال

X

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

addEventHandler("onClientMarkerHit",marker2, function (hit) 
    if ( hit == localPlayer ) and getElementType( hit ) == "player" then 
       if isPedInVehicle( hit ) then return end 
          if getPlayerTeam( hit ) ~= getTeamFromName ( "No Team" ) then  
            exports["guimessages"]:outputClint( "sss", 255, 0, 0 )  
            return end 
            guiSetVisible( Harvestwindow,true ) 
            showCursor( true ) 
            local oldSkin = getElementModel( localPlayer ) 
            guiGridListSetSelectedItem ( GUIEditor.gridlist[1], 0, 0 ) 
          end 
       end 
 ) 
Link to comment

X

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

addEventHandler("onClientMarkerHit",marker2, function (hit) 
    if ( hit == localPlayer ) and getElementType( hit ) == "player" then 
       if isPedInVehicle( hit ) then return end 
          if getPlayerTeam( hit ) ~= getTeamFromName ( "No Team" ) then  
            exports["guimessages"]:outputClint( "sss", 255, 0, 0 )  
            return end 
            guiSetVisible( Harvestwindow,true ) 
            showCursor( true ) 
            local oldSkin = getElementModel( localPlayer ) 
            guiGridListSetSelectedItem ( GUIEditor.gridlist[1], 0, 0 ) 
          end 
       end 
 ) 

الاول تحقق ان اللاعب معه تيم بعدين تحقق من اسم التيم .

Link to comment
addEventHandler("onClientMarkerHit",marker2, function (hit) 
    if ( hit == localPlayer ) and getElementType( hit ) == "player" then 
       if isPedInVehicle( hit ) then return end 
          if getPlayerTeam( hit ) ~= getTeamFromName ( "No Team" ) then 
            exports["guimessages"]:outputClint(hit,"sss", 255, 0, 0 ) 
            return end 
            guiSetVisible( Harvestwindow,true ) 
            showCursor( true ) 
            local oldSkin = getElementModel( localPlayer ) 
            guiGridListSetSelectedItem ( GUIEditor.gridlist[1], 0, 0 ) 
          end 
       end 
 ) 

Link to comment

الاول تحقق ان اللاعب معه تيم بعدين تحقق من اسم التيم .

همم , يب صحيح , مشكور ع التنبيه

addEventHandler("onClientMarkerHit",marker2, function (hit) 
    if ( hit == localPlayer ) and getElementType( hit ) == "player" then 
       if isPedInVehicle( hit ) then return end 
          if getPlayerTeam (hit) and getTeamName (getPlayerTeam (hit)) ~= "No Team" then  
            exports["guimessages"]:outputClient( "sss", 255, 0, 0 )  
            return end 
            guiSetVisible( Harvestwindow,true ) 
            showCursor( true ) 
            local oldSkin = getElementModel( localPlayer ) 
            guiGridListSetSelectedItem ( GUIEditor.gridlist[1], 0, 0 ) 
          end 
       end 
 ) 

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

@Mr.alkmasha

exports["guimessages"]:outputClint(hit,"sss", 255, 0, 0 ) 

X

في الكلاينت مافيه ارقمنت الاعب

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

شف هنا

https://forum.mtasa.com/viewtopic.php?f=108&t=42340

Link to comment

الاول تحقق ان اللاعب معه تيم بعدين تحقق من اسم التيم .

همم , يب صحيح , مشكور ع التنبيه

addEventHandler("onClientMarkerHit",marker2, function (hit) 
    if ( hit == localPlayer ) and getElementType( hit ) == "player" then 
       if isPedInVehicle( hit ) then return end 
          if getPlayerTeam (hit) and getTeamName (getPlayerTeam (hit)) ~= "No Team" then  
            exports["guimessages"]:outputClient( "sss", 255, 0, 0 )  
            return end 
            guiSetVisible( Harvestwindow,true ) 
            showCursor( true ) 
            local oldSkin = getElementModel( localPlayer ) 
            guiGridListSetSelectedItem ( GUIEditor.gridlist[1], 0, 0 ) 
          end 
       end 
 ) 

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

@Mr.alkmasha

exports["guimessages"]:outputClint(hit,"sss", 255, 0, 0 ) 

X

في الكلاينت مافيه ارقمنت الاعب

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

شف هنا

https://forum.mtasa.com/viewtopic.php?f=108&t=42340

بس بل

guimessages

وله كمان ب outputChatBox

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