Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. locations = { {1676.63,-1717.06,13.54}, {1542.68,-1675,13.55}, {1676.63,-1717.06,13.54} } addEvent( "onZombieSpawn", true ) function RanSpawn_Z ( gx, gy, gz, rot) local safezone = 0 local allradars = getElementsByType("radararea") for theKey,theradar in ipairs(allradars) do if getElementData(theradar, "zombieProof") == true then if isInsideRadarArea ( theradar, gx, gy ) then safezone = 1 end end end if safezone == 0 then if table.getn ( everyZombie ) < newZombieLimit then if not rot then rot = math.random (1,359) end randomZskin = math.random ( 1, table.getn ( ZombiePedSkins ) ) for i,v in pairs(locations) do local zomb = createPed( tonumber( ZombiePedSkins[randomZskin] ), v[1],v[2],v[3]) if zomb ~= false then setElementData ( zomb, "zombie", true ) table.insert( everyZombie, zomb ) setTimer ( function (zomb, rot) if ( isElement ( zomb ) ) then setPedRotation ( zomb, rot ) end end, 500, 1, zomb, rot ) setTimer ( function (zomb) if ( isElement ( zomb ) ) then setPedAnimation ( zomb, "ped", chaseanim, -1, true, true, true ) end end, 1000, 1, zomb ) setTimer ( function (zomb) if ( isElement ( zomb ) ) then setElementData ( zomb, "status", "idle" ) end end, 2000, 1, zomb ) triggerClientEvent ( "Zomb_STFU", getRootElement(), zomb ) end end end end end addEventHandler( "onZombieSpawn", getRootElement(), RanSpawn_Z )
  2. Dakilla, at least try to help him not to discuss what's wrong or what's not.
  3. I found your problem, you put as group: "admin" but it's "Admin" with big A addCommandHandler ( "wajsic", function (thePlayer) local account = getPlayerAccount ( thePlayer ) if account then local accountname = getAccountName ( account ) if isObjectInACLGroup ( "user." .. tostring(accountname), aclGetGroup ( "Admin" ) ) then setElementPosition( thePlayer, 1257.8564453125, -775.72027587891, 92.03125 ) end end end )
  4. That's because you forgot the SKIN part locations = { {1542.68,-1675,13.55}, {1676.63,-1717.06,13.54} } for i,v in pairs(locations) do local zomb = createPed (0,v[1],v[2],v[3]) -- spawn them with CJ skin. end
  5. Do this, locations = { {1542.68,-1675,13.55}, {0, 0, 0} } for i,v in pairs(locations) do local zomb = createPed (v[1],v[2],v[3]) end This way you can create as many as you want by just adding the x,y,z position following the example.
  6. addCommandHandler ( "wajsic", function (thePlayer) local account = getPlayerAccount ( thePlayer ) if account then local accountname = getAccountName ( account ) if isObjectInACLGroup ( "user." .. tostring(accountname), aclGetGroup ( "admin" ) ) then setElementPosition( thePlayer, 1257.8564453125, -775.72027587891, 92.03125 ) end end end ) Try that. Btw, you are doing it server side, right?
  7. I don't get what do you mean, which gamemode are you using?
  8. What do you mean?
  9. So, it's working like it should?
  10. What i get is, that you want to get minutes, seconds of milliseconds, it's that right? if so, i'm using this code for that: function convertTime(milliseconds) local mins = math.floor ( ms/60000 ) local secs = math.floor( (ms/1000)%60 ) return mins, secs end
  11. Castillo

    Algorithm

    Are you kidding us AcitanoX? you must use his code as he already said.
  12. Oh, my bad, i suposed he was using xmlLoadFile
  13. What you looking for doesn't exist, but you should try making it yourself, don't you think? https://wiki.multitheftauto.com/wiki/Main_Page Give it a try, we all have to start someday.
  14. I uploaded the one i'm using to mediafire long ago, here's the link to it. http://www.mediafire.com/?08ul44zogde48s5
  15. Castillo

    admin panel

    Paradise RP doesn't has lil toady's admin panel.
  16. maybe use getResourceConfig ("characters.xml") instead of xmlLoadFile.
  17. And? does the event get's killed?
  18. What about, adding the event when a map starts, and remove it when it stops the map?
  19. It's the same, also we don't even know of what gamemode we talking about.
  20. You must add the resource to the acl.xml group admin.
  21. Omg, you won't even learn the basics of Scripting! function onCTVSpawnMapStart (startedMap) local mapRoot = getResourceRootElement(startedMap) setMapName ( "Capture the Vehicle" ) ---get all the base elements ready for k,v in ipairs(getElementsByType ( "base", mapRoot )) do if getElementData ( v, "team" ) == "team1" then baseTeam1 = v elseif getElementData ( v, "team" ) == "team2" then baseTeam2 = v elseif getElementData ( v, "team" ) == "team3" then baseTeam3 = v elseif getElementData ( v, "team" ) == "team4" then baseTeam4 = v end end team1name = getElementData ( baseTeam1, "teamName" ) team2name = getElementData ( baseTeam2, "teamName" ) team3name = getElementData ( baseTeam3, "teamName" ) team4name = getElementData ( baseTeam4, "teamName" ) setRuleValue ( "Team 1", "" ..team1name.. "" ) setRuleValue ( "Team 2", "" ..team2name.. "" ) setRuleValue ( "Team 3", "" ..team3name.. "" ) setRuleValue ( "Team 4", "" ..team4name.. "" ) team1color = getElementData ( baseTeam1, "teamColor" ) team1col1 = gettok ( team1color, 1, 44 ) team1col2 = gettok ( team1color, 2, 44 ) team1col3 = gettok ( team1color, 3, 44 ) team2color = getElementData ( baseTeam2, "teamColor" ) team2col1 = gettok ( team2color, 1, 44 ) team2col2 = gettok ( team2color, 2, 44 ) team2col3 = gettok ( team2color, 3, 44 ) team3color = getElementData ( baseTeam3, "teamColor" ) team3col1 = gettok ( team3color, 1, 44 ) team3col2 = gettok ( team3color, 2, 44 ) team3col3 = gettok ( team3color, 3, 44 ) team4color = getElementData ( baseTeam4, "teamColor" ) team4col1 = gettok ( team4color, 1, 44 ) team4col2 = gettok ( team4color, 2, 44 ) team4col3 = gettok ( team4color, 3, 44 ) varTeam1 = createTeam ( tostring(team1name), team1col1, team1col2, team1col3 ) varTeam2 = createTeam ( tostring(team2name), team2col1, team2col2, team2col3 ) varTeam3 = createTeam ( tostring(team3name), team3col1, team3col2, team3col3 ) varTeam4 = createTeam ( tostring(team4name), team4col1, team4col2, team4col3 ) setTeamFriendlyFire(varTeam1, false) setTeamFriendlyFire(varTeam2, false) setTeamFriendlyFire(varTeam3, false) setTeamFriendlyFire(varTeam4, false) bases[varTeam1] = baseTeam1 bases[varTeam2] = baseTeam2 bases[varTeam3] = baseTeam3 bases[varTeam4] = baseTeam4 spawnText () end
  22. Castillo

    Respawn

    I don't get a f*** of that o,O.
  23. Castillo

    Gui Ratio

    You are using it like triggerClientEvent, in triggerServerEvent must be like this: triggerServerEvent("onColorSet", getLocalPlayer(), "Red")
  24. I don't think so, but you should try learning at the wiki like we all did. https://wiki.multitheftauto.com/wiki/Scr ... troduction https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI
  25. Castillo

    Zombie Mod

    Honestly, i don't see something REALLY intersting on it.. you just go around killing players.
×
×
  • Create New...