xX|KeMo|Xx Posted August 25, 2012 Share Posted August 25, 2012 function onGuiClick (button, state, absoluteX, absoluteY) if ( source == shop222 ) then guiSetVisible ( Window ,false ) showCursor (false ) guiSetInputEnabled(false) sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) if ( weapon == 5 and getElementType(hitElement)=="player" ) then triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end else outputChatBox("Error You Already Have Super Bat !!!",255,0,0) end end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) ابي الاعب اذا يظرب بالعصا الي معه يموت الاعب التاني Bat وشكرا Link to comment
Tete omar Posted August 25, 2012 Share Posted August 25, 2012 function onGuiClick (button, state, absoluteX, absoluteY) if ( source == shop222 ) then guiSetVisible ( Window ,false ) showCursor (false ) guiSetInputEnabled(false) sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) if ( weapon == 5 and getElementType(hitElement)=="player" ) then triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end else outputChatBox("Error You Already Have Super Bat !!!",255,0,0) end end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) ابي الاعب اذا يظرب بالعصا الي معه يموت الاعب التاني Bat وشكرا وضح اكثر ما فهمتك ؟؟؟ تقصد اذا لاعب ضرب الاعب الثاني بالعصا يموت على طول ؟ Link to comment
Tete omar Posted August 25, 2012 Share Posted August 25, 2012 function onGUIClick(button, state, absoluteX, absoluteY) if ( source == shop222 ) then guiSetVisible ( Window ,false ) showCursor (false ) guiSetInputEnabled(false) end end addEventHandler("onClientGUIClick", root, onGUIClick) sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) if ( weapon == 5 and getElementType(hitElement)=="player" ) then triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end else outputChatBox("Error You Already Have Super Bat !!!",255,0,0) end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) الكود صحيح بس انت ناسي end و بعض الاقواس صلحتها لك Link to comment
xX|KeMo|Xx Posted August 25, 2012 Author Share Posted August 25, 2012 ادري انه صحيح بس لما اجي اظرب الاعب ما يموت Link to comment
Tete omar Posted August 25, 2012 Share Posted August 25, 2012 ادري انه صحيح بس لما اجي اظرب الاعب ما يموت اعرض ملف ال server side Link to comment
xX|KeMo|Xx Posted August 25, 2012 Author Share Posted August 25, 2012 addEvent("killPed",true) addEventHandler("killPed",root, function(hitElement,weapon) if not ( getPlayerTeam(source) == getPlayerTeam(hitElement) ) then killPed(hitElement,source,weapon) end end ) Link to comment
Tete omar Posted August 25, 2012 Share Posted August 25, 2012 client function onGUIClick(button, state, absoluteX, absoluteY) if ( source == shop222 ) then guiSetVisible ( Window ,false ) showCursor (false ) guiSetInputEnabled(false) end end addEventHandler("onClientGUIClick", root, onGUIClick) sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end else outputChatBox("Error You Already Have Super Bat !!!",255,0,0) end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) server addEvent("killPed",true) addEventHandler("killPed", root, function(hitElement,weapon) if ( weapon == 5 and getElementType(hitElement)=="player" ) then if not ( getPlayerTeam(source) == getPlayerTeam(hitElement) ) then killPed(hitElement,source,weapon) end end end) Link to comment
hassan.k.s.a Posted August 25, 2012 Share Posted August 25, 2012 client function onGUIClick(button, state, absoluteX, absoluteY) if ( source == shop222 ) then guiSetVisible ( Window ,false ) showCursor (false ) guiSetInputEnabled(false) end end addEventHandler("onClientGUIClick", root, onGUIClick) sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end else outputChatBox("Error You Already Have Super Bat !!!",255,0,0) end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) server addEvent("killPed",true) addEventHandler("killPed", root, function(hitElement,weapon) if ( weapon == 5 and getElementType(hitElement)=="player" ) then if not ( getPlayerTeam(source) == getPlayerTeam(hitElement) ) then killPed(hitElement,source,weapon) end end end) Fix --Client Side-- function onGUIClick(button, state, absoluteX, absoluteY) if ( source == shop222 ) then guiSetVisible ( Window ,false ) showCursor (false ) guiSetInputEnabled(false) end end addEventHandler("onClientGUIClick", root, onGUIClick) sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end outputChatBox("Error You Already Have Super Bat !!!",255,0,0) addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) Link to comment
xX|KeMo|Xx Posted August 25, 2012 Author Share Posted August 25, 2012 client function onGUIClick(button, state, absoluteX, absoluteY) if ( source == shop222 ) then guiSetVisible ( Window ,false ) showCursor (false ) guiSetInputEnabled(false) end end addEventHandler("onClientGUIClick", root, onGUIClick) sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end else outputChatBox("Error You Already Have Super Bat !!!",255,0,0) end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) server addEvent("killPed",true) addEventHandler("killPed", root, function(hitElement,weapon) if ( weapon == 5 and getElementType(hitElement)=="player" ) then if not ( getPlayerTeam(source) == getPlayerTeam(hitElement) ) then killPed(hitElement,source,weapon) end end end) Fix --Client Side-- function onGUIClick(button, state, absoluteX, absoluteY) if ( source == shop222 ) then guiSetVisible ( Window ,false ) showCursor (false ) guiSetInputEnabled(false) end end addEventHandler("onClientGUIClick", root, onGUIClick) sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end outputChatBox("Error You Already Have Super Bat !!!",255,0,0) addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) التصحيح function onGUIClick(button, state, absoluteX, absoluteY) if ( source == shop222 ) then guiSetVisible ( Window ,false ) showCursor (false ) guiSetInputEnabled(false) addEventHandler("onClientGUIClick", root, onGUIClick) sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end outputChatBox("Error You Already Have Super Bat !!!",255,0,0) addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) Link to comment
hassan.k.s.a Posted August 25, 2012 Share Posted August 25, 2012 التصحيح function onGUIClick(button, state, absoluteX, absoluteY) if ( source == shop222 ) then guiSetVisible ( Window ,false ) showCursor (false ) guiSetInputEnabled(false) addEventHandler("onClientGUIClick", root, onGUIClick) sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end outputChatBox("Error You Already Have Super Bat !!!",255,0,0) addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 'end' expected (to close 'if' at line 2) near '' fix function onGUIClick(button, state, absoluteX, absoluteY) if ( source == shop222 ) then guiSetVisible ( Window ,false ) showCursor (false ) guiSetInputEnabled(false) end end addEventHandler("onClientGUIClick", root, onGUIClick) sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end outputChatBox("Error You Already Have Super Bat !!!",255,0,0) addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) Link to comment
hassan.k.s.a Posted August 25, 2012 Share Posted August 25, 2012 Sorry function onGuiClick (button, state, absoluteX, absoluteY) if ( source == shop222 ) then sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end outputChatBox("Error You Already Have Super Bat !!!",255,0,0) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) Link to comment
Tete omar Posted August 25, 2012 Share Posted August 25, 2012 Sorry function onGuiClick (button, state, absoluteX, absoluteY) if ( source == shop222 ) then sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end outputChatBox("Error You Already Have Super Bat !!!",255,0,0) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) correct function onGuiClick (button, state, absoluteX, absoluteY) if ( source == shop222 ) then sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney >= 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end outputChatBox("Error You Already Have Super Bat !!!",255,0,0) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) Link to comment
hassan.k.s.a Posted August 25, 2012 Share Posted August 25, 2012 Sorry function onGuiClick (button, state, absoluteX, absoluteY) if ( source == shop222 ) then sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end outputChatBox("Error You Already Have Super Bat !!!",255,0,0) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) correct function onGuiClick (button, state, absoluteX, absoluteY) if ( source == shop222 ) then sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney >= 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end outputChatBox("Error You Already Have Super Bat !!!",255,0,0) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) There are correct? Link to comment
Tete omar Posted August 25, 2012 Share Posted August 25, 2012 if ( PlayerMoney > 2000 ) then هذي راح ياخذ 2000 اذا الاعب معه اكثر من الفين وبس if ( PlayerMoney >= 2000 ) then هذي راح ياخذ الفلوس 2000 او اكثر Link to comment
hassan.k.s.a Posted August 25, 2012 Share Posted August 25, 2012 if ( PlayerMoney > 2000 ) then هذي راح ياخذ 2000 اذا الاعب معه اكثر من الفين وبس if ( PlayerMoney >= 2000 ) then هذي راح ياخذ الفلوس 2000 او اكثر Ok Ok LooooL Link to comment
TAPL Posted August 25, 2012 Share Posted August 25, 2012 This does not trigger for projectiles based, or melee weapons. لعصى؟ onClientPlayerWeaponFire أفنت خخخخخخ أكوادكم كلها خطأ onPlayerDamage أستعمل الأفنت Link to comment
xX|KeMo|Xx Posted August 26, 2012 Author Share Posted August 26, 2012 This does not trigger for projectiles based, or melee weapons.لعصى؟ onClientPlayerWeaponFire أفنت خخخخخخ أكوادكم كلها خطأ onPlayerDamage أستعمل الأفنت function onGuiClick (button, state, absoluteX, absoluteY) if ( source == shop222 ) then guiSetVisible ( Window ,false ) showCursor (false ) guiSetInputEnabled(false) sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) if ( weapon == 5 and getElementType(hitElement)=="player" ) then triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onPlayerDamage", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onPlayerDamage", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end else outputChatBox("Error You Already Have Super Bat !!!",255,0,0) end end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) ما اشتغل Link to comment
Tete omar Posted August 26, 2012 Share Posted August 26, 2012 This does not trigger for projectiles based, or melee weapons.لعصى؟ onClientPlayerWeaponFire أفنت خخخخخخ أكوادكم كلها خطأ onPlayerDamage أستعمل الأفنت function onGuiClick (button, state, absoluteX, absoluteY) if ( source == shop222 ) then guiSetVisible ( Window ,false ) showCursor (false ) guiSetInputEnabled(false) sBatEl = getElementData(getLocalPlayer(),"superBat") if sBatEl == false then local PlayerMoney = getPlayerMoney() if ( PlayerMoney > 2000 ) then takePlayerMoney(2000) outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) outputChatBox("Go Go Go !!!",255,0,0) setElementData(getLocalPlayer(),"superBat",true) triggerServerEvent("sBat", getLocalPlayer()) function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) if ( weapon == 5 and getElementType(hitElement)=="player" ) then triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) end end addEventHandler("onPlayerDamage", getLocalPlayer(), superFist) setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onPlayerDamage", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) else outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) end else outputChatBox("Error You Already Have Super Bat !!!",255,0,0) end end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) ما اشتغل removeEventHandler("onPlayerDamage", getLocalPlayer(), superBat) ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟ ايش ذي ؟ removeEventHandler("onPlayerDamage", root, superBat) Link to comment
Bssol Posted August 26, 2012 Share Posted August 26, 2012 خخخخخخخخخخخخخخ وش اقول بس onPlayerDamage سيرفر وانتو حاطينها كلينت بعدين يا كيمو عندي لك سؤال، انت مسوي شوب كامل ومو عارف تسوي اذا ضرب بعصا يموت!!!!!!1 Link to comment
Tete omar Posted August 26, 2012 Share Posted August 26, 2012 خخخخخخخخخخخخخخ وش اقول بس onPlayerDamage سيرفر وانتو حاطينها كلينت بعدين يا كيمو عندي لك سؤال، انت مسوي شوب كامل ومو عارف تسوي اذا ضرب بعصا يموت!!!!!!1 سؤال صعب Link to comment
xX|KeMo|Xx Posted August 26, 2012 Author Share Posted August 26, 2012 خخخخخخخخخخخخخخ وش اقول بس onPlayerDamage سيرفر وانتو حاطينها كلينت بعدين يا كيمو عندي لك سؤال، انت مسوي شوب كامل ومو عارف تسوي اذا ضرب بعصا يموت!!!!!!1 الصراحه في شوبي القديم اكثر الكودات جاهزه بس سويت واحد جديد به اكثر الكودات مو جاهزه في سيرفر عرب 3rb شوي شوي اصير احسن في المودات وما بصير من نفسي بصير من مساعدتكم Link to comment
===[PRO]=== Posted August 26, 2012 Share Posted August 26, 2012 كودك طويل انا بعطك مثال server-side: addEventHandler("onPlayerJoin",getRootElement(), function() setElementData(source,"thePlrPerBat",tostring("no")) end ) addEvent("sBat",true) addEventHandler("sBat",getRootElement(), setElementData(source,"thePlrPerBat",tostring("yes")) setTimer(setElementData,120000,1,source,"thePlrPerBat",tostring("no")) end ) addEventHandler ( "onPlayerDamage", getRootElement (), function ( attacker, weapon, bodypart, loss ) if (weapon == 5 ) then if ( getElementData(attacker,"thePlrPerBat") == tostring("yes") ) then if ( bodypart ) then outputChatBox ( "You Killed by Super Bat",source, 255, 255, 0 ) killPed ( source, attacker, weapon, bodypart ) end end end 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