Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    5000 posts!

    I'm wondering, what did you guys meant by "booo"?
  2. I'm here to help, I don't want a reward for it.
  3. You removed one 'end'. exports.scoreboard:scoreboardAddColumn("EXP") exports.scoreboard:scoreboardAddColumn("Level") function win(ammo, killer, weapon, bodypart) local H = getElementData(killer, "EXP") local S = getElementData(killer, "Level") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) if killer and killer ~=source then setElementData(killer, "EXP", tonumber(H)+1) if tonumber(H) == 10 then setElementData(killer, "Level", "Lvl 1") elseif tonumber(H) == 20 then setElementData(killer, "Level", "Lvl 2") elseif tonumber(H) == 30 then setElementData(killer, "Level", "Lvl 3") elseif tonumber(H) == 40 then setElementData(killer, "Level", "Lvl 4") elseif tonumber(H) == 50 then setElementData(killer, "Level", "Lvl 5") elseif tonumber(H) == 60 then setElementData(killer, "Level", "Lvl 6") end outputChatBox(killer1 .. "Killed " .. noob .. " and gained +1 EXP", getRootElement(), 255, 255, 0, false) end end addEventHandler( "onPlayerWasted", getRootElement(), win)
  4. Castillo

    Bad Argument

    If you want to spawn the player who died back to his team location, then why do you check for kills? o_O.
  5. exports.scoreboard:scoreboardAddColumn("EXP") exports.scoreboard:scoreboardAddColumn("Level") function win(ammo, killer, weapon, bodypart) local H = getElementData(killer, "EXP") local S = getElementData(killer, "Level") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) if killer and killer ~=source then setElementData(killer, "EXP", tonumber(H)+1) if tonumber(H) == 10 then setElementData(killer, "Level", "Lvl 1") elseif tonumber(H) == 20 then setElementData(killer, "Level", "Lvl 2") elseif tonumber(H) == 30 then setElementData(killer, "Level", "Lvl 3") elseif tonumber(H) == 40 then setElementData(killer, "Level", "Lvl 4") elseif tonumber(H) == 50 then setElementData(killer, "Level", "Lvl 5") elseif tonumber(H) == 60 then setElementData(killer, "Level", "Lvl 6") end outputChatBox(killer1 .. "Killed " .. noob .. " and gained +1 EXP", getRootElement(), 255, 255, 0, false) end end addEventHandler("onPlayerWasted", getRootElement(), Win)
  6. Yes, you can, that's pretty obviously.
  7. exports.scoreboard:scoreboardAddColumn("EXP") function win(ammo, killer, weapon, bodypart) local H = getElementData(killer, "EXP") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) if killer and killer ~=source then if tonumber(H) < 10 then setElementData(killer, "EXP", tonumber(H)+1) end outputChatBox(killer1 .. "Killed " .. noob .. " and gained +1 EXP", getRootElement(), 255, 255, 0, false) end end addEventHandler("onPlayerWasted", getRootElement(), Win) Should work.
  8. You want the player to get +1 EXP point until it reaches 10?
  9. Castillo

    Bad Argument

    Can you explain me what are you trying to do?
  10. Castillo

    5000 posts!

    Care about what? my posts? nah, not really, I just wanted to make this topic when I reached 5000 .
  11. No, I don't get what do you want, but what I get is that you want to add +1 exp point each time you kill a player, and that's what my code does.
  12. Why do you need a table to just add +1 to a element data? exports.scoreboard:scoreboardAddColumn("EXP") function win(ammo, killer, weapon, bodypart) local H = getElementData(killer, "EXP") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) if killer and killer ~=source then setElementData(killer, "EXP", tonumber(H)+1) outputChatBox(killer1 .. "Killed " .. noob .. " and gained +1 EXP", getRootElement(), 255, 255, 0, false) end end addEventHandler("onPlayerWasted", getRootElement(), Win)
  13. Castillo

    Bad Argument

    My bad, I didn't see the event handler, anyway, you're doing it wrong. function checkOnDeath(ammo, killer) if (killer and getElementType(killer) == "player" and killer ~= source) then local kills = tonumber(getElementData(killer,"Zombie kills")) if (not kills) then setElementData(killer, "Zombie kills", 0) kills = 0 end if (kills <= 24) then spawnPlayer ( killer, 839, -1375, -0.3, 90.0, 0 ) elseif (kills >= 25 and kills <= 49) then elseif (kills >= 35 and kills <=49) then elseif (kills >= 50 and kills <=149) then elseif (kills >= 150 and kills <=349) then elseif (kills >= 350 and kills <=499) then elseif (kills >= 500 and kills <=899) then elseif (kills >= 900 ) then end end end addEventHandler("onPlayerWasted", root, checkOnDeath)
  14. Castillo

    Bad Argument

    Show us how do you use the checkOnDeath function.
  15. function clear(player) if hasObjectPermissionTo(player, "function.setPlayerMuted", false) then -- We check if the player has permission to use the function "setPlayerMuted". for i=1,30 do -- We make a for-loop from 1 to 30, this will output repeat the same thing 30 times. outputChatBox(" ") -- We output a empty chatbox message (the loop will make this output 30 times). end -- We end the for-loop. outputChatBox("* #ff0000INFO:#ffff00ADMIN #00ff00"..getPlayerName(player).." #ffff00CLEARED THE CHAT",root,255,12,15, true) -- We output to chatbox the name of the player who executed the command. else -- If he player doesn't has permission to use the function "setPlayerMuted". outputChatBox ("You are Not Admin", player, 193, 13, 13) -- We output to the player who executed the command that he/she is not an admin. end end addCommandHandler("cc", clear)
  16. Vehicle that are stored in a map file has these element data.
  17. Kenix, he asked without using colshapes, but anyway, I guess he may use it .
  18. Remi-X, at least the script himself works fine, wrong indentation doesn't kill people, does it?
  19. Why don't you want to use a colshape? what's wrong with them?
  20. You're welcome .
  21. See? you was able to do it, maybe you needed some more motivation . You're welcome
  22. Castillo

    5000 posts!

    Today I've reached my post number 5000! Let the party begin!
  23. You're welcome.
  24. function setposOnLogin() local playerTeam = getPlayerTeam(source) -- This was missing. if (not playerTeam) then return end local teamName = getTeamName(playerTeam) if (teamName == "Subway Clan(2)") then spawnPlayer(...ect) end -- this was missing. end addEventHandler("onPlayerLogin", getRootElement(), setposOnLogin)
  25. Your best chance is editing the resource "interiors", it's really simple to achieve this with some experience.
×
×
  • Create New...