Professional Posted July 14, 2015 Share Posted July 14, 2015 اجل وانا وش احطه ؟؟ المهم لا نتقاتل وش لسا نكمل في الكود Link to comment
iMr.SFA7 Posted July 14, 2015 Share Posted July 14, 2015 اجل وانا وش احطه ؟؟المهم لا نتقاتل وش لسا نكمل في الكود حط بدل root في كودك حط اسم الزر في طريقة ثانية كذآ addEventHandler ("onClientGUIClick",root, function ( ) if source == Button then triggerServerEvent ( "Mta", localPlayer ) end end ) الكود خلصنآه Link to comment
Professional Posted July 14, 2015 Share Posted July 14, 2015 هههههههههه بس كذا يضغط على الزر يجيه عدد عشوائي من الفلوس Link to comment
!#NssoR_) Posted July 14, 2015 Share Posted July 14, 2015 addEvent("MTA",true) addEventHandler("MTA",root, function ( ) givePlayerMoney ( source, 10000) end) كذا ماراح يكون عشوائي Link to comment
iMr.SFA7 Posted July 14, 2015 Share Posted July 14, 2015 هههههههههه بس كذا يضغط على الزر يجيه عدد عشوائي من الفلوس يب هذا المطلوب لآننا حطينا math.random Event : onClientResourceStart setWeather setTime setSunColor addEventHandler ("onClientResourceStart",resourceRoot, function ( ) setWeather ( 7 ) end ) Link to comment
Professional Posted July 14, 2015 Share Posted July 14, 2015 addEventHandler ("onClientResourceStart",resourceRoot, function ( ) setWeather ( 7 ) setTime ( 0 , 1 ) --- دقيقه setSunColor ( 255 , 255 , 255 ,255 , 255 , 255 ) -- غير رقم الالوان غلى كيفك end ) Link to comment
' A F . Posted July 15, 2015 Share Posted July 15, 2015 (edited) triggerServerEvent Event : 'onClientGUIClick' giveWeapon takePlayerMoney getPlayerMoney addEvent("TEP",true) addEventHandler("TEP",root, function ( ) if ( getPlayerMoney(client) =< 1000 ) then -- أكمل takePlayerMoney(client,1000) else -- أكمل end end) Edited July 15, 2015 by Guest Link to comment
; Mr.T76eM # Posted July 15, 2015 Share Posted July 15, 2015 (edited) addEvent("TEP",true) addEventHandler("TEP",root, function ( ) if ( getPlayerMoney(client) >= 1000 ) then giveWeapon(client,35) takePlayerMoney(client,1000) else outputChatBox("You dont have enough money ! " ,client,255,0,0,false) end end) Edited July 15, 2015 by Guest Link to comment
</Mr.Tn6eL> Posted July 15, 2015 Author Share Posted July 15, 2015 addEvent("TEP",true) addEventHandler("TEP",root, function ( ) if ( getPlayerMoney(client) =< 1000 ) then giveWeapon(client,35) takePlayerMoney(client,1000) else outputChatBox("You dont have enough money ! " ,client,255,0,0,false) end end) =< to <= Link to comment
Professional Posted July 15, 2015 Share Posted July 15, 2015 (edited) server = addEvent("TEP",true) addEventHandler("TEP",root, function () local money = getPlayerMoney(source) if (money > 1000) then giveWeapon ( source , 38 , 50000 ) takePlayerMoney(source,1000) outputChatBox ( "You Have Now Weapon 38 " ,255 ,255 ,255 ,255 , true ) else outputChatBox ( "You No Have Money !! " ,255 ,255 ,255 ,255 , true ) end end) Client = addEventHandler('onClientGUIClick',root, function () triggerServerEvent("TEP",getLocalPlayer()) end) Edited July 15, 2015 by Guest Link to comment
Professional Posted July 15, 2015 Share Posted July 15, 2015 addEvent("TEP",true) addEventHandler("TEP",root, function ( ) if ( getPlayerMoney(client) >= 1000 ) then giveWeapon(client,35) takePlayerMoney(client,1000) else outputChatBox("You dont have enough money ! " ,client,255,0,0,false) end end) ')' expected near '=' '' expected near 'else' '' expected near 'end' '' expected near 'end' Link to comment
#Mr.Rajo~,< Posted July 15, 2015 Share Posted July 15, 2015 server = addEvent("TEP",true) addEventHandler("TEP",root, function(player) local money = getPlayerMoney(source) if (money > 1000) then giveWeapon ( source , 38 , 50000 ) takePlayerMoney(source,1000) outputChatBox ( "You Have Now Weapon 38 " ,255 ,255 ,255 ,255 , true ) else outputChatBox ( "You No Have Money !! " ,255 ,255 ,255 ,255 , true ) end end) Client = addEventHandler('onClientGUIClick',root, function () triggerServerEvent("TEP",getLocalPlayer()) end) طيب انت حطيت player معرفه ولا استخدمتها Link to comment
Abdul KariM Posted July 15, 2015 Share Posted July 15, 2015 server = addEvent("TEP",true) addEventHandler("TEP",root, function(player) local money = getPlayerMoney(source) if (money > 1000) then giveWeapon ( source , 38 , 50000 ) takePlayerMoney(source,1000) outputChatBox ( "You Have Now Weapon 38 " ,255 ,255 ,255 ,255 , true ) else outputChatBox ( "You No Have Money !! " ,255 ,255 ,255 ,255 , true ) end end) Client = addEventHandler('onClientGUIClick',root, function () triggerServerEvent("TEP",getLocalPlayer()) end) طيب انت حطيت player معرفه ولا استخدمتها معرفه بس مدري ليه مسوي دبل فـ outputChatBox تعديل على سيرفر حقه فقط فـ outputChatBox addEvent("TEP",true) addEventHandler("TEP",root, function(player) local money = getPlayerMoney(source) if (money > 1000) then giveWeapon ( source , 30 , 50000 ) takePlayerMoney(source,1000) outputChatBox ( "You Have Now Weapon 38 ",source,255 ,255 ,255 , true ) else outputChatBox ( "You No Have Money !! ",source,255 ,255 ,255 , true ) end end) Link to comment
Simple. Posted July 15, 2015 Share Posted July 15, 2015 server = addEvent("TEP",true) addEventHandler("TEP",root, function(player) local money = getPlayerMoney(source) if (money > 1000) then giveWeapon ( source , 38 , 50000 ) takePlayerMoney(source,1000) outputChatBox ( "You Have Now Weapon 38 " ,255 ,255 ,255 ,255 , true ) else outputChatBox ( "You No Have Money !! " ,255 ,255 ,255 ,255 , true ) end end) Client = addEventHandler('onClientGUIClick',root, function () triggerServerEvent("TEP",getLocalPlayer()) end) طيب انت حطيت player معرفه ولا استخدمتها player ماراح تتعرف لانك بالتريقر مو حاط ارقمنت لها triggerServerEvent("TEP",localPlayer, localPlayer) كذا يصير Link to comment
Mr.R Posted July 15, 2015 Share Posted July 15, 2015 (edited) Server Side addEvent( "Minigun", true ) addEventHandler ( "Minigun", root, function ( ) if ( getPlayerMoney ( source ) >= 4000 ) then takePlayerMoney ( source, 4000 ) giveWeapon ( source, 38, 10000 ) setPedWeaponSlot ( source, getSlotFromWeapon ( 38 ) ) outputChatBox ( "[ " .. getPlayerName ( source ) .. " ] Has Bought Weapon [ Minigun ]", root, 0, 255, 0, true ) else outputChatBox ( "You don't have $4000 to buy [ Minigun ]", source, 255, 0, 0, true ) end end ) Client Side addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == اسم الزر ) then triggerServerEvent ( "Minigun", localPlayer ) end end ) وصراحه ياتنطيل موضوعك خطير ويستحق التثبيت Edited July 16, 2015 by Guest Link to comment
Simple. Posted July 15, 2015 Share Posted July 15, 2015 Server Side addEvent( "Minigun", true ) addEventHandler ( "Minigun", root, function ( player ) if ( getPlayerMoney ( player ) >= 4000 ) then takePlayerMoney ( player, 4000 ) giveWeapon ( player, 38, 10000 ) setPedWeaponSlot ( player, getSlotFromWeapon ( 38 ) ) outputChatBox ( "[ " .. getPlayerName ( player ) .. " ] Has Bought Weapon [ Minigun ]", root, 0, 255, 0, true ) else outputChatBox ( "You don't have $4000 to buy [ Minigun ]", player, 255, 0, 0, true ) end end ) Client Side addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == اسم الزر ) then triggerServerEvent ( "Minigun", localPlayer ) end end ) وصراحه ياتنطيل موضوعك خطير ويستحق التثبيت player من وين جبتها؟ Link to comment
iMr.SFA7 Posted July 15, 2015 Share Posted July 15, 2015 getElementsByType -- لوب getPlayerName banPlayer onPlayerJoin Link to comment
Professional Posted July 15, 2015 Share Posted July 15, 2015 function mta ( ) for i,v in ipairs(getElementsByType("player")) do local mta = getPlayerName(v) banPlayer ( source , "لانك ..." ) end end addEventHandler ( "onPlayerJoin", getRootElement(), mta ) Link to comment
Jupi Posted July 15, 2015 Share Posted July 15, 2015 function mta ( ) for i,v in ipairs(getElementsByType("player")) do local mta = getPlayerName(v) banPlayer ( source , "لانك ..." ) end end addEventHandler ( "onPlayerJoin", getRootElement(), mta ) الحين سؤال ض بس انت كيف تكتب اكوادك؟ for i,v in ipairs(getElementsByType("player")) do الجزء حق اللوب تمام local mta = getPlayerName(v) هنا جبت اسم الاعبين و ما سوييت به شيء و الغريب انك صكيت المصدر الباند @_@ banPlayer ( source , "لانك ..." ) طيب وش فائدة اللوب؟ كنت صك المصدر فوري خذ انا فهمت المقصود شكلي addEventHandler("onPlayerJoin", root, function () for _, player in ipairs(getElementsByType("player")) do if getPlayerName(player) == "Hassan_Meke" then banPlayer(player, false, false, true, nil, "وش دخلك بلسبب : D") end end end ) Link to comment
N3xT Posted July 15, 2015 Share Posted July 15, 2015 onPlayerJoin playSound givePlayerMoney outputChatBox Link to comment
N3xT Posted July 15, 2015 Share Posted July 15, 2015 addEventHandler("onPlayerJoin", root, function () end ) Link to comment
Jupi Posted July 15, 2015 Share Posted July 15, 2015 addEventHandler("onPlayerJoin", root, function () end ) addEventHandler("onPlayerJoin", root, function () givePlayerMoney(source, 5000) playSound(source, 16) outputChatBox("حياك الله بسيرفرنا : )", source, 255, 0, 0, false) end ) Link to comment
N3xT Posted July 15, 2015 Share Posted July 15, 2015 addEventHandler("onPlayerJoin", root, function () givePlayerMoney(source, 5000) playSound(source, 16) outputChatBox("حياك الله بسيرفرنا : )", source, 255, 0, 0, false) end ) playSound(source, 16) باللهي ؟ ض -- addEventHandler("onPlayerJoin", root, function () givePlayerMoney(source, 5000) playSound("MTA.mp3") outputChatBox("حياك الله بسيرفرنا : )", source, 255, 0, 0, false) end ) Link to comment
Jupi Posted July 15, 2015 Share Posted July 15, 2015 addEventHandler("onPlayerJoin", root, function () givePlayerMoney(source, 5000) playSound(source, 16) outputChatBox("حياك الله بسيرفرنا : )", source, 255, 0, 0, false) end ) playSound(source, 16) باللهي ؟ ض -- addEventHandler("onPlayerJoin", root, function () givePlayerMoney(source, 5000) playSound("MTA.mp3") outputChatBox("حياك الله بسيرفرنا : )", source, 255, 0, 0, false) end ) باللهيي ؟ ض اذا لاحظت انت اللي حاط هريسة =_= playSound -- Client فنكشن كلاينت فقط و الايفينت و ملف سيرفر و شات بوكس سيرفر و اعطاء الفلوس سيرفر مشان ما يكون وهمي يا خبيير فا سيتحسن تخلييه playSoundFrontEnd لانه مشترك كلاينت و سيرفر التصحيح addEventHandler("onPlayerJoin", root, function () givePlayerMoney(source, 5000) playSoundFrontEnd(source, 16) -- يشغل صوت من اللعبة ايدي حقه 16 للاعب اللي دخل outputChatBox("حياك الله بسيرفرنا : )", source, 255, 0, 0, false) end ) 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