Jump to content

طلب كود


LOAM

Recommended Posts

السلام عليكم شباب عوز من اللوحه دى

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

ازاى شباب

وتيم الحارامى اسمو Criminal

--------------client
addEventHandler("onClientMarkerHit",marker, --عند لمس الماركر المحدد
function()--وظيفة
guiSetVisible(GUIEditor.window[1],true)--تفتح اللوحة
showCursor(true) --نظهر الماوس
end --نهاية الوظيفة
)--نهاية قوس الحدث


function guiAntiFlood(element, timer)
    if getElementType ( element ) == "gui-button" then
        local atimer = tonumber(timer)
        if atimer == nil or atimer == '' or not tonumber(atimer) then
            error("Bad Argument the Argument 2 must number")
        else
        end
        guiSetEnabled(element,false)
        setTimer(function()
        guiSetEnabled(element,true)
        end,tonumber(atimer),1)
    else
        error("Bad Argument 1 the element must button")
  end
end

local Button = GUIEditor.button[3] -- بدل اسم الزر
local Time = 40000 -- حط هنا الوقت

addEventHandler ( "onClientGUIClick",root,
  function ()
  
           if ( source == GUIEditor.button[3] ) then
     triggerServerEvent ( "givePlayerMoney", localPlayer )
     guiAntiFlood(GUIEditor.button[3],40000)
	 
    else
              if (source == GUIEditor.button[2]) then
  guiSetVisible(GUIEditor.window[1],false)--اغلاق اللوحة
  showCursor(false)--اخفاء الماوس

end--نهاية التحقق
     end--نهاية الوظيفة
           end
)--نهاية قوس الحدث
    
    
    
    
    
    ----------------server
    
    local Team = "Criminal"
local Money = 10000

addEvent("givePlayerMoney",true)
addEventHandler ("givePlayerMoney",root,
  function ()
 
    local TeamPlr = getTeamFromName ( "Criminal" ) 
    if TeamPlr then 
      givePlayerMoney ( source , Money )
      end
    end
  )

 

Link to comment
-- useful function  bool isPlayerInTeam ( player thePlayer [, team/string theTeam = nil ] )
function isPlayerInTeam(player, team)
    assert(isElement(player) and getElementType(player) == "player", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]")
    assert((not team) or type(team) == "string" or (isElement(team) and getElementType(team) == "team"), "Bad argument 2 @ isPlayerInTeam [nil/string/team expected, got " .. tostring(team) .. "]")
    return getPlayerTeam(player) == (type(team) == "string" and getTeamFromName(team) or (type(team) == "userdata" and team or (getPlayerTeam(player) or true)))
end



local Team = "Criminal"
local Money = 10000

