Jump to content

Kenix

Retired Staff
  • Posts

    4,121
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Kenix

  1. Kenix

    Help ?!

    onMarkerhit Search on wiki
  2. hi guys I want to make that any player entering into a zone lit up But that instead of all players lit up help please? Here my script on the server side fire = createColCircle( 2358.8, -104.8, 1 ) -- create the colshape fire1 = createColCircle( 2347.68, -107.7, 1 ) -- create the colshape function Limite (hitPlayer,matchingDimension) local player = getPlayerAccount(hitPlayer) if (getAccountData(player,"Permission to get out") == false) then isPedOnFire ( localPlayer ) ------// this line not work end end addEventHandler ("onColShapeLeave",fire,Limite) function Limite (hitPlayer,matchingDimension) local player = getPlayerAccount(hitPlayer) if (getAccountData(player,"Permission to get out") == false) then setPedOnFire ( localPlayer ) ------// this line not work end end addEventHandler ("onColShapeLeave",fire1,Limite)
  3. Kenix

    help me!

    All is correct SolidShake
  4. Kenix

    help me!

    I want to make that the zombie spawn on the classes. I badly write in English
  5. Kenix

    help me!

    I want to modify zday a script That the zombie random spawn With the functions the easy zombie and the heavy zombie. Here my script. ZombieLimit = get("zombies.MaxZombies")-- HOW MANY ZOMBIES SHOULD EXIST AT MAXIMUM? ZombieStreaming = get("zombies.StreamMethod") -- 1 to constantly stream zombies, 0 to only allow zombies to spawn via createZombie function, 2 to only allow spawning at set spawnpoints ZombiePedSkins = {13,22,56,68,69,70,92,97,105,107,108,127,128,152,162,167,188,206,209,212,229,230,258,264,277,280} --ALTERNATE SKIN LISTS FOR ZOMBIES (SHORTER LIST IS TEXTURED ZOMBIES ONLY) resourceRoot = getResourceRootElement() moancount =0 moanlimit = 10 --- //создаём рандомные классы зомби addEvent( "onRandomfunction" ); addEventHandler( "onRandomfunction", getRootElement(), function( killer ) local headless = math.random (0,3) if headless == 0 then setPedHeadless (zomb,true) end --IDLE BEHAVIOUR OF A ZOMBIE function Zomb_Idle (ped) if isElement(ped) then if ( getElementData ( ped, "status" ) == "idle" ) and ( isPedDead ( ped ) == false ) and (getElementData (ped, "zombie") == true) then local action = math.random( 1, 6) if action < 4 then -- walk a random direction local rdmangle = math.random( 1, 359 ) setPedRotation( ped, rdmangle ) setPedAnimation ( ped, "PED", "Player_Sneak", -1, true, true, true) setTimer ( Zomb_Idle, 7000, 1, ped ) elseif action == 4 then -- get on the ground setPedAnimation ( ped, "MEDIC", "cpr", -1, false, true, true) setTimer ( Zomb_Idle, 4000, 1, ped ) end end end end ----//создаём класс 1 тупые зомби function zomb_class1 (ped, Zx, Zy, Zz ) if isElement(ped) then if (getElementData ( ped, "status" ) == "chasing") and (getElementData (ped, "zombie") == true) then local x, y, z = getElementPosition( ped ) if (getElementData ( ped, "target" ) == nil) then local Px = getElementData ( ped, "Tx" ) local Py = getElementData ( ped, "Ty" ) local Pz = getElementData ( ped, "Tz" ) local Pdistance = (getDistanceBetweenPoints3D( Px, Py, Pz, x, y, z )) if (Pdistance < 1.5 ) then setTimer ( function (ped) if ( isElement ( ped ) ) then setElementData ( ped, "status", "idle" ) end end, 2000, 1, ped ) end end local distance = (getDistanceBetweenPoints3D( x, y, z, Zx, Zy, Zz )) if (distance < 1 ) then -- IF THE PED HASNT MOVED if (getElementData ( ped, "target" ) == nil) then local giveup = math.random( 1, 15 ) if giveup == 1 then setElementData ( ped, "status", "idle" ) else local action = math.random( 1,6 ) if action == 1 then setPedAnimation ( ped ) triggerClientEvent ( "Zomb_Punch", getRootElement(), ped ) setTimer ( function (ped) if ( isElement ( ped ) ) then setPedAnimation ( ped, "ped", "run_old", -1, true, true, true ) end end, 800, 1, ped ) setTimer ( zomb_class1, 2000, 1, ped, x, y, z ) elseif action == 2 then setPedAnimation ( ped ) triggerClientEvent ( "Zomb_Jump", getRootElement(), ped ) setTimer ( zomb_class1, 3500, 1, ped, x, y, z ) end local Ptarget = (getElementData ( ped, "target" )) if isElement(Ptarget) then local Px, Py, Pz = getElementPosition( Ptarget ) local Pdistance = (getDistanceBetweenPoints3D( Px, Py, Pz, Zx, Zy, Zz )) if (Pdistance < 1.2 ) then -- ATTACK A PLAYER IF THEY ARE CLOSE if ( isPedDead ( Ptarget ) ) then --EAT A DEAD PLAYER setPedAnimation ( ped ) setPedAnimation ( ped, "MEDIC", "cpr", -1, false, true, false) setTimer ( function (ped) if ( isElement ( ped ) ) then setElementData ( ped, "status", "idle" ) end end, 10000, 1, ped ) setTimer ( function (ped) if ( isElement ( ped ) ) then setPedRotation ( ped, getPedRotation(ped)-180) end end, 10000, 1, ped ) zmoan(ped) else local action = math.random( 1,6 ) if action == 1 then setPedAnimation ( ped) triggerClientEvent ( "Zomb_Jump", getRootElement(), ped ) setTimer ( zomb_class1, 2000, 1, ped, x, y, z ) else setPedAnimation ( ped) triggerClientEvent ( "Zomb_Punch", getRootElement(), ped ) setTimer ( function (ped) if ( isElement ( ped ) ) then setPedAnimation ( ped, "ped", "run_old", -1, true, true, true ) end end, 800, 1, ped ) setTimer ( zomb_class1, 2000, 1, ped, x, y, z ) end end else if ( isPedDead (Ptarget) ) then setTimer ( function (ped) if ( isElement ( ped ) ) then setElementData ( ped, "status", "idle" ) end end, 2000, 1, ped ) setTimer ( function (ped) if ( isElement ( ped ) ) then setPedRotation ( ped, getPedRotation(ped)-180) end end, 1800, 1, ped ) else local action = math.random( 1,6 ) if action == 1 then setPedAnimation ( ped) triggerClientEvent ( "Zomb_Punch", getRootElement(), ped ) setTimer ( function (ped) if ( isElement ( ped ) ) then setPedAnimation ( ped, "ped", "run_old", -1, true, true, true ) end end, 800, 1, ped ) setTimer ( zomb_class1, 2000, 1, ped, x, y, z ) elseif action == 2 then setPedAnimation ( ped) triggerClientEvent ( "Zomb_Jump", getRootElement(), ped ) setTimer ( zomb_class1, 2000, 1, ped, x, y, z ) end end end else setElementData ( ped, "status", "idle" ) end end else setPedAnimation ( ped, "ped", "run_old", -1, true, true, true) --KEEP WALKING setTimer ( zomb_class1, 1000, 1, ped, x, y, z ) --CHECK AGAIN end end end end end addEvent( "onZombieWasted" ); addEventHandler( "onZombieWasted", getRootElement(), function( killer ) givePlayerMoney( killer, 100 ); if (killer) and (killer ~=source) then local exp = getElementData(killer,"exp") if exp then setElementData(killer,"exp",tonumber(getElementData(killer,"exp"))+5) outputChatBox("+5 exp! всего ".. tonumber(exp)+5,killer,0,255,0) else setElementData(killer,"exp",0) end end end ) ----//создаём класс 2 простые зомби function Zomb_class2 (ped, Zx, Zy, Zz ) if isElement(ped) then if (getElementData ( ped, "status" ) == "chasing") and (getElementData (ped, "zombie") == true) then local x, y, z = getElementPosition( ped ) if (getElementData ( ped, "target" ) == nil) then local Px = getElementData ( ped, "Tx" ) local Py = getElementData ( ped, "Ty" ) local Pz = getElementData ( ped, "Tz" ) local Pdistance = (getDistanceBetweenPoints3D( Px, Py, Pz, x, y, z )) if (Pdistance < 1.5 ) then setTimer ( function (ped) if ( isElement ( ped ) ) then setElementData ( ped, "status", "idle" ) end end, 2000, 1, ped ) end end local distance = (getDistanceBetweenPoints3D( x, y, z, Zx, Zy, Zz )) if (distance < 1 ) then -- IF THE PED HASNT MOVED if (getElementData ( ped, "target" ) == nil) then local giveup = math.random( 1,6 ) if giveup == 1 then setElementData ( ped, "status", "idle" ) else local action = math.random( 1,6 ) if action == 1 then setPedAnimation ( ped ) triggerClientEvent ( "Zomb_Punch2", getRootElement(), ped ) setTimer ( function (ped) if ( isElement ( ped ) ) then setPedAnimation ( ped, "ped", "run_fatold", -1, true, true, true ) end end, 800, 1, ped ) setTimer ( Zomb_class2, 2000, 1, ped, x, y, z ) elseif action == 2 then setPedAnimation ( ped ) triggerClientEvent ( "Zomb_Jump2", getRootElement(), ped ) setTimer ( Zomb_class2, 3500, 1, ped, x, y, z ) end end else local Ptarget = (getElementData ( ped, "target" )) if isElement(Ptarget) then local Px, Py, Pz = getElementPosition( Ptarget ) local Pdistance = (getDistanceBetweenPoints3D( Px, Py, Pz, Zx, Zy, Zz )) if (Pdistance < 1.2 ) then -- ATTACK A PLAYER IF THEY ARE CLOSE if ( isPedDead ( Ptarget ) ) then --EAT A DEAD PLAYER setPedAnimation ( ped ) setPedAnimation ( ped, "MEDIC", "cpr", -1, false, true, false) setTimer ( function (ped) if ( isElement ( ped ) ) then setElementData ( ped, "status", "idle" ) end end, 10000, 1, ped ) setTimer ( function (ped) if ( isElement ( ped ) ) then setPedRotation ( ped, getPedRotation(ped)-180) end end, 10000, 1, ped ) zmoan(ped) else local action = math.random( 1,6 ) if action == 1 then setPedAnimation ( ped) triggerClientEvent ( "Zomb_Jump2", getRootElement(), ped ) setTimer ( Zomb_class2, 2000, 1, ped, x, y, z ) else end end else if ( isPedDead (Ptarget) ) then setTimer ( function (ped) if ( isElement ( ped ) ) then setElementData ( ped, "status", "idle" ) end end, 2000, 1, ped ) setTimer ( function (ped) if ( isElement ( ped ) ) then setPedRotation ( ped, getPedRotation(ped)-180) end end, 1800, 1, ped ) else local action = math.random( 1,6 ) if action == 1 then setPedAnimation ( ped) triggerClientEvent ( "Zomb_Punch2", getRootElement(), ped ) setTimer ( function (ped) if ( isElement ( ped ) ) then setPedAnimation ( ped, "ped", "run_fatold", -1, true, true, true ) end end, 800, 1, ped ) setTimer ( Zomb_class2, 2000, 1, ped, x, y, z ) elseif action == 2 then setPedAnimation ( ped) triggerClientEvent ( "Zomb_Jump2", getRootElement(), ped ) setTimer ( Zomb_class2, 2000, 1, ped, x, y, z ) end end end else setElementData ( ped, "status", "idle" ) end end else setPedAnimation ( ped, "ped", "run_fatold", -1, true, true, true) --KEEP WALKING setTimer ( Zomb_class2, 1000, 1, ped, x, y, z ) --CHECK AGAIN end end end end addEvent( "onZombieWasted2" ); addEventHandler( "onZombieWasted2", getRootElement(), function( killer ) givePlayerMoney( killer, 200 ); if (killer) and (killer ~=source) then local exp = getElementData(killer,"exp") if exp then setElementData(killer,"exp",tonumber(getElementData(killer,"exp"))+10) outputChatBox("+10 exp! всего ".. tonumber(exp)+10,killer,0,255,0) else setElementData(killer,"exp",0) end end end ) ----//создаём класс 3 сложные зомби function Zomb_class3 (ped, Zx, Zy, Zz ) if isElement(ped) then if (getElementData ( ped, "status" ) == "chasing") and (getElementData (ped, "zombie") == true) then local x, y, z = getElementPosition( ped ) if (getElementData ( ped, "target" ) == nil) then local Px = getElementData ( ped, "Tx" ) local Py = getElementData ( ped, "Ty" ) local Pz = getElementData ( ped, "Tz" )
  6. Kenix

    Help ?!

    function startclient () setSkyGradient( 50 , 255 , 255 , 65 , 100 , 25 ) Marker1 = createMarker ( 4183.0122070313, -2877.7978515625, 1067.9123535156, "arrow", 5, 0, 2, 255, 255) addEventHandler( "onClientMarkerHit", Marker1) end function warp (player) if source == Marker1 then if isPedInVehicle(player) then local vehicle=getPedOccupiedVehicle(player) setElementPosition (vehicle , 4154.0571289063, -2392.6955566406, 1610.1810302734 ) setTimer( setVehicleFrozen, 1000, 1, vehicle, false ) end end function markerHit(thePlayer,dimension) if (dimension and thePlayer==getLocalPlayer()) then local sound = playSound("files/warp.mp3") end end end addEventHandler( "onClientResourceStart", resourceRoot, startclient ) addEventHandler( "onClientMarkerHit", getRootElement(), warp )
  7. Kenix

    help me!

    I have made one script and I want that it included random functions how to make it??? help please I the newcomer at a forum
×
×
  • Create New...