Jump to content

طلب فنكشات :] ..


Recommended Posts

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

كيفكم شباب ؟ .. أن شاء الله بخير .. المهمم

انا عندي لوحة قريد ليست فيها أسماء اللاعبين , وسويت زر وايديت بوكس ..

ابي الفنكشات الي لما اكتب الكلام بالايديت بوكس واحدد اسم اللاعب واضغط الزر

يجي الكلام الي كتبها على شاشة اللاعب الي اختاره هو ..

ان شاء الله فهمتوني .. :D

وشكراً

Link to comment
onClientResourceStart 
guiGetText 
guiGridListGetSelectedItem 
getPlayerFromName 
dxDrawText 

ممكن مثال لذا الفنكشن

DxDrawText 

لاني ما فهمت على الويكي

تقدر تستخدم بداله اللبل اللي بالجوي ادتور

بس لازم تسوي ترايقر سيرفر وترجعه كلنت عشان يجي للاعب على شاشته

triggerServerEvent 
triggerClientEvent 

Link to comment
onClientResourceStart 
guiGetText 
guiGridListGetSelectedItem 
getPlayerFromName 
dxDrawText 

ممكن مثال لذا الفنكشن

DxDrawText 

لاني ما فهمت على الويكي

تقدر تستخدم بداله اللبل اللي بالجوي ادتور

بس لازم تسوي ترايقر سيرفر وترجعه كلنت عشان يجي للاعب على شاشته

triggerServerEvent 
triggerClientEvent 

انا بشوف فنكشن

DxDrawText 

أفضل .. لان كتابة أحلى وأوضح .. ياريت أحد يجي ويعطيني مثال

Link to comment
  dxDrawText("Welcome",555, 170,799, 250, tocolor(18, 212, 8, 255), 5.00, "default", "left", "top", false, false, false, false, false) 

تقدر انت تضبط بكيفك ويمديك تسوي مثله بالجوي ايديتور

بس لاما تستعمله استخدم

onClientPreRender 

Link to comment

انا بشوف فنكشن

DxDrawText 

أفضل .. لان كتابة أحلى وأوضح .. ياريت أحد يجي ويعطيني مثال

تقدر تسويه من ال guieditor بكل سهوله

شوف أخوي انا الحين سويته , بمود guieditor

تمام ؟ ..

وسويت الفنكشات الي احتاجهم

بس ذا الفنكشن

DxDrawText 

وش الي رح استفيد منه ؟

أتمنى ما تعبتكم معي

Link to comment

انا بشوف فنكشن

DxDrawText 

أفضل .. لان كتابة أحلى وأوضح .. ياريت أحد يجي ويعطيني مثال

تقدر تسويه من ال guieditor بكل سهوله

شوف أخوي انا الحين سويته , بمود guieditor

تمام ؟ ..

وسويت الفنكشات الي احتاجهم

بس ذا الفنكشن

DxDrawText 

وش الي رح استفيد منه ؟

أتمنى ما تعبتكم معي

تستفيد منه انه يظهر لك كلام بالشاشه

Link to comment
بالله ممكن مثال على حسب طلبي ي اوسكار ,

