• Announcements

    • jhxp

      Forums are online again after a maintenance.   18/03/17

      MTA Forums maintenance is completed, although some automatic time-heavy tasks are still in process and will be finished eventually in background. Expect some features such as Forum Search to not display all results until all processes are finished. Please let us know if you spot a forum feature that worked correctly before the maintenance but does not work anymore now. Thanks. --MTA Team

synskidz

Members
  • Content count

    19
  • Joined

  • Last visited

Community Reputation

0 Neutral

About synskidz

  • Rank
    Square

Details

  • Gang
    neutral
  • Location
    Los Santos
  • Occupation
    Idlewood
  • Interests
    Music, gaming, scripting
  1. thanks duke nukem
  2. @fist bro, how i add more skin? if (getElementData (getLocalPlayer (), "zombie") ~= true) and ( isPedDead ( getLocalPlayer () ) == false ) and ((getElementModel(getLocalPlayer()) ~= 293 or (getElementModel(getLocalPlayer()) ~= 294 )) then its not working, i add local skin = ( 293,294) and subtitute it. but still not work. any suggest?
  3. thanks dude, i surprised its so simple
  4. help, i want zombies not chasing local player with the skin id = 293 --THIS CHECKS ALL ZOMBIES EVERY SECOND TO SEE IF THEY ARE IN SIGHT function zombie_check () if (getElementData (getLocalPlayer (), "zombie") ~= true) and ( isPedDead ( getLocalPlayer () ) == false ) then local zombies = getElementsByType ( "ped",getRootElement(),true ) local id = getElementModel (localPlayer) local Px,Py,Pz = getElementPosition( getLocalPlayer () ) if isPedDucked ( getLocalPlayer ()) then local Pz = Pz-1 end for theKey,theZomb in ipairs(zombies) do if (isElement(theZomb)) then local Zx,Zy,Zz = getElementPosition( theZomb ) if (getDistanceBetweenPoints3D(Px, Py, Pz, Zx, Zy, Zz) < 45 ) then if (getElementData (theZomb, "zombie") == true) then if ( getElementData ( theZomb, "status" ) == "idle" ) then --CHECKS IF AN IDLE ZOMBIE IS IN SIGHT local isclear = isLineOfSightClear (Px, Py, Pz+1, Zx, Zy, Zz +1, true, false, false, true, false, false, false) if (isclear == true) then setElementData ( theZomb, "status", "chasing" ) setElementData ( theZomb, "target", getLocalPlayer() ) table.insert( myZombies, theZomb ) --ADDS ZOMBIE TO PLAYERS COLLECTION table.remove( zombies, theKey) zombieradiusalert (theZomb) end elseif (getElementData(theZomb,"status") == "chasing") and (getElementData(theZomb,"target") == nil) then --CHECKS IF AN AGGRESSIVE LOST ZOMBIE IS IN SIGHT local isclear = isLineOfSightClear (Px, Py, Pz+1, Zx, Zy, Zz +1, true, false, false, true, false, false, false) if (isclear == true) then setElementData ( theZomb, "target", getLocalPlayer() ) isthere = "no" for k, ped in pairs( myZombies ) do if ped == theZomb then isthere = "yes" end end if isthere == "no" then table.insert( myZombies, theZomb ) --ADDS THE WAYWARD ZOMBIE TO THE PLAYERS COLLECTION if id = 293 then table.insert( myZombies, id ) end table.remove( zombies, theKey) end end elseif ( getElementData ( theZomb, "target" ) == getLocalPlayer() ) then --CHECKS IF AN ALREADY AGGRESSIVE ZOMBIE IS IN SIGHT local isclear = isLineOfSightClear (Px, Py, Pz+1, Zx, Zy, Zz +1, true, false, false, true, false, false, false) if (isclear == false) then --IF YOUR ZOMBIE LOST YOU, MAKES IT REMEMBER YOUR LAST COORDS setElementData ( theZomb, "target", nil ) triggerServerEvent ("onZombieLostPlayer", theZomb, oldPx, oldPy, oldPz) end end end end end end --this second half is for checking peds and zombies local nonzombies = getElementsByType ( "ped",getRootElement(),true ) local id = getElementModel (localPlayer) for theKey,theZomb in ipairs(zombies) do if (isElement(theZomb)) then if (getElementData (theZomb, "zombie") == true) then local Zx,Zy,Zz = getElementPosition( theZomb ) for theKey,theNonZomb in ipairs(nonzombies) do if (getElementData (theNonZomb, "zombie") ~= true) and (id ~= 293) then -- if the ped isnt a zombie local Px,Py,Pz = getElementPosition( theNonZomb ) if (getDistanceBetweenPoints3D(Px, Py, Pz, Zx, Zy, Zz) < 45 ) then local isclear = isLineOfSightClear (Px, Py, Pz+1, Zx, Zy, Zz +1, true, false, false, true, false, false, false ) if (isclear == true) and ( getElementHealth ( theNonZomb ) > 0) then if ( getElementData ( theZomb, "status" ) == "idle" ) then --CHECKS IF AN IDLE ZOMBIE IS IN SIGHT triggerServerEvent ("onZombieLostPlayer", theZomb, Px, Py, Pz) setElementData ( theZomb, "status", "chasing" ) setElementData ( theZomb, "target", theNonZomb ) zombieradiusalert (theZomb) elseif ( getElementData ( theZomb, "status" ) == "chasing" ) and ( getElementData ( theZomb, "target" ) == nil) then triggerServerEvent ("onZombieLostPlayer", theZomb, Px, Py, Pz) setElementData ( theZomb, "target", theNonZomb ) end end end if ( getElementData ( theZomb, "target" ) == theNonZomb ) then --CHECKS IF AN ALREADY AGGRESSIVE ZOMBIE IS IN SIGHT OF THE PED local Px,Py,Pz = getElementPosition( theNonZomb ) if (getDistanceBetweenPoints3D(Px, Py, Pz, Zx, Zy, Zz) < 45 ) then local isclear = isLineOfSightClear (Px, Py, Pz+1, Zx, Zy, Zz+1, true, false, false, true, false, false, false) if (isclear == false) then --IF YOUR ZOMBIE LOST THE PED, MAKES IT REMEMBER the peds LAST COORDS triggerServerEvent ("onZombieLostPlayer", theZomb, Px, Py, Pz) setElementData ( theZomb, "target", nil ) end end end end end end end end end for k, ped in pairs( myZombies ) do if (isElement(ped) == false) then table.remove( myZombies, k) end end oldPx,oldPy,oldPz = getElementPosition( getLocalPlayer () ) end i ve insert the id on table array, but the zombies still chase me
  5. thanks dude, so far so good. if any error, would u help me again? hehehe. big thanks btw
  6. help stuck here
  7. it got no error report but still not get the reward and the outputChatBox not displayed. thanks for replying
  8. player_account = getPlayerAccount(source) function RewardLevel ( ) local wonge = source local UP = tonumber ( getAccountData ( player_account, "level" ) ) or 0 if ( UP == 1 ) then outputChatBox( "test") elseif ( UP == 2 ) then givePlayerMoney ( wonge, 50000 ) outputChatBox( "Reward Level 2 : get $50,000!") elseif ( UP == 3 ) then setPedStat(wonge, 24, 585) outputChatBox( "Reward Level 3 : increase Max HP!" ) end end addEvent("onPlayerChangeLevel", true) addEvent("onPlayerLevelUP", true) addEventHandler("onPlayerChangeLevel", getRootElement(), RewardLevel) addEventHandler("onPlayerLevelUP", getRootElement(), RewardLevel) it got error : Bad argument @ 'getAccountData' [Expected account at argument 1, got boolean] and not get the reward. HELP!
  9. ok thanks
  10. i want to disable /login or /logout on console command but i cant find the resource that add the command. i use 'play' gamemode... i need help. sorry if this not the right fourm
  11. thanks for ur advice dude, i'll find another way
  12. Big Thanks Bro, u r genius. it work thanks
  13. function onregenstart() setTimer( healthup, 7000, 0, getElementsByType( "player" )) end addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()), onregenstart ) function healthup(thePlayer) for k, players in ipairs(getElementsByType( "player" )) do if(getAccountData(players, "regen") == true) then local phealth = getElementHealth( players ) setElementHealth( players, phealth + 5 ) end end end it says "WARNING: remek\remek.lua:8: Bad argument @ 'getAccountData' [Expected account at argument 1, got player]" i want to all player with the account data named "regen" that have "true" value can regen health. and player data with false value on the account cant regen the health
  14. -- i cant display the killer name, whatswrong? addEventHandler("onPedWasted", getRootElement(), function(ammo, killer) if isElement(Musuh) then if source == Musuh then givePlayerMoney(killer,10000) triggerClientEvent ( "mandeg", root ) triggerClientEvent ( "menang", root ) destroyElement(Realtzank) destroyElement(blip[2]) outputChatBox( getPlayerName(killer) " get 10000", killer) end end end )
  15. where to find script that can make boss / ped invincible?