WASSIm. Posted January 30, 2013 Posted January 30, 2013 1-n7ab nrod il nemesis damo iwali 2000 2-wa n7abo kolmara fi blasa SERVER function Nemesisbymanawydan ( ) local stat = getPlayerStat ( nemesi, 24 ) nemesi = exports [ "slothBot" ]:spawnBot ( -1935.5480957031, 665.44055175781, 47.0, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 271 ) outputChatBox ("Nemesis: STARS",getRootElement(), 255, 0, 0, true ) myBlip = (createBlipAttachedTo ( nemesi, 23 )) end end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(4000,6000)) -- 4000, 6000 money for kill nemesis-- outputChatBox ( getPlayerName ( killer ) .. " killed Nemesis, congratulations",getRootElement(), 100, 100, 100, true ) destroyElement(myBlip) setTimer(Nemesisbymanawydan, 10000, 1) -- 60000 time for nemesis respawn in milliseconds-- end end)
Sparrow Posted January 30, 2013 Posted January 30, 2013 1) setElementHealth(nemesi, 2000) 2) setElementPosition(nemesi, math.random(x), math.random(y), math.random(z))
Vanlot Posted January 30, 2013 Posted January 30, 2013 2) setElementPosition(nemesi, math.random(x), math.random(y), math.random(z)) random sa3at tespawnih bara el Map (B7ar..) Nans7ek a5dem b table ,7ot fih les Coords ba3d unpakih.
WASSIm. Posted January 30, 2013 Author Posted January 30, 2013 2) setElementPosition(nemesi, math.random(x), math.random(y), math.random(z)) random sa3at tespawnih bara el Map (B7ar..) Nans7ek a5dem b table ,7ot fih les Coords ba3d unpakih. kife ??
Sparrow Posted January 31, 2013 Posted January 31, 2013 local spawnTable = { [1] = {x,y,z} [2] = {x,y,z} [3] = {x,y,z} [4] = {x,y,z} } function Nemesisbymanawydan ( ) local stat = getPlayerStat ( nemesi, 24 ) local x,y,z = unpack(spawnTable[math.random(1,4)]) nemesi = exports [ "slothBot" ]:spawnBot (x,y,z, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 271 ) outputChatBox ("Nemesis: STARS",getRootElement(), 255, 0, 0, true ) myBlip = (createBlipAttachedTo ( nemesi, 23 )) end end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan)
Baseplate Posted February 1, 2013 Posted February 1, 2013 esta3mel Extra Health w emba3ed exports.["extra_health"]:setElementExtraHealth ( nemesi, 2000 )
WASSIm. Posted February 1, 2013 Author Posted February 1, 2013 esta3mel Extra Health w emba3ed exports.["extra_health"]:setElementExtraHealth ( nemesi, 2000 ) i3aychek
WASSIm. Posted February 1, 2013 Author Posted February 1, 2013 balahi chkon inajam irodli il DX hadha iwarili health mta3 nemesis ? ena 7awalt wa manjmtch addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() end ) addEventHandler("onClientRender", root, function() dxDrawRectangle(5, (screenH - 20) / 2, 153, 20, tocolor(0, 0, 0, 170), true) dxDrawText("Health Nemesis:", 10, (screenH - 16) / 2, (10) + 154, ( (screenH - 16) / 2) + 16, tocolor(255, 0, 0, 255), 1, "default-bold", "left", "top", false, false, true, false, false) end ) wa yar7am waldik bil msaba9
Sparrow Posted February 2, 2013 Posted February 2, 2013 dxDrawText("Health Nemesis: "..getElementHealth(tostring(nemesis)), 10, (screenH - 16) / 2, (10) + 154, ( (screenH - 16) / 2) + 16, tocolor(255, 0, 0, 255), 1, "default-bold", "left", "top", false, false, true, false, false)
WASSIm. Posted February 2, 2013 Author Posted February 2, 2013 dxDrawText("Health Nemesis: "..getElementHealth(tostring(nemesis)), 10, (screenH - 16) / 2, (10) + 154, ( (screenH - 16) / 2) + 16, tocolor(255, 0, 0, 255), 1, "default-bold", "left", "top", false, false, true, false, false) Client function onshowhealthnemesis ( ) dxDrawText("Health Nemesis: "..getElementHealth(tostring(source)), 10, (screenH - 16) / 2, (10) + 154, ( (screenH - 16) / 2) + 16, tocolor(255, 0, 0, 255), 1, "default-bold", "left", "top", false, false, true, false, false) end addEvent( "onshowhealthnemesis", true ) addEventHandler( "onshowhealthnemesis", root, onshowhealthnemesis ) Server local spawnTable = { [1] = {-1935.5, 665.4, 47}, [2] = {2561.4,2779,11}, [3] = {-1008,-651,33}, [4] = {2203,-2250,14}, } local x,y,z = unpack(spawnTable[math.random(1,4)]) function Nemesisbymanawydan ( ) local x,y,z = unpack(spawnTable[math.random(1,4)]) nemesi = exports [ "slothBot" ]:spawnBot (x,y,z, 90, 271, 0, 0, Nemesis, math.random ( 35, 38 ), "hunting", true ) exports.extra_health:setElementExtraHealth ( nemesi, 500 ) triggerClientEvent ("onshowhealthnemesis", nemesi, onshowhealthnemesis) outputChatBox ("Nemesis: STARS", getRootElement(), 255, 0, 0, true ) myBlip = (createBlipAttachedTo ( nemesi, 23 )) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(4000,6000)) killerName = getPlayerName(killer) weapon = getPedWeapon(killer) wr, wg, wb = getPlayerNametagColor(killer) exports.killmessages:outputMessage ( {killerName,{"padding",width=3},{"icon",id=weapon or 0},{"padding",width=3},{"color",r=255,g=0,b=0},"Nemesis"},getRootElement(),wr,wg,wb ) destroyElement(myBlip) setTimer(Nemesisbymanawydan, 1000, 1) end end) [/url]
Sparrow Posted February 3, 2013 Posted February 3, 2013 server: function Nemesisbymanawydan (player ) local x,y,z = unpack(spawnTable[math.random(1,4)]) nemesi = exports [ "slothBot" ]:spawnBot (x,y,z, 90, 271, 0, 0, Nemesis, math.random ( 35, 38 ), "hunting", true ) exports.extra_health:setElementExtraHealth ( nemesi, 500 ) triggerClientEvent (player , "onshowhealthnemesis", root, nemesi) outputChatBox ("Nemesis: STARS", getRootElement(), 255, 0, 0, true ) myBlip = (createBlipAttachedTo ( nemesi, 23 )) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) client: function onshowhealthnemesis ( nemesi) dxDrawText("Health Nemesis: "..getElementHealth(tostring(nemesi)), 10, (screenH - 16) / 2, (10) + 154, ( (screenH - 16) / 2) + 16, tocolor(255, 0, 0, 255), 1, "default-bold", "left", "top", false, false, true, false, false) end addEvent( "onshowhealthnemesis", true ) addEventHandler( "onshowhealthnemesis", root, onshowhealthnemesis )
WASSIm. Posted February 3, 2013 Author Posted February 3, 2013 server: function Nemesisbymanawydan (player ) local x,y,z = unpack(spawnTable[math.random(1,4)]) nemesi = exports [ "slothBot" ]:spawnBot (x,y,z, 90, 271, 0, 0, Nemesis, math.random ( 35, 38 ), "hunting", true ) exports.extra_health:setElementExtraHealth ( nemesi, 500 ) triggerClientEvent (player , "onshowhealthnemesis", root, nemesi) outputChatBox ("Nemesis: STARS", getRootElement(), 255, 0, 0, true ) myBlip = (createBlipAttachedTo ( nemesi, 23 )) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) client: function onshowhealthnemesis ( nemesi) dxDrawText("Health Nemesis: "..getElementHealth(tostring(nemesi)), 10, (screenH - 16) / 2, (10) + 154, ( (screenH - 16) / 2) + 16, tocolor(255, 0, 0, 255), 1, "default-bold", "left", "top", false, false, true, false, false) end addEvent( "onshowhealthnemesis", true ) addEventHandler( "onshowhealthnemesis", root, onshowhealthnemesis )
Sparrow Posted February 3, 2013 Posted February 3, 2013 jareb, triggerClientEvent ("onshowhealthnemesis", root, nemesi)
WASSIm. Posted February 3, 2013 Author Posted February 3, 2013 jareb,triggerClientEvent ("onshowhealthnemesis", root, nemesi) ama mta3 exports majatnich
Vanlot Posted February 3, 2013 Posted February 3, 2013 ama mta3 exports majatnich Thama resource esmou "extra_health" 9bal mat5adech e script hethi 5admou houwa se3a.
WASSIm. Posted February 3, 2013 Author Posted February 3, 2013 ama mta3 exports majatnich Thama resource esmou "extra_health" 9bal mat5adech e script hethi 5admou houwa se3a.
Baseplate Posted February 6, 2013 Posted February 6, 2013 addEvent("onshowhealthnemesis", true) client-sided
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