Jump to content

فكرة رائعة


Recommended Posts

function dxdraw() 
dxDrawText ("U have Receive new gift" ,"left","top")  
end 
addCommandHandler ("Gift", 
function () 
for _,v in ipairs (getElementsByType("player")) do 
local Money = math.random ( 1000, 5000 ) 
givePlayerMoney (v, Money) 
setElementHealth (v, 100) 
setPedArmor (v, 100) 
addEventHandler("onClientRender" ,resourceRoot,dxdraw ) 
setTimer(function () 
removeEventHandler("onClientRender" ,resourceRoot,dxdraw ) 
end, 8000, 1 ) 
end 
end) 

الكود سيرفر , والتيكست كلينت , ماينفع تدمجهم مع بعض , استخدم الترايقر

Link to comment
  • Replies 102
  • Created
  • Last Reply

Top Posters In This Topic

ماقصرتو بس هذي الاكواد الصحيحه :$

Server Side

addCommandHandler ( "Gift", function (    ) 
    for _,v in ipairs ( getElementsByType ( "player" ) ) do 
    local Money = math.random ( 1000, 5000 ) 
    givePlayerMoney ( v, Money ) 
    setElementHealth ( v, 100 ) 
    setPedArmor ( v, 100 ) 
    triggerClientEvent ( v, "DrawText", v ) 
    end 
end ) 

Client Side

local screenW, screenH = guiGetScreenSize (    ) 
  
function dxDraw (    ) 
     dxDrawText("تم اعطائك واعطاء جميع الاعبين هديه : )", (screenW - 574) / 2, (screenH - 111) / 2, ((screenW - 574) / 2) + 574, ( (screenH - 111) / 2) + 111, tocolor(26, 225, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, false, false) 
end  
  
addEvent ( "DrawText", true ) 
addEventHandler ( "DrawText", root, function (    ) 
       addEventHandler ( "onClientRender", resourceRoot, dxDraw ) 
          setTimer ( function (    ) 
       removeEventHandler ( "onClientRender", resourceRoot, dxDraw ) 
    end, 8000, 1 ) 
end ) 
Edited by Guest
Link to comment
function dxdraw() 
dxDrawText ("U have Receive new gift" ,"left","top")  
end 
addCommandHandler ("Gift", 
function () 
for _,v in ipairs (getElementsByType("player")) do 
local Money = math.random ( 1000, 5000 ) 
givePlayerMoney (v, Money) 
setElementHealth (v, 100) 
setPedArmor (v, 100) 
addEventHandler("onClientRender" ,resourceRoot,dxdraw ) 
setTimer(function () 
removeEventHandler("onClientRender" ,resourceRoot,dxdraw ) 
end, 8000, 1 ) 
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...