addEvent("givePlayerMoney",true)
addEventHandler ("givePlayerMoney",root,
  function ()
  	  if isPlayerInTeam(source,"Criminal") then 
  	    givePlayerMoney ( source , Money )
     else
      	outputChatBox("----",source,255,0,0,true)
   	 end
  end

Serverside ^

Link to comment
35 minutes ago, _Kinan said:

-- useful function  bool isPlayerInTeam ( player thePlayer [, team/string theTeam = nil ] )
function isPlayerInTeam(player, team)
    assert(isElement(player) and getElementType(player) == "player", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]")
    assert((not team) or type(team) == "string" or (isElement(team) and getElementType(team) == "team"), "Bad argument 2 @ isPlayerInTeam [nil/string/team expected, got " .. tostring(team) .. "]")
    return getPlayerTeam(player) == (type(team) == "string" and getTeamFromName(team) or (type(team) == "userdata" and team or (getPlayerTeam(player) or true)))
end



local Team = "Criminal"
local Money = 10000

addEvent("givePlayerMoney",true)
addEventHandler ("givePlayerMoney",root,
  function ()
  	  if isPlayerInTeam(source,"Criminal") then 
  	    givePlayerMoney ( source , Money )
     else
      	outputChatBox("----",source,255,0,0,true)
   	 end
  end

Serverside ^

شكرا  على المجهود

  • Like 1
Link to comment
12 minutes ago, _Kinan said:

لا شكر على واجب

عملتها ومش بياخد فلوس اخى لما بضغط على الزر وين الخطاء

-- useful function  bool isPlayerInTeam ( player thePlayer [, team/Criminal theTeam = nil ] )
function isPlayerInTeam(player, Criminal)
    assert(isElement(player) and
    getElementType(player) == "Criminal", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]")
    assert((not Criminal) or type(Criminal) == "Criminal" or (isElement(Criminal) and getElementType(Criminal) == "Criminal"), "Criminal")
    return getPlayerTeam(player) == (type(Criminal) == "Criminal" and
    getTeamFromName(Criminal) or (type(Criminal) == "userdata" and Criminal or (getPlayerTeam(player) or true)))
end

 

local Team = "Criminal"
local Money = 10000

addEvent("givePlayerMoney",true)
addEventHandler ("givePlayerMoney",root,
  function ()
        if isPlayerInTeam(source,"Criminal") then
          givePlayerMoney ( source , Money )
     else
          outputChatBox("You got money 10000",source,255,0,0,true)
        end
  end

-- useful function  bool isPlayerInTeam ( player thePlayer [, team/Criminal theTeam = nil ] )
function isPlayerInTeam(player, Criminal)
    assert(isElement(player) and 
	getElementType(player) == "Criminal", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]")
    assert((not Criminal) or type(Criminal) == "Criminal" or (isElement(Criminal) and getElementType(Criminal) == "Criminal"), "Criminal")
    return getPlayerTeam(player) == (type(Criminal) == "Criminal" and
	getTeamFromName(Criminal) or (type(Criminal) == "userdata" and Criminal or (getPlayerTeam(player) or true)))
end



local Team = "Criminal"
local Money = 10000

addEvent("givePlayerMoney",true)
addEventHandler ("givePlayerMoney",root,
  function ()
  	  if isPlayerInTeam(source,"Criminal") then 
  	    givePlayerMoney ( source , Money )
     else
      	outputChatBox("You got money 10000",source,255,0,0,true)
   	 end
  end

 

Link to comment
Just now, LOAM said:

عملتها ومش بياخد فلوس اخى لما بضغط على الزر وين الخطاء

-- useful function  bool isPlayerInTeam ( player thePlayer [, team/Criminal theTeam = nil ] )
function isPlayerInTeam(player, Criminal)
    assert(isElement(player) and
    getElementType(player) == "Criminal", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]")
    assert((not Criminal) or type(Criminal) == "Criminal" or (isElement(Criminal) and getElementType(Criminal) == "Criminal"), "Criminal")
    return getPlayerTeam(player) == (type(Criminal) == "Criminal" and
    getTeamFromName(Criminal) or (type(Criminal) == "userdata" and Criminal or (getPlayerTeam(player) or true)))
end

 

local Team = "Criminal"
local Money = 10000

addEvent("givePlayerMoney",true)
addEventHandler ("givePlayerMoney",root,
  function ()
        if isPlayerInTeam(source,"Criminal") then
          givePlayerMoney ( source , Money )
     else
          outputChatBox("You got money 10000",source,255,0,0,true)
        end
  end

اخي لأنك عدلت الفنشكن الأولى, لازم تخليها زي ما هي و تروح لسطر :
17
و تعدل اسم الفريق في داخل السترنق
"Criminal" مثال:
"Police"
"Gangster"

الحل انك ترجع اول فانكشن زي ما كانت

-- useful function  bool isPlayerInTeam ( player thePlayer [, team/string theTeam = nil ] )
function isPlayerInTeam(player, team)
    assert(isElement(player) and getElementType(player) == "player", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]")
    assert((not team) or type(team) == "string" or (isElement(team) and getElementType(team) == "team"), "Bad argument 2 @ isPlayerInTeam [nil/string/team expected, got " .. tostring(team) .. "]")
    return getPlayerTeam(player) == (type(team) == "string" and getTeamFromName(team) or (type(team) == "userdata" and team or (getPlayerTeam(player) or true)))
end


 

Link to comment
7 minutes ago, _Kinan said:

اخي لأنك عدلت الفنشكن الأولى, لازم تخليها زي ما هي و تروح لسطر :
17
و تعدل اسم الفريق في داخل السترنق
"Criminal" مثال:
"Police"
"Gangster"

الحل انك ترجع اول فانكشن زي ما كانت


-- useful function  bool isPlayerInTeam ( player thePlayer [, team/string theTeam = nil ] )
function isPlayerInTeam(player, team)
    assert(isElement(player) and getElementType(player) == "player", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]")
    assert((not team) or type(team) == "string" or (isElement(team) and getElementType(team) == "team"), "Bad argument 2 @ isPlayerInTeam [nil/string/team expected, got " .. tostring(team) .. "]")
    return getPlayerTeam(player) == (type(team) == "string" and getTeamFromName(team) or (type(team) == "userdata" and team or (getPlayerTeam(player) or true)))
end


 

شكرا على التصحيح  والرد

Link to comment
6 minutes ago, _Kinan said:

العفو, لو ما اشتغل قلي :)

الف شكر اشتغل اخى  بس الرساله مش بتطلع فى الشات لما اخذ الفلوس

باخد الفلوس بس الرساله مش بتطلع

:]

Link to comment
Just now, LOAM said:

الف شكر اشتغل اخى  بس الرساله مش بتطلع فى الشات لما اخذ الفلوس

باخد الفلوس بس الرساله مش بتطلع

:]

الرسالة بتطلع لو هو مو بالفريق,
لو تبيه يطلعله الرسالة لما ياخذ فلوس
حطها تحت

givePlayerMoney

Link to comment
3 minutes ago, _Kinan said:

الرسالة بتطلع لو هو مو بالفريق,
لو تبيه يطلعله الرسالة لما ياخذ فلوس
حطها تحت

givePlayerMoney

ظبطت معايا  ردودك جميله ومنسقه

  • Like 1
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...