Jump to content

مشكلة


Recommended Posts

Posted

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

معي وظيفة راعي غنم

عدلت %80 من الوظيفة

لكن اجتني مشكلة

عندما اضغط على زر دخول الوظيفة يجيني خطأ بالترايقر

والمشكلة انا ما عدلت اكواد زر الدخول والترايقر

الاكواد

addEventHandler("onClientGUIClick",root, 
function () 
  if source == GUIEditor.button[1] then 
   local skin = guiGridListGetItemText( GUIEditor.gridlist[1],guiGridListGetSelectedItem(GUIEditor.gridlist[1]),2) 
     if skin ~= "" then 
      guiSetVisible(GUIEditor.window[1],false) 
      showCursor(false) 
      triggerServerEvent("shep",localPlayer,skin) --- start 
    end 
  elseif source == GUIEditor.button[2] then 
  guiSetVisible(GUIEditor.window[1],false) 
      showCursor(false) 
  end 
 end) 

addEvent("shep",true) 
addEventHandler("shep",root, 
function (skin) 
    setElementModel(client,tonumber(skin)) 
    setElementData(source,'Job','ShepJob') ---- 'Job'  
    setElementData ( client,'Job','ShepJob' ) 
    end 
) 

:|

facebooke : https://www.facebook.com/jaber.pro

skype : delete

Email : [email protected] :D

احلام الناس لا نهاية لها

لا يجدر بنا القلق على مقدرتنا لتحقيق أحلامنا ما دمنا نمتلك الرغبة في تحقيقها

Posted

سطر الخامس في الكلينت

احذفه

وضيف ما بين السطر الثالث والرابع ذذ تحقق

  
if guiGridListGetSelectedItem(GUIEditor.gridlist[1]) ~= -1 then 
  

---

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

واحذف السطر ال6

No Thing &*

Posted

سطر الخامس في الكلينت

احذفه

وضيف ما بين السطر الثالث والرابع ذذ تحقق

  
if guiGridListGetSelectedItem(GUIEditor.gridlist[1]) ~= -1 then 
  

---

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

واحذف السطر ال6

ما تغيير شيئ والدي بق نفسه

facebooke : https://www.facebook.com/jaber.pro

skype : delete

Email : [email protected] :D

احلام الناس لا نهاية لها

لا يجدر بنا القلق على مقدرتنا لتحقيق أحلامنا ما دمنا نمتلك الرغبة في تحقيقها

Posted

جابر لاتعدل في كودك شيء

بس بدل اللوكال بلاير ب

root

النتيجة

  
addEventHandler("onClientGUIClick",root, 
function () 
  if source == GUIEditor.button[1] then 
   local skin = guiGridListGetItemText( GUIEditor.gridlist[1],guiGridListGetSelectedItem(GUIEditor.gridlist[1]),2) 
     if skin ~= "" then 
      guiSetVisible(GUIEditor.window[1],false) 
      showCursor(false) 
      triggerServerEvent("shep",root,skin) --- start 
    end 
  elseif source == GUIEditor.button[2] then 
  guiSetVisible(GUIEditor.window[1],false) 
      showCursor(false) 
  end 
 end) 
  

No Thing &*

Posted

جابر لاتعدل في كودك شيء

بس بدل اللوكال بلاير ب

root

النتيجة

  
addEventHandler("onClientGUIClick",root, 
function () 
  if source == GUIEditor.button[1] then 
   local skin = guiGridListGetItemText( GUIEditor.gridlist[1],guiGridListGetSelectedItem(GUIEditor.gridlist[1]),2) 
     if skin ~= "" then 
      guiSetVisible(GUIEditor.window[1],false) 
      showCursor(false) 
      triggerServerEvent("shep",root,skin) --- start 
    end 
  elseif source == GUIEditor.button[2] then 
  guiSetVisible(GUIEditor.window[1],false) 
      showCursor(false) 
  end 
 end) 
  

ما تغيير شيئ

facebooke : https://www.facebook.com/jaber.pro

skype : delete

Email : [email protected] :D

احلام الناس لا نهاية لها

لا يجدر بنا القلق على مقدرتنا لتحقيق أحلامنا ما دمنا نمتلك الرغبة في تحقيقها

Posted
  
--Client Side 
function SetPanelShow( Panel , True , False ) 
    guiSetVisible(Panel,True) 
         showCursor(False) 
end  
  
addEventHandler("onClientGUIClick",root, 
function (  ) 
  if ( source == GUIEditor.button[1] ) then 
      if ( Skin ~= "" ) then 
          local Skin = guiGridListGetItemText( GUIEditor.gridlist[1],guiGridListGetSelectedItem(GUIEditor.gridlist[1]),2) 
          SetPanelShow( GUIEditor.window[1] , false , false ) 
          triggerServerEvent("Shep",localPlayer,Skin) 
        end 
  elseif ( source == GUIEditor.button[2] ) then 
      SetPanelShow( GUIEditor.window[1] , false , false ) 
    end 
end ) 

  
-- Server Side 
addEvent("Shep",true) 
addEventHandler("Shep",root, 
function ( Skin ) 
    setElementModel(client,tonumber(Skin) ) 
        setElementData ( client,'Job','ShepJob' ) 
end ) 

