Jump to content

مطلوب فنكشن


Recommended Posts

السلام عليكم

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

يصير وين ما يروح تصير علامته علم

لحين ما حد يقتله ينحذف العلم والاعب الي قتله ينتقل عنده

اعطوني الفنكشات واذا فيه اي غلط اقلكم

وشكرا

Link to comment

للحين كذا وصلت شوفو لو صحيح لاعمل اول ما يموت

addEventHandler ( "onClientGUIClick", root, 
function (  ) 
  if source == bilz then 
   local bilb = guiGetText(Name Edit) 
   triggerServerEvent("bilz", localPlayer, bilb) 
  end 
end ) 
  
--------------------------------- 
  
addEvent ( "bilz", true ) 
addEventHandler ( "bilz", root, 
 function ( bilb ) 
 if getPlayerSerial ( ) == 'tostring(bilb)' then 
 createBlipAttachedTo ( source , 19 , 255 , 255 ,255 ,255 ) 
  end 
end ) 
  

Link to comment
addEventHandler ( "onClientGUIClick", root, 
function (  ) 
  if source == bilz then 
   local bilb = guiGetText(Name Edit) 
   triggerServerEvent("bilz", localPlayer, bilb) 
  end 
end ) 
  
--------------------------------- 
  
addEvent ( "bilz", true ) 
addEventHandler ( "bilz", root, 
 function ( bilb ) 
if ( getPlayerFromSerial( "tostring(bilb)" ) ) then 
 createBlipAttachedTo ( source , 19 , 255 , 255 ,255 ,255 ) 
  end 
end ) 

Link to comment
  
addEventHandler ( "onClientGUIClick", root, 
function (  ) 
  if source == bilz then 
   local bilb = guiGetText(Name Edit) 
   triggerServerEvent("bilz", localPlayer, bilb) 
  end 
end ) 
  
--------------------------------- 
 function getPlayerFromSerial ( serial ) 
    if serial and type(serial) == "string" then 
        for i, v in ipairs(getElementsByType("player")) do 
            if getPlayerSerial(v) == serial then 
                return v 
            end 
        end 
    end 
    return false 
end 
addEvent ( "bilz", true ) 
addEventHandler ( "bilz", root, 
 function ( serial ) 
 createBlipAttachedTo ( getPlayerFromSerial(serial) , 19 , 255 , 255 ,255 ,255 ) 
end ) 
  

Link to comment
  
addEventHandler ( "onClientGUIClick", root, 
function (  ) 
  if source == bilz then 
   local bilb = guiGetText(Name Edit) 
   triggerServerEvent("bilz", localPlayer, bilb) 
  end 
end ) 
  
--------------------------------- 
 function getPlayerFromSerial ( serial ) 
    if serial and type(serial) == "string" then 
        for i, v in ipairs(getElementsByType("player")) do 
            if getPlayerSerial(v) == serial then 
                return v 
            end 
        end 
    end 
    return false 
end 
addEvent ( "bilz", true ) 
addEventHandler ( "bilz", root, 
 function ( serial ) 
 createBlipAttachedTo ( getPlayerFromSerial(serial) , 19 , 255 , 255 ,255 ,255 ) 
end ) 
  

ممكن شرح للكود ؟

Link to comment

@ R4m كودككـ ما رآح يشتغل !

-- Client Side  
  
function getPlayerFromSerial ( serial ) 
    if serial and type(serial) == "string" then 
        for i, v in ipairs(getElementsByType("player")) do 
            if getPlayerSerial(v) == serial then 
                return v 
            end 
        end 
    end 
    return false 
end 
  
addEventHandler ( "onClientGUIClick", root, 
function (  ) 
  if ( source == bilz ) then 
   local bilb = guiGetText(Edit) 
   if ( bilb ~= " " ) then 
   local Player = getPlayerFromSerial ( bilb ) 
   triggerServerEvent("bilz", localPlayer, Player) 
             end 
        end 
  end  
) 

  
-- Server Side 
  
addEvent ( "bilz", true ) 
addEventHandler ( "bilz", root, 
 function ( Player ) 
 if ( Player ) then 
createBlipAttachedTo ( Player , 19 ) 
        end 
 end  
) 
Link to comment
@ R4m كودككـ ما رآح يشتغل !

-- Client Side  
  