جرب

  
-- Client 
addEventHandler ( "onClientGUIClick",button,function () 
if (guiGridListGetSelectedItem (gridlist)) then 
local shout = guiGridListGetItemText (gridlist, guiGridListGetSelectedItem (gridlist), column ) 
Shout = guiGetText (edit) 
triggerServerEvent ( "send",localPlayer,shout,Shout) 
end 
end,false) 
local screenW, screenH = guiGetScreenSize() 
function shoutdx() 
dxDrawText(Shout, 0 - 1, 269 - 1, 800 - 1, 332 - 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, 0 + 1, 269 - 1, 800 + 1, 332 - 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, 0 - 1, 269 + 1, 800 - 1, 332 + 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, 0 + 1, 269 + 1, 800 + 1, 332 + 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, (screenW - 800) / 2, (screenH - 63) / 2, ((screenW - 800) / 2) + 800, ( (screenH - 63) / 2) + 63, tocolor(255, 255, 255, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
end 
addEvent("Shot", true ) 
addEventHandler("Shot", root, 
function () 
addEventHandler("onClientRender", root,shoutdx) 
end) 

  
--- Server 
addEvent( "send", true ) 
addEventHandler( "send",root, 
function(player,msg) 
local msg = getPlayerFromName(player) 
if ( msg ) then 
triggerClientEvent("Shot",root,tostring(msg),player) 
end  
end) 

Link to comment
بالله ممكن مثال على حسب طلبي ي اوسكار ,

جرب

  
-- Client 
addEventHandler ( "onClientGUIClick",button,function () 
if (guiGridListGetSelectedItem (gridlist)) then 
local shout = guiGridListGetItemText (gridlist, guiGridListGetSelectedItem (gridlist), column ) 
Shout = guiGetText (edit) 
triggerServerEvent ( "send",localPlayer,shout,Shout) 
end 
end,false) 
local screenW, screenH = guiGetScreenSize() 
function shoutdx() 
dxDrawText(Shout, 0 - 1, 269 - 1, 800 - 1, 332 - 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, 0 + 1, 269 - 1, 800 + 1, 332 - 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, 0 - 1, 269 + 1, 800 - 1, 332 + 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, 0 + 1, 269 + 1, 800 + 1, 332 + 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, (screenW - 800) / 2, (screenH - 63) / 2, ((screenW - 800) / 2) + 800, ( (screenH - 63) / 2) + 63, tocolor(255, 255, 255, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
end 
addEvent("Shot", true ) 
addEventHandler("Shot", root, 
function () 
addEventHandler("onClientRender", root,shoutdx) 
end) 

  
--- Server 
addEvent( "send", true ) 
addEventHandler( "send",root, 
function(player,msg) 
local msg = getPlayerFromName(player) 
if ( msg ) then 
triggerClientEvent("Shot",root,tostring(msg),player) 
end  
end) 

تمام حطيته , بس من اكتب بالايديت بوكس واضغط على الزر م يجي شي

وذا الفنكشن له تأثير

guiGetText 

لاني ما سويته

Link to comment
بالله ممكن مثال على حسب طلبي ي اوسكار ,

جرب

  
-- Client 
addEventHandler ( "onClientGUIClick",button,function () 
if (guiGridListGetSelectedItem (gridlist)) then 
local shout = guiGridListGetItemText (gridlist, guiGridListGetSelectedItem (gridlist), column ) 
Shout = guiGetText (edit) 
triggerServerEvent ( "send",localPlayer,shout,Shout) 
end 
end,false) 
local screenW, screenH = guiGetScreenSize() 
function shoutdx() 
dxDrawText(Shout, 0 - 1, 269 - 1, 800 - 1, 332 - 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, 0 + 1, 269 - 1, 800 + 1, 332 - 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, 0 - 1, 269 + 1, 800 - 1, 332 + 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, 0 + 1, 269 + 1, 800 + 1, 332 + 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, (screenW - 800) / 2, (screenH - 63) / 2, ((screenW - 800) / 2) + 800, ( (screenH - 63) / 2) + 63, tocolor(255, 255, 255, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
end 
addEvent("Shot", true ) 
addEventHandler("Shot", root, 
function () 
addEventHandler("onClientRender", root,shoutdx) 
end) 

  
--- Server 
addEvent( "send", true ) 
addEventHandler( "send",root, 
function(player,msg) 
local msg = getPlayerFromName(player) 
if ( msg ) then 
triggerClientEvent("Shot",root,tostring(msg),player) 
end  
end) 

تمام حطيته , بس من اكتب بالايديت بوكس واضغط على الزر م يجي شي

وذا الفنكشن له تأثير

guiGetText 

لاني ما سويته

لازم تختار اسم لاعب عشان ترسل له

Link to comment
يب أعرف اخوي , انا مسوي القريد ليست وفيه اسماء اللاعبين بس من احدد اسم اللاعب واكتب الكلام بالايديت بوكس

واضغط زر الارسال

ما يجي الكلام

غريبه شغال عندي

المهم جرب

local screenW, screenH = guiGetScreenSize() 
window = guiCreateWindow((screenW - 241) / 2, (screenH - 306) / 2, 241, 306, "", false) 
guiWindowSetSizable(window, false) 
guiSetAlpha(window, 1.00) 
gridlist = guiCreateGridList(9, 27, 222, 238, false, window) 
column = guiGridListAddColumn(gridlist, "اللاعبين", 0.9) 
edit = guiCreateEdit(107, 270, 124, 27, "", false, window) 
button = guiCreateButton(9, 270, 88, 27, "ارسال", false, window) 
function Players() 
guiGridListClear(gridlist) 
for _, plr in ipairs(getElementsByType("player")) do 
local row = guiGridListAddRow (gridlist) 
guiGridListSetItemText ( gridlist, row, column, getPlayerName (plr), false, false ) 
end 
end 
addEventHandler ( "onClientGUIClick",button,function () 
if ( guiGridListGetSelectedItem(gridlist) ~= -1 ) then 
local shout = guiGridListGetItemText (gridlist, guiGridListGetSelectedItem (gridlist), column ) 
Shout = guiGetText (edit) 
triggerServerEvent ( "send",localPlayer,shout,Shout) 
else 
outputChatBox("من فضلك اختر اسم لاعب",245,5,0) 
end 
end,false) 
function shoutdx() 
dxDrawText(Shout, 0 - 1, 269 - 1, 800 - 1, 332 - 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, 0 + 1, 269 - 1, 800 + 1, 332 - 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, 0 - 1, 269 + 1, 800 - 1, 332 + 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, 0 + 1, 269 + 1, 800 + 1, 332 + 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, (screenW - 800) / 2, (screenH - 63) / 2, ((screenW - 800) / 2) + 800, ( (screenH - 63) / 2) + 63, tocolor(255, 255, 255, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
end 
addEvent("Shot", true ) 
addEventHandler("Shot", root, 
function () 
addEventHandler("onClientRender", root,shoutdx) 
end) 
guiSetVisible(window,false) 
bindKey("F5","down", function ( ) 
guiSetVisible(window, not guiGetVisible(window)) 
showCursor(guiGetVisible(window)) 
Players() 
end) 

Link to comment
يب أعرف اخوي , انا مسوي القريد ليست وفيه اسماء اللاعبين بس من احدد اسم اللاعب واكتب الكلام بالايديت بوكس

واضغط زر الارسال

ما يجي الكلام

غريبه شغال عندي

المهم جرب

local screenW, screenH = guiGetScreenSize() 
window = guiCreateWindow((screenW - 241) / 2, (screenH - 306) / 2, 241, 306, "", false) 
guiWindowSetSizable(window, false) 
guiSetAlpha(window, 1.00) 
gridlist = guiCreateGridList(9, 27, 222, 238, false, window) 
column = guiGridListAddColumn(gridlist, "اللاعبين", 0.9) 
edit = guiCreateEdit(107, 270, 124, 27, "", false, window) 
button = guiCreateButton(9, 270, 88, 27, "ارسال", false, window) 
function Players() 
guiGridListClear(gridlist) 
for _, plr in ipairs(getElementsByType("player")) do 
local row = guiGridListAddRow (gridlist) 
guiGridListSetItemText ( gridlist, row, column, getPlayerName (plr), false, false ) 
end 
end 
addEventHandler ( "onClientGUIClick",button,function () 
if ( guiGridListGetSelectedItem(gridlist) ~= -1 ) then 
local shout = guiGridListGetItemText (gridlist, guiGridListGetSelectedItem (gridlist), column ) 
Shout = guiGetText (edit) 
triggerServerEvent ( "send",localPlayer,shout,Shout) 
else 
outputChatBox("من فضلك اختر اسم لاعب",245,5,0) 
end 
end,false) 
function shoutdx() 
dxDrawText(Shout, 0 - 1, 269 - 1, 800 - 1, 332 - 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, 0 + 1, 269 - 1, 800 + 1, 332 - 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, 0 - 1, 269 + 1, 800 - 1, 332 + 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, 0 + 1, 269 + 1, 800 + 1, 332 + 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(Shout, (screenW - 800) / 2, (screenH - 63) / 2, ((screenW - 800) / 2) + 800, ( (screenH - 63) / 2) + 63, tocolor(255, 255, 255, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
end 
addEvent("Shot", true ) 
addEventHandler("Shot", root, 
function () 
addEventHandler("onClientRender", root,shoutdx) 
end) 
guiSetVisible(window,false) 
bindKey("F5","down", function ( ) 
guiSetVisible(window, not guiGetVisible(window)) 
showCursor(guiGetVisible(window)) 
Players() 
end) 

تمام يعطيك العافية بس ابي الكتابة تختفي بعد 30 ثانية

Link to comment
كمل انت باقى المود
setTimer 
removeEventHandler 

تمام يعطيك العافيةة ..

اخر طلب ابي لما يكتب الكلام للاعب يجي اسم اللاعب الي كتب الكلام ورسله له

يعني

مثلاً انا الحين كتبت " منورين " ابي يجي اسم الي كتب كلمه " منورين " ,ء

Link to comment
local screenW, screenH = guiGetScreenSize() 
window = guiCreateWindow((screenW - 241) / 2, (screenH - 306) / 2, 241, 306, "", false) 
guiWindowSetSizable(window, false) 
guiSetAlpha(window, 1.00) 
gridlist = guiCreateGridList(9, 27, 222, 238, false, window) 
column = guiGridListAddColumn(gridlist, "????????", 0.9) 
edit = guiCreateEdit(107, 270, 124, 27, "", false, window) 
button = guiCreateButton(9, 270, 88, 27, "?????", false, window) 
function Players() 
guiGridListClear(gridlist) 
for _, plr in ipairs(getElementsByType("player")) do 
local row = guiGridListAddRow (gridlist) 
guiGridListSetItemText ( gridlist, row, column, getPlayerName (plr), false, false ) 
end 
end 
addEventHandler ( "onClientGUIClick",button,function () 
if ( guiGridListGetSelectedItem(gridlist) ~= -1 ) then 
 splayer = guiGridListGetItemText (gridlist, guiGridListGetSelectedItem (gridlist), column ) 
Shout = guiGetText (edit) 
triggerServerEvent ( "send",localPlayer,splayer,Shout) 
else 
outputChatBox("?? ???? ???? ??? ????",245,5,0) 
end 
end,false) 
function shoutdx() 
dxDrawText(splayer..":"..Shout, 0 - 1, 269 - 1, 800 - 1, 332 - 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(splayer..":"..Shout, 0 + 1, 269 - 1, 800 + 1, 332 - 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(splayer..":"..Shout, 0 - 1, 269 + 1, 800 - 1, 332 + 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(splayer..":"..Shout, 0 + 1, 269 + 1, 800 + 1, 332 + 1, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
dxDrawText(splayer..":"..Shout, (screenW - 800) / 2, (screenH - 63) / 2, ((screenW - 800) / 2) + 800, ( (screenH - 63) / 2) + 63, tocolor(255, 255, 255, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) 
end 
addEvent("Shot", true ) 
addEventHandler("Shot", root, 
function () 
addEventHandler("onClientRender", root,shoutdx) 
end) 
guiSetVisible(window,false) 
bindKey("F5","down", function ( ) 
guiSetVisible(window, not guiGetVisible(window)) 
showCursor(guiGetVisible(window)) 
Players() 
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...