nony Posted October 8, 2012 Posted October 8, 2012 السلام عليكم ورحمه الله وبركاته يا شباب ابي كود لما احد يشتري متفجرات يجي صوت انذار الصوت عندي موجود بس ابي كود اذا لاعب اشترا متفجرات يجي الصوت
nony Posted October 8, 2012 Author Posted October 8, 2012 ذا الي قدرت عليه addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == sss ) then Sound = playSound("sounds.mp3") end end ) بس الصوت مايوقف
TAPL Posted October 8, 2012 Posted October 8, 2012 -- Server Side -- الكود ذا تحطه بالسيرفر لما تشتري قنابل triggerClientEvent(root, "onbuyBooM", root) -- Client Side -- addEvent("onbuyBooM",true) addEventHandler("onbuyBooM", root, function() playSound("sounds.mp3") end)
nony Posted October 8, 2012 Author Posted October 8, 2012 مافهمتك يا تابل وضح شوف ذا كود القنابل كيف اخلي اذا لاعب اشترا القنابل يجي الصوت سيرفر addEvent("grn",true) addEventHandler("grn",root, function() local PlayerMoney = getPlayerMoney(source) if ( PlayerMoney >= 1500) then takePlayerMoney(source,1500) giveWeapon ( source , 16,88 ) setPedWeaponSlot(source, getSlotFromWeapon(16)) outputChatBox ( "Grenade", getRootElement(), 255, 0, 0, true ) else outputChatBox("you Don't have enough Money", source, 255, 0, 0, true) end end ) كلنت guiCreateStaticImage( 365,245,90,75, "weapon/3.png", false,tab2 ) weapButton_3 = guiCreateButton(365,322,90,30,"$1500 Grenade ",false,tab2) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == weapButton_3 ) then triggerServerEvent("grn",getLocalPlayer()) end end )
TAPL Posted October 8, 2012 Posted October 8, 2012 حط الكود ذا في السيرفر triggerClientEvent(root, "onbuyBooM", root) تحت السطر ذا if ( PlayerMoney >= 1500) then
Tete omar Posted October 8, 2012 Posted October 8, 2012 حط الكود ذا في السيرفر triggerClientEvent(root, "onbuyBooM", root) تحت السطر ذا if ( PlayerMoney >= 1500) then بس ليش روت ؟
nony Posted October 10, 2012 Author Posted October 10, 2012 بس يا تابل في بعض الاكواد تجي كلنت مثل كود المتفجرات حق اخوي حسن كلنت function onGuiClick (button, state, absoluteX, absoluteY) if ( source == shop_6 ) then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 15000 ) then takePlayerMoney(15000) outputChatBox("Super Grenade Well End After : 3 Minutes",source,255,255,0) triggerServerEvent("sp", getLocalPlayer()) function narBullets(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) if ( weapon == 24) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 23) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 22) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 31) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 30) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 32) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 29) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 28) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 33) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 34) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 25) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 38) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), narBullets) setTimer(function () removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), narBullets) outputChatBox("Super Grenade Has been End",255,255,0) end,30000,1, true) triggerEvent("other.mp3", getRootElement()) else outputChatBox("* you Don't have enough Money !", source, 255, 0, 0, true) end end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick)
3NAD Posted October 10, 2012 Posted October 10, 2012 كود تشغيل الصوت اصله كلنت فـ مآيحتاج تريقر حطه بـ نفس الوظيفة
TAPL Posted October 10, 2012 Posted October 10, 2012 بس يا تابل في بعض الاكواد تجي كلنتمثل كود المتفجرات حق اخوي حسن كلنت function onGuiClick (button, state, absoluteX, absoluteY) if ( source == shop_6 ) then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 15000 ) then takePlayerMoney(15000) outputChatBox("Super Grenade Well End After : 3 Minutes",source,255,255,0) triggerServerEvent("sp", getLocalPlayer()) function narBullets(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) if ( weapon == 24) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 23) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 22) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 31) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 30) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 32) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 29) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 28) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 33) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 34) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 25) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end if ( weapon == 38) then createProjectile(getLocalPlayer(),16,hitX, hitY, hitZ) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), narBullets) setTimer(function () removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), narBullets) outputChatBox("Super Grenade Has been End",255,255,0) end,30000,1, true) triggerEvent("other.mp3", getRootElement()) else outputChatBox("* you Don't have enough Money !", source, 255, 0, 0, true) end end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) ذا الكود مخبوص و مبرمج بطريقة خاطئة وفيه أخطاء و المشكلة الكل ينسخه و يحطه بشوبه الي كله أكواد كوبي بست إذا تبون كوبي بست خلكم على عماكم كود تشغيل الصوت اصله كلنت فـ مآيحتاج تريقر حطه بـ نفس الوظيفة بس كذا ما بيشتغل الصوت عند الكل
hassan.k.s.a Posted October 10, 2012 Posted October 10, 2012 الكود كان مأخوذ من موضوع وانا أدفت به شخص والكود قديم جدآً ^.^
nony Posted October 11, 2012 Author Posted October 11, 2012 الكود كان مأخوذ من موضوع وانا أدفت به شخص والكود قديم جدآً ^.^ انا حاولت اخليه سيرفر عشان الالوان ماتجي في كلنت يجي الون ابيض حاولت انقله لسيرفر بس مايشتغل
3NAD Posted October 11, 2012 Posted October 11, 2012 انا حاولت اخليه سيرفر عشان الالوان ماتجي في كلنت يجي الون ابيض حاولت انقله لسيرفر بس مايشتغل جرب ذآ بـ كلنت outputChatBox ( "Super Grenade Well End After : 3 Minutes", 255, 255, 0, true )
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