function getPlayerFromSerial ( serial ) 
    if serial and type(serial) == "string" then 
        for i, v in ipairs(getElementsByType("player")) do 
            if getPlayerSerial(v) == serial then 
                return v 
            end 
        end 
    end 
    return false 
end 
  
addEventHandler ( "onClientGUIClick", root, 
function (  ) 
  if ( source == bilz ) then 
   local bilb = guiGetText(Edit) 
   if ( bilb ~= " " ) then 
   local Player = getPlayerFromSerial ( bilb ) 
   triggerServerEvent("bilz", localPlayer, Player) 
             end 
        end 
  end  
) 

  
-- Server Side 
  
addEvent ( "bilz", true ) 
addEventHandler ( "bilz", root, 
 function ( Player ) 
 if ( Player ) then 
createBlipAttachedTo ( Player , 19 ) 
        end 
 end  
) 

استعمل كوده لأن كودي به مشكلة

+

حسن :

استعمل getPlayerFromSerial

وهو يوسفل فانشكن

  
function getPlayerFromSerial ( serial ) 
    if serial and type(serial) == "string" then 
        for i, v in ipairs(getElementsByType("player")) do 
            if getPlayerSerial(v) == serial then 
                return v 
            end 
        end 
    end 
    return false 
end 
  

Link to comment

شو الغلط

  
GUIEditor = { 
    button = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.button[1] = guiCreateButton(283, 301, 110, 45, "~ Mr. Hassan", false) 
        guiSetAlpha(GUIEditor.button[1], 0.00) 
  
  
        bilz = guiCreateButton(283, 233, 192, 50, "", false) 
        guiSetAlpha(xbil, 0.00) 
  
  
        hassan = guiCreateButton(242, 331, 126, 42, "", false) 
        guiSetAlpha(hassan, 0.00) 
  
  
        bilb1 = guiCreateEdit(282, 184, 229, 23, "", false)     
    end 
) 
  