Posted

حتى الان المشكلة ما تغيرت

p_118otya1.png

المشكلة اجت يوم ضفت الكود دا

addCommandHandler("meat",function() 
    if getElementHealth(source) =< 50 then 
        setElementHealth(source,getElementHealth(source) + 50) 
            setElementData(source,"meat",getElementData(source,"meat") - 1 ) 
    else 
        outputChatBox("Your Health is > 50",source,255,0,0) 
     
    end 
end) 

facebooke : https://www.facebook.com/jaber.pro

skype : delete

Email : [email protected] :D

احلام الناس لا نهاية لها

لا يجدر بنا القلق على مقدرتنا لتحقيق أحلامنا ما دمنا نمتلك الرغبة في تحقيقها

Posted

addCommandHandler("meat", 
function(  ) 
    if ( getElementHealth(source) <= 50 ) then 
        setElementHealth(source,getElementHealth(source) + 50) 
            setElementData(source,"meat",getElementData(source,"meat") - 1 ) 
    else 
        outputChatBox("Your Health is > 50",source,255,0,0,true) 
    
    end 
end ) 

ضض

Posted
addCommandHandler("meat", 
function(  ) 
    if ( getElementHealth(source) <= 50 ) then 
        setElementHealth(source,getElementHealth(source) + 50) 
            setElementData(source,"meat",getElementData(source,"meat") - 1 ) 
    else 
        outputChatBox("Your Health is > 50",source,255,0,0,true) 
    
    end 
end ) 

ضض

شكراً لك لكن ما شوف غيرت شيئ غير ,true

facebooke : https://www.facebook.com/jaber.pro

skype : delete

Email : [email protected] :D

احلام الناس لا نهاية لها

لا يجدر بنا القلق على مقدرتنا لتحقيق أحلامنا ما دمنا نمتلك الرغبة في تحقيقها

Posted
if ( getElementHealth(source) <= 50 ) then 

:twisted::twisted:

اها شكرأً

عند كتابة الكلمة باف8

يجي خطأ بالكود دا

الدي بق

ERROR: Shep/Server.lua:26: attempt to compare boolean with number

سطر 26 = سطر هذا الكود

facebooke : https://www.facebook.com/jaber.pro

skype : delete

Email : [email protected] :D

احلام الناس لا نهاية لها

لا يجدر بنا القلق على مقدرتنا لتحقيق أحلامنا ما دمنا نمتلك الرغبة في تحقيقها

Posted

ضفت هذا التحقق

    if getElementData(source,"meat") >= 1 then 

صار يجيني خطأ بالسطر الخاص به

وجربته بالحالات دي ايضاً

    if getElementData(source,"meat") > 0 then 

    if getElementData(source,"meat") > 0 or getElementData(source,"meat") == 0 then 

facebooke : https://www.facebook.com/jaber.pro

skype : delete

Email : [email protected] :D

احلام الناس لا نهاية لها

لا يجدر بنا القلق على مقدرتنا لتحقيق أحلامنا ما دمنا نمتلك الرغبة في تحقيقها

Posted

جرب

  
if getElementData(source,"meat") ~= 0 then 
  

Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة

ليس عليك اسعاد الجميع ,
ولكن عليك بإن لا تؤذي أحداً 

=========
You do not have to make everyone happy,
But you should not hurt anyone

 

Want to contact with me?

 

Discord: JustCarry#2616 (Always there)
Skype: Live:JustCarry10 (Not always)

Posted

WARNING: Sheep/server.lua:26: Bad argument @ 'getElementData' [Expected element at argument 1, got nil]

ERROR: Shep/Server.lua:26: attempt to compare boolean with number

    if getElementData(source,"meat") >= 1 then 

facebooke : https://www.facebook.com/jaber.pro

skype : delete

Email : [email protected] :D

احلام الناس لا نهاية لها

لا يجدر بنا القلق على مقدرتنا لتحقيق أحلامنا ما دمنا نمتلك الرغبة في تحقيقها

Posted
WARNING: Sheep/server.lua:26: Bad argument @ 'getElementData' [Expected element at argument 1, got nil]

ERROR: Shep/Server.lua:26: attempt to compare boolean with number

    if getElementData(source,"meat") >= 1 then 

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

 

 

Posted
addCommandHandler("meat", 
function(  ) 
    if getElementData(source,"meat") >= 1 then 
    if ( getElementHealth(source) < 49 ) then 
        setElementHealth(source,getElementHealth(source) + 50) 
            setElementData(source,"meat",getElementData(source,"meat") - 1 ) 
                outputChatBox("You Was get Health",source,0,255,0,true) 
    else outputChatBox("Your Health is > 50",source,255,0,0,true) 
        end 
    end 
end ) 

facebooke : https://www.facebook.com/jaber.pro

skype : delete

Email : [email protected] :D

احلام الناس لا نهاية لها

لا يجدر بنا القلق على مقدرتنا لتحقيق أحلامنا ما دمنا نمتلك الرغبة في تحقيقها

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