Jump to content

ممكن مساعده باصلاح هذا الكود


Recommended Posts

الكوود كامل هنا

بس ما يعطي عدد قتل محتاج مساعده في اصلاحه

عشان يعطي عدد قتل

    safecol = createColCuboid ( 1489.4554443359,-3963.5056152344,0, 255, 255, 255 ) 
       local hillRadar = createRadarArea ( 1489.4554443359,-3963.5056152344, 200, 200, 181, 0, 0, 255 ) 
setElementData (hillRadar, "zombieProof", true) 
  
  
            function Robot ( )   
  
                   Rob = exports [ "slothBot" ]:spawnBot ( 1554.4996337891,-3906.5285644531,5.0093750953674, 90,  math.random ( 300, 303 ), 0, 3, Robot, 38, "hunting", true ) 
                  setElementModel ( Rob, 112 ) 
                  RobBlip = (createBlipAttachedTo ( Rob, 0 ))    
                  exports.extra_health:setElementExtraHealth(Rob, 15000) 
  
             end 
            addEventHandler("onResourceStart", resourceRoot, Robot)   
  
    setElementDimension(safecol,3) 
    setElementDimension(hillRadar,3) 
     
  
  
  
Timer = {} 
function money (theKiller) 
if (source == Rob) then 
if theKiller == nil or theKiller == false then 
exports["TopBarChat"]:sendClientMessage ( "The Robot has defeated by unknown player~zombies.", root, 255, 0, 0 ) 
exports["TopBarChat"]:sendClientMessage ( "The Robot will return again soon!", root, 255, 0, 0 ) 
Timer[source] = setTimer(Robot, 300000, 1) 
destroyElement (RobBlip) 
else 
killerName = getPlayerName(theKiller) 
weapon = getPedWeapon(theKiller) 
wr, wg, wb = getPlayerNametagColor(theKiller) 
exports.killmessages:outputMessage ( {killerName,{"padding",width=3},{"icon",id=weapon or 0},{"padding",width=3},{"color",r=255,g=255,b=0},"The Robot"},getRootElement(),wr,wg,wb ) 
local acc = getPlayerAccount (theKiller) 
if ( acc ) and not isGuestAccount(acc) then 
  end 
exports["TopBarChat"]:sendClientMessage ( getPlayerName ( theKiller ) .. " Has killed the Robot and won 5k Zombie kills", root, 0, 255, 0 ) 
exports["TopBarChat"]:sendClientMessage ( "The Robot will return again soon!", root, 255, 0, 0 ) 
Add = 5000 
KillData = "Zombie kills" 
playerKills = getElementData ( playerSource, KillData) or 0  
setElementData ( playerSource, KillData, ( playerKills + tonumber(Add) )) 
destroyElement (RobBlip) 
Timer[source] = setTimer(Robot, 300000, 1) 
end 
end 
end 
addEvent("onBotWasted", true) 
addEventHandler("onBotWasted", getRootElement(), money) 
  
function Robotreturn() 
exports["TopBarChat"]:sendClientMessage ("WARNING : The Robot has been appeared in hell zone, who will defeat him ?!", root, 255, 0, 0 ) 
end 
addEvent("onBotSpawned", true) 
addEventHandler("onBotSpawned", root, Robotreturn) 
  

Link to comment
الكوود كامل هنا

بس ما يعطي عدد قتل محتاج مساعده في اصلاحه

عشان يعطي عدد قتل

    safecol = createColCuboid ( 1489.4554443359,-3963.5056152344,0, 255, 255, 255 ) 
       local hillRadar = createRadarArea ( 1489.4554443359,-3963.5056152344, 200, 200, 181, 0, 0, 255 ) 
setElementData (hillRadar, "zombieProof", true) 
  
  
            function Robot ( )   
  
                   Rob = exports [ "slothBot" ]:spawnBot ( 1554.4996337891,-3906.5285644531,5.0093750953674, 90,  math.random ( 300, 303 ), 0, 3, Robot, 38, "hunting", true ) 
                  setElementModel ( Rob, 112 ) 
                  RobBlip = (createBlipAttachedTo ( Rob, 0 ))    
                  exports.extra_health:setElementExtraHealth(Rob, 15000) 
  
             end 
            addEventHandler("onResourceStart", resourceRoot, Robot)   
  
    setElementDimension(safecol,3) 
    setElementDimension(hillRadar,3) 
     
  
  
  
Timer = {} 
function money (theKiller) 
if (source == Rob) then 
if theKiller == nil or theKiller == false then 
exports["TopBarChat"]:sendClientMessage ( "The Robot has defeated by unknown player~zombies.", root, 255, 0, 0 ) 
exports["TopBarChat"]:sendClientMessage ( "The Robot will return again soon!", root, 255, 0, 0 ) 
Timer[source] = setTimer(Robot, 300000, 1) 
destroyElement (RobBlip) 
else 
killerName = getPlayerName(theKiller) 
weapon = getPedWeapon(theKiller) 
wr, wg, wb = getPlayerNametagColor(theKiller) 
exports.killmessages:outputMessage ( {killerName,{"padding",width=3},{"icon",id=weapon or 0},{"padding",width=3},{"color",r=255,g=255,b=0},"The Robot"},getRootElement(),wr,wg,wb ) 
local acc = getPlayerAccount (theKiller) 
if ( acc ) and not isGuestAccount(acc) then 
  end 