addEventHandler("onClientRender", root, 
    function() 
        dxDrawLine(237 - 1, 154 - 1, 237 - 1, 378, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(532, 154 - 1, 237 - 1, 154 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(237 - 1, 378, 532, 378, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(532, 378, 532, 154 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(237, 154, 295, 224, tocolor(131, 242, 12, 255), false) 
        dxDrawLine(235, 169, 532, 169, tocolor(253, 0, 0, 255), 1, false) 
        dxDrawText("Mod Flag By ~ Mr.Hassan", 299 - 1, 155 - 1, 463 - 1, 169 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, true, false) 
        dxDrawText("Mod Flag By ~ Mr.Hassan", 299 + 1, 155 - 1, 463 + 1, 169 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, true, false) 
        dxDrawText("Mod Flag By ~ Mr.Hassan", 299 - 1, 155 + 1, 463 - 1, 169 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, true, false) 
        dxDrawText("Mod Flag By ~ Mr.Hassan", 299 + 1, 155 + 1, 463 + 1, 169 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, true, false) 
        dxDrawText("Mod Flag By ~ Mr.Hassan", 299, 155, 463, 169, tocolor(232, 20, 214, 255), 1.00, "default-bold", "center", "center", false, false, false, true, false) 
        dxDrawLine(283 - 1, 233 - 1, 283 - 1, 283, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(475, 233 - 1, 283 - 1, 233 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(283 - 1, 283, 475, 283, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(475, 283, 475, 233 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(283, 233, 192, 50, tocolor(146, 153, 96, 255), false) 
        dxDrawText("Set", 283 - 1, 233 - 1, 475 - 1, 283 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", false, false, false, true, false) 
        dxDrawText("Set", 283 + 1, 233 - 1, 475 + 1, 283 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", false, false, false, true, false) 
        dxDrawText("Set", 283 - 1, 233 + 1, 475 - 1, 283 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", false, false, false, true, false) 
        dxDrawText("Set", 283 + 1, 233 + 1, 475 + 1, 283 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", false, false, false, true, false) 
        dxDrawText("Set", 283, 233, 475, 283, tocolor(18, 224, 237, 255), 1.00, "pricedown", "center", "center", false, false, false, true, false) 
        dxDrawText("Serial :", 240 - 1, 185 - 1, 309 - 1, 211 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false) 
        dxDrawText("Serial :", 240 + 1, 185 - 1, 309 + 1, 211 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false) 
        dxDrawText("Serial :", 240 - 1, 185 + 1, 309 - 1, 211 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false) 
        dxDrawText("Serial :", 240 + 1, 185 + 1, 309 + 1, 211 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false) 
        dxDrawText("Serial :", 240, 185, 309, 211, tocolor(254, 0, 1, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false) 
        dxDrawLine(243 - 1, 331 - 1, 243 - 1, 373, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(368, 331 - 1, 243 - 1, 331 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(243 - 1, 373, 368, 373, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(368, 373, 368, 331 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(243, 331, 125, 42, tocolor(206, 11, 241, 255), false) 
        dxDrawText("~ Mr. Hassan", 242 - 1, 330 - 1, 368 - 1, 373 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, true, false) 
        dxDrawText("~ Mr. Hassan", 242 + 1, 330 - 1, 368 + 1, 373 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, true, false) 
        dxDrawText("~ Mr. Hassan", 242 - 1, 330 + 1, 368 - 1, 373 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, true, false) 
        dxDrawText("~ Mr. Hassan", 242 + 1, 330 + 1, 368 + 1, 373 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, true, false) 
        dxDrawText("~ Mr. Hassan", 242, 330, 368, 373, tocolor(184, 232, 18, 255), 1.00, "default-bold", "center", "center", true, true, false, true, false) 
    end 
) 
------------------------------------------------- 
function getPlayerFromSerial ( serial ) 
    if serial and type(serial) == "tostring(bilb)" then 
        for i, v in ipairs(getElementsByType("player")) do 
            if getPlayerSerial(v) == serial then 
                return v 
            end 
        end 
    end 
    return false 
end 
  
addEventHandler ( "onClientGUIClick", root, 
function (  ) 
  if ( source == bilz ) then 
   local bilb = guiGetText(bilb1) 
   if ( bilb1 ~= " " ) then 
   local Player = getPlayerFromSerial ( bilb1 ) 
   triggerServerEvent("bilz", localPlayer, Player) 
             end 
        end 
  end 
) 
  

addEvent ( "bilz", true ) 
addEventHandler ( "bilz", root, 
 function ( Player ) 
 if ( Player ) then 
createBlipAttachedTo ( Player , 19 ) 
        end 
 end 
) 

يقلي الدي بق من guigettext

فيه مشكله مدري وش

Link to comment

  
GUIEditor = { 
    button = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.button[1] = guiCreateButton(283, 301, 110, 45, "~ Mr. Hassan", false) 
        guiSetAlpha(GUIEditor.button[1], 0.00) 
  
  
        bilz = guiCreateButton(283, 233, 192, 50, "", false) 
        guiSetAlpha(xbil, 0.00) 
  
  
        hassan = guiCreateButton(242, 331, 126, 42, "", false) 
        guiSetAlpha(hassan, 0.00) 
  
  
        bilb1 = guiCreateEdit(282, 184, 229, 23, "", false)     
    end 
) 
  
addEventHandler("onClientRender", root, 
    function() 
        dxDrawLine(237 - 1, 154 - 1, 237 - 1, 378, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(532, 154 - 1, 237 - 1, 154 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(237 - 1, 378, 532, 378, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(532, 378, 532, 154 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(237, 154, 295, 224, tocolor(131, 242, 12, 255), false) 
        dxDrawLine(235, 169, 532, 169, tocolor(253, 0, 0, 255), 1, false) 
        dxDrawText("Mod Flag By ~ Mr.Hassan", 299 - 1, 155 - 1, 463 - 1, 169 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, true, false) 
        dxDrawText("Mod Flag By ~ Mr.Hassan", 299 + 1, 155 - 1, 463 + 1, 169 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, true, false) 
        dxDrawText("Mod Flag By ~ Mr.Hassan", 299 - 1, 155 + 1, 463 - 1, 169 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, true, false) 
        dxDrawText("Mod Flag By ~ Mr.Hassan", 299 + 1, 155 + 1, 463 + 1, 169 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, true, false) 
        dxDrawText("Mod Flag By ~ Mr.Hassan", 299, 155, 463, 169, tocolor(232, 20, 214, 255), 1.00, "default-bold", "center", "center", false, false, false, true, false) 
        dxDrawLine(283 - 1, 233 - 1, 283 - 1, 283, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(475, 233 - 1, 283 - 1, 233 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(283 - 1, 283, 475, 283, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(475, 283, 475, 233 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(283, 233, 192, 50, tocolor(146, 153, 96, 255), false) 
        dxDrawText("Set", 283 - 1, 233 - 1, 475 - 1, 283 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", false, false, false, true, false) 
        dxDrawText("Set", 283 + 1, 233 - 1, 475 + 1, 283 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", false, false, false, true, false) 
        dxDrawText("Set", 283 - 1, 233 + 1, 475 - 1, 283 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", false, false, false, true, false) 
        dxDrawText("Set", 283 + 1, 233 + 1, 475 + 1, 283 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", false, false, false, true, false) 
        dxDrawText("Set", 283, 233, 475, 283, tocolor(18, 224, 237, 255), 1.00, "pricedown", "center", "center", false, false, false, true, false) 
        dxDrawText("Serial :", 240 - 1, 185 - 1, 309 - 1, 211 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false) 
        dxDrawText("Serial :", 240 + 1, 185 - 1, 309 + 1, 211 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false) 
        dxDrawText("Serial :", 240 - 1, 185 + 1, 309 - 1, 211 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false) 
        dxDrawText("Serial :", 240 + 1, 185 + 1, 309 + 1, 211 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false) 
        dxDrawText("Serial :", 240, 185, 309, 211, tocolor(254, 0, 1, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false) 
        dxDrawLine(243 - 1, 331 - 1, 243 - 1, 373, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(368, 331 - 1, 243 - 1, 331 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(243 - 1, 373, 368, 373, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(368, 373, 368, 331 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(243, 331, 125, 42, tocolor(206, 11, 241, 255), false) 
        dxDrawText("~ Mr. Hassan", 242 - 1, 330 - 1, 368 - 1, 373 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, true, false) 
        dxDrawText("~ Mr. Hassan", 242 + 1, 330 - 1, 368 + 1, 373 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, true, false) 
        dxDrawText("~ Mr. Hassan", 242 - 1, 330 + 1, 368 - 1, 373 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, true, false) 
        dxDrawText("~ Mr. Hassan", 242 + 1, 330 + 1, 368 + 1, 373 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, true, false) 
        dxDrawText("~ Mr. Hassan", 242, 330, 368, 373, tocolor(184, 232, 18, 255), 1.00, "default-bold", "center", "center", true, true, false, true, false) 
    end 
) 
------------------------------------------------- 
function getPlayerFromSerial ( serial ) 
    if serial and type(serial) == "tostring(bilb)" then 
        for i, v in ipairs(getElementsByType("player")) do 
            if getPlayerSerial(v) == serial then 
                return v 
            end 
        end 
    end 
    return false 
end 
  
addEventHandler ( "onClientGUIClick", root, 
function (  ) 
  if ( source == bilz ) then 
   local bilb = guiGetText(bilb1) 
   if ( bilb ~= " " ) then 
   local Player = getPlayerFromSerial ( bilb1 ) 
   triggerServerEvent("bilz", localPlayer, Player) 
             end 
        end 
  end 
) 
Link to comment
الدي بوق ما يقلي شيئ

وكمان ما يصير علامتي علم ولا شيئ

لا اله الا الله انت لا تلعب بالاكواد وتخربها

حطها مثل ما انا حطيتها بالصفحة الأولى !!

لا تغير شيء الله يصلححكـ !!

-- Client Side 
  
function getPlayerFromSerial ( serial ) 
    if serial and type(serial) == "string" then 
        for i, v in ipairs(getElementsByType("player")) do 
            if getPlayerSerial(v) == serial then 
                return v 
            end 
        end 
    end 
    return false 
end 
  
addEventHandler ( "onClientGUIClick", root, 
function (  ) 
  if ( source == bilz ) then 
   local bilb = guiGetText(Edit) 
   if ( bilb ~= " " ) then 
   local Player = getPlayerFromSerial ( bilb ) 
   triggerServerEvent("bilz", localPlayer, Player) 
             end 
        end 
  end 
) 

  
-- Server Side 
  
addEvent ( "bilz", true ) 
addEventHandler ( "bilz", root, 
 function ( Player ) 
 if ( Player ) then 
createBlipAttachedTo ( Player , 19 ) 
        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...