فاّرس Posted March 15, 2013 Author Share Posted March 15, 2013 تبي اي احد يسويها عادي ولا لازم قروب ولا كيف وضعها ذذ ؟ ابيها بزر Link to comment
iPrestege Posted March 15, 2013 Share Posted March 15, 2013 onClientGUIClick triggerServerEvent shutdown لازم معك الصلاحيات في قروبك اساسية ومفتوحة في الـ "ACL" وبسس # Link to comment
فاّرس Posted March 15, 2013 Author Share Posted March 15, 2013 Client Side ! addEventHandler("onClientGUIClick",root, function() if source == btnShut then triggerServerEvent("Shut",getLocalPlayer()) end end) Server Side ! addEvent("Shut",true) addEventHandler("Shut",root, function () if hasObjectPermissionTo( resource, "function.shutdown" ) then end Link to comment
iPrestege Posted March 15, 2013 Share Posted March 15, 2013 تخريف تايم ذذ وين shutdown? Link to comment
PaiN^ Posted March 15, 2013 Share Posted March 15, 2013 hasObjectPermissionTo( resource, "function.shutdown" ) then ??? Link to comment
فاّرس Posted March 15, 2013 Author Share Posted March 15, 2013 تخريف تايم ذذ وين shutdown? لول ياخي ما عرفت له حاولت لين طفشت Link to comment
iPrestege Posted March 15, 2013 Share Posted March 15, 2013 الفنكشن حق قفل الروم سهل كذا بس ذذ : shutdown("السبب") لول # Link to comment
فاّرس Posted March 15, 2013 Author Share Posted March 15, 2013 ^ يعطيك العافيه + outputChatBox(" "..PlayerName.." is Available",root,255,255,0,true) اسم اللاعب ما يجي مع الاكواد يعني كذا يجيك #070707The_#ff0000Best Link to comment
iPrestege Posted March 15, 2013 Share Posted March 15, 2013 الله يعافيك, لا بس تقدر كذا : outputChatBox(" #FF0000"..PlayerName.." #FFFF00is Available",root,255,255,0,true) Link to comment
iPrestege Posted March 15, 2013 Share Posted March 15, 2013 لول فهمتك غلط يصير كذا : -- Server -- addEvent("on",true) addEventHandler("on",root, function () PlayerName = getPlayerName(source) addEventHandler("onPlayerChat", root, mute) outputChatBox(" "..PlayerName.." is Busy",root,255,255,255,true) end) addEvent("off",true) addEventHandler("off",root, function () removeEventHandler("onPlayerChat", root, mute) outputChatBox(" "..PlayerName.." is Available",root,255,255,255,true) end ) time = 30 timer = {} function mute(msg,type) local find = string.find(msg,getPlayerName(source)) if ( type == 0 and find ) then setPlayerMuted(source,true) outputChatBox("* You Are Muted For " .. time .. " " ,source,255,0,0) timer[source] = setTimer(endMute,time * 1000,1,source) end end function endMute(player) setPlayerMuted(player,false) outputChatBox("* You Can Talk Now",player,0,255,0) end addEventHandler("onPlayerQuit",root, function () if ( isTimer(timer[source]) ) then killTimer(timer[source]) end end ) -- Client -- Wnd = guiCreateWindow(241,515,317,120,"No Subject",false) On = guiCreateButton(70,30,50,50,"On",false,Wnd) Off = guiCreateButton(10,30,50,50,"Off",false,Wnd) addEventHandler("onClientGUIClick",root, function() PlayerName = getPlayerName(localPlayer) if source == On then triggerServerEvent("on",getLocalPlayer()) elseif source == Off then triggerServerEvent("off",getLocalPlayer()) end end) Link to comment
3NAD Posted March 16, 2013 Share Posted March 16, 2013 ^يعطيك العافيه + outputChatBox(" "..PlayerName.." is Available",root,255,255,0,true) اسم اللاعب ما يجي مع الاكواد يعني كذا يجيك #070707The_#ff0000Best هذا كود سيرفر ^ Link to comment
فاّرس Posted March 16, 2013 Author Share Posted March 16, 2013 ابي اذا ضغط الزر ياكل كيك سويتها كذا : Client Side ! addEventHandler ( "onClientGUIClick", root, function ( ) if source == btnKick then triggerServerEvent("kick",getLocalPlayer()) end end) Server Side ! ^ مخلبط* addEvent("kick",true) addEventHandler("kick",root, function () kickPlayer ( "Kicked" ) end ) ^ ادري خطأ عشان كذا مابي احد يتفلسف! Link to comment
#Al-Ha[J]aRii Posted March 16, 2013 Share Posted March 16, 2013 ابي اذا ضغط الزر ياكل كيكسويتها كذا : Client Side ! addEventHandler ( "onClientGUIClick", root, function ( ) if source == btnKick then triggerServerEvent("kick",getLocalPlayer()) end end) Server Side ! ^ مخلبط* addEvent("kick",true) addEventHandler("kick",root, function () kickPlayer ( "Kicked" ) end ) ^ ادري خطأ عشان كذا مابي احد يتفلسف! جرب او رد خبر addEvent("kick", true) addEventHandler("kick", root, function () kickPlayer(source, "سبب الكيك") end ) Link to comment
فاّرس Posted March 16, 2013 Author Share Posted March 16, 2013 ابي اذا ضغط الزر ياكل كيكسويتها كذا : Client Side ! addEventHandler ( "onClientGUIClick", root, function ( ) if source == btnKick then triggerServerEvent("kick",getLocalPlayer()) end end) Server Side ! ^ مخلبط* addEvent("kick",true) addEventHandler("kick",root, function () kickPlayer ( "Kicked" ) end ) ^ ادري خطأ عشان كذا مابي احد يتفلسف! جرب او رد خبر addEvent("kick", true) addEventHandler("kick", root, function () kickPlayer(source, "سبب الكيك") end ) يعطيك العافيه Link to comment
#Al-Ha[J]aRii Posted March 16, 2013 Share Posted March 16, 2013 ابي اذا ضغط الزر ياكل كيكسويتها كذا : Client Side ! addEventHandler ( "onClientGUIClick", root, function ( ) if source == btnKick then triggerServerEvent("kick",getLocalPlayer()) end end) Server Side ! ^ مخلبط* addEvent("kick",true) addEventHandler("kick",root, function () kickPlayer ( "Kicked" ) end ) ^ ادري خطأ عشان كذا مابي احد يتفلسف! جرب او رد خبر addEvent("kick", true) addEventHandler("kick", root, function () kickPlayer(source, "سبب الكيك") end ) يعطيك العافيه الله يعافيك Link to comment
فاّرس Posted March 16, 2013 Author Share Posted March 16, 2013 ERROR:client triggered serverside event car,but event is not added serverside Client Side ! addEventHandler ( "onClientGUIClick", root, function ( ) if source == btnCar then triggerServerEvent("car",getLocalPlayer()) end end) Server Side ! addEvent("car", true) addEventHandler("car", root, function Car() local x, y, z = getElementPosition ( source ) local playerMoney = getPlayerMoney(source) if playerMoney >= 0 then takePlayerMoney (source,0) vehicle = createVehicle ( 413, x, y, z + 2 ) local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( car, r, g, b ) warpPedIntoVehicle(source, vehicle) outputChatBox("#070707#0099ccThis car for you#ff0000 only",source,0,255,0,true) elseif playerMoney <= 0 then outputChatBox(" >>#070707#0099ccYou'r Not Have #070707Money",source,255,0,0,true) end end addEventHandler("car",getRootElement(),Car) Link to comment
TD[M]ER Posted March 16, 2013 Share Posted March 16, 2013 Client Side ! addEventHandler ( "onClientGUIClick", root, function ( ) if source == btnCar then triggerServerEvent("car",getLocalPlayer()) end end) Server Side ! addEvent("car", true) addEventHandler("car", root, function () local x, y, z = getElementPosition ( source ) local playerMoney = getPlayerMoney(source) if playerMoney >= 0 then takePlayerMoney (source,0) vehicle = createVehicle ( 413, x, y, z + 2 ) local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( car, r, g, b ) warpPedIntoVehicle(source, vehicle) outputChatBox("#070707#0099ccThis car for you#ff0000 only",source,0,255,0,true) elseif playerMoney <= 0 then outputChatBox(" >>#070707#0099ccYou'r Not Have #070707>>#FF000025000$ !",source,255,0,0,true) end end ) Link to comment
فاّرس Posted March 16, 2013 Author Share Posted March 16, 2013 (edited) Client Side ! addEventHandler ( "onClientGUIClick", root, function ( ) if source == btnCar then triggerServerEvent("car",getLocalPlayer()) end end) Server Side ! addEvent("car", true) addEventHandler("car", root, function () local x, y, z = getElementPosition ( source ) local playerMoney = getPlayerMoney(source) if playerMoney >= 0 then takePlayerMoney (source,0) vehicle = createVehicle ( 413, x, y, z + 2 ) local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( car, r, g, b ) warpPedIntoVehicle(source, vehicle) outputChatBox("#070707#0099ccThis car for you#ff0000 only",source,0,255,0,true) elseif playerMoney <= 0 then outputChatBox(" >>#070707#0099ccYou'r Not Have #070707>>#FF000025000$ !",source,255,0,0,true) end end ) بس السياره ما تتلون مع ان فيه math.random Edited March 16, 2013 by Guest Link to comment
TD[M]ER Posted March 16, 2013 Share Posted March 16, 2013 جرب --SERVER addEvent("car", true) addEventHandler("car", root, function () local x, y, z = getElementPosition ( source ) local playerMoney = getPlayerMoney(source) if playerMoney >= 0 then takePlayerMoney (source,0) vehicle = createVehicle ( 413, x, y, z + 2 ) local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( vehicle, r, g, b ) warpPedIntoVehicle(source, vehicle) outputChatBox("#070707#0099ccThis car for you#ff0000 only",source,0,255,0,true) elseif playerMoney <= 0 then outputChatBox(" >>#070707#0099ccYou'r Not Have #070707>>#FF000025000$ !",source,255,0,0,true) end end ) Link to comment
فاّرس Posted March 16, 2013 Author Share Posted March 16, 2013 جرب --SERVER addEvent("car", true) addEventHandler("car", root, function () local x, y, z = getElementPosition ( source ) local playerMoney = getPlayerMoney(source) if playerMoney >= 0 then takePlayerMoney (source,0) vehicle = createVehicle ( 413, x, y, z + 2 ) local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( vehicle, r, g, b ) warpPedIntoVehicle(source, vehicle) outputChatBox("#070707#0099ccThis car for you#ff0000 only",source,0,255,0,true) elseif playerMoney <= 0 then outputChatBox(" >>#070707#0099ccYou'r Not Have #070707>>#FF000025000$ !",source,255,0,0,true) end end ) نفسها ما تغيرت + السيارات تتكرر Link to comment
MR.S3D Posted March 16, 2013 Share Posted March 16, 2013 الموضوع عن الميوت وش دخله في السيارت؟ Link to comment
فاّرس Posted March 16, 2013 Author Share Posted March 16, 2013 الموضوع عن الميوت وش دخله في السيارت؟ انا عشان ما اكثر مواضيع ! ولا تبي كل دقيقه وانا فاتح موضوع ؟! Link to comment
MR.S3D Posted March 16, 2013 Share Posted March 16, 2013 الموضوع عن الميوت وش دخله في السيارت؟ انا عشان ما اكثر مواضيع ! ولا تبي كل دقيقه وانا فاتح موضوع ؟! عشان مكتوب ميوت وتم الأفادة محد يدري أنك طلبت عن السيارات Link to comment
TD[M]ER Posted March 16, 2013 Share Posted March 16, 2013 اخر محاولة -- client side addEventHandler ( "onClientGUIClick", getRootElement(), function ( ) if source == btnCar then triggerServerEvent("getCar",getLocalPlayer()) end end) -- server side addEvent("getCar", true) addEventHandler("getCar", getRootElement(), function () local x, y, z = getElementPosition (source) local playerMoney = getPlayerMoney(source) if playerMoney >= 25000 then takePlayerMoney (source,25000) local Vh = createVehicle ( 413, x, y, z ) setVehicleColor( Vh, math.random( 255 ), math.random( 255 ), math.random( 255 ) ) warpPedIntoVehicle(source, Vh) outputChatBox("#070707#0099ccThis car for you#ff0000 only",source,0,255,0,true) elseif playerMoney <= 25000 then cancelEvent() outputChatBox(" >>#070707#0099ccYou'r Not Have #070707>>#FF000025000$ !",source,255,0,0,true) end end) ملاحظه : انت كاتب مشاكلي my problem غير problem لـ problems Link to comment
فاّرس Posted March 16, 2013 Author Share Posted March 16, 2013 اخر محاولة -- client side addEventHandler ( "onClientGUIClick", getRootElement(), function ( ) if source == btnCar then triggerServerEvent("getCar",getLocalPlayer()) end end) -- server side addEvent("getCar", true) addEventHandler("getCar", getRootElement(), function () local x, y, z = getElementPosition (source) local playerMoney = getPlayerMoney(source) if playerMoney >= 25000 then takePlayerMoney (source,25000) local Vh = createVehicle ( 413, x, y, z ) setVehicleColor( Vh, math.random( 255 ), math.random( 255 ), math.random( 255 ) ) warpPedIntoVehicle(source, Vh) outputChatBox("#070707#0099ccThis car for you#ff0000 only",source,0,255,0,true) elseif playerMoney <= 25000 then cancelEvent() outputChatBox(" >>#070707#0099ccYou'r Not Have #070707>>#FF000025000$ !",source,255,0,0,true) end end) ملاحظه : انت كاتب مشاكلي my problem غير problem لـ problems ما ضبطت المهم يعطيك العافيه خلاص موب لازم. + problems ما انتبهت اني نسيت s الجمع. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now