exports["TopBarChat"]:sendClientMessage ( getPlayerName ( theKiller ) .. " Has killed the Robot and won 5k Zombie kills", root, 0, 255, 0 ) 
exports["TopBarChat"]:sendClientMessage ( "The Robot will return again soon!", root, 255, 0, 0 ) 
Add = 5000 
KillData = "Zombie kills" 
playerKills = getElementData ( playerSource, KillData) or 0  
setElementData ( playerSource, KillData, ( playerKills + tonumber(Add) )) 
destroyElement (RobBlip) 
Timer[source] = setTimer(Robot, 300000, 1) 
end 
end 
end 
addEvent("onBotWasted", true) 
addEventHandler("onBotWasted", getRootElement(), money) 
  
function Robotreturn() 
exports["TopBarChat"]:sendClientMessage ("WARNING : The Robot has been appeared in hell zone, who will defeat him ?!", root, 255, 0, 0 ) 
end 
addEvent("onBotSpawned", true) 
addEventHandler("onBotSpawned", root, Robotreturn) 
  

:| نآسخ المثال اللي اعطيتك ويآه وتقول ما يعطي

theKiller بَ playerSource أستبدل

Link to comment
الكوود كامل هنا

بس ما يعطي عدد قتل محتاج مساعده في اصلاحه

عشان يعطي عدد قتل

    safecol = createColCuboid ( 1489.4554443359,-3963.5056152344,0, 255, 255, 255 ) 
       local hillRadar = createRadarArea ( 1489.4554443359,-3963.5056152344, 200, 200, 181, 0, 0, 255 ) 
setElementData (hillRadar, "zombieProof", true) 
  
  
            function Robot ( )   
  
                   Rob = exports [ "slothBot" ]:spawnBot ( 1554.4996337891,-3906.5285644531,5.0093750953674, 90,  math.random ( 300, 303 ), 0, 3, Robot, 38, "hunting", true ) 
                  setElementModel ( Rob, 112 ) 
                  RobBlip = (createBlipAttachedTo ( Rob, 0 ))    
                  exports.extra_health:setElementExtraHealth(Rob, 15000) 
  
             end 
            addEventHandler("onResourceStart", resourceRoot, Robot)   
  
    setElementDimension(safecol,3) 
    setElementDimension(hillRadar,3) 
     
  
  
  
Timer = {} 
function money (theKiller) 
if (source == Rob) then 
if theKiller == nil or theKiller == false then 
exports["TopBarChat"]:sendClientMessage ( "The Robot has defeated by unknown player~zombies.", root, 255, 0, 0 ) 
exports["TopBarChat"]:sendClientMessage ( "The Robot will return again soon!", root, 255, 0, 0 ) 
Timer[source] = setTimer(Robot, 300000, 1) 
destroyElement (RobBlip) 
else 
killerName = getPlayerName(theKiller) 
weapon = getPedWeapon(theKiller) 
wr, wg, wb = getPlayerNametagColor(theKiller) 
exports.killmessages:outputMessage ( {killerName,{"padding",width=3},{"icon",id=weapon or 0},{"padding",width=3},{"color",r=255,g=255,b=0},"The Robot"},getRootElement(),wr,wg,wb ) 
local acc = getPlayerAccount (theKiller) 
if ( acc ) and not isGuestAccount(acc) then 
  end 
exports["TopBarChat"]:sendClientMessage ( getPlayerName ( theKiller ) .. " Has killed the Robot and won 5k Zombie kills", root, 0, 255, 0 ) 
exports["TopBarChat"]:sendClientMessage ( "The Robot will return again soon!", root, 255, 0, 0 ) 
Add = 5000 
KillData = "Zombie kills" 
playerKills = getElementData ( playerSource, KillData) or 0  
setElementData ( playerSource, KillData, ( playerKills + tonumber(Add) )) 
destroyElement (RobBlip) 
Timer[source] = setTimer(Robot, 300000, 1) 
end 
end 
end 
addEvent("onBotWasted", true) 
addEventHandler("onBotWasted", getRootElement(), money) 
  
function Robotreturn() 
exports["TopBarChat"]:sendClientMessage ("WARNING : The Robot has been appeared in hell zone, who will defeat him ?!", root, 255, 0, 0 ) 
end 
addEvent("onBotSpawned", true) 
addEventHandler("onBotSpawned", root, Robotreturn) 
  

:| نآسخ المثال اللي اعطيتك ويآه وتقول ما يعطي

theKiller بَ playerSource أستبدل

يب ما يعطي وعدلت على المثال

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...