Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. function setTeamZombie(killer) if (killer and getElementType(killer) == "player") then local kills = tonumber(getElementData(killer,"Zombie kills")) if (not kills) then setElementData(killer, "Zombie kills", 0) end if kills <= 100 then local sw = getTeamFromName("Subway Clan") setPlayerTeam(killer, sw) elseif kills >= 101 then local sw1 = getTeamFromName("Clan 7") setPlayerTeam(killer, sw1) end end end addEvent("onZombieWasted",true) addEventHandler("onZombieWasted", root, setTeamZombie) It should work, in the other post I forgot something.
  2. Castillo

    buymap

    findMap is a custom function in race/racevoting_server.lua.
  3. Castillo

    little help

    local soundsTable = { [1]="sound1.mp3", [2]="sound2.mp3", } function Music() local soundPath = soundsTable[math.random(#soundsTable)] sound = playSound3D("sound/"..tostring(soundPath), 568.89764, -1857.21130, 4.7015, true) setSoundMaxDistance(sound, 30) end addEventHandler("onClientResourceStart", resourceRoot, Music)
  4. Castillo

    little help

    What do you mean by "random sound"? do you mean a random sound file?
  5. Castillo

    buymap

    And the bug is...?
  6. function setTeamZombie(killer) local kills = tonumber(getElementData(killer,"Zombie kills")) if kills <= 100 then sw = getTeamFromName("Subway Clan") setPlayerTeam(killer, sw) elseif kills >= 101 then sw1 = getTeamFromName("Clan 7") setPlayerTeam(killer, sw1) end end addEvent("onZombieWasted",true) addEventHandler("onZombieWasted", root, setTeamZombie)
  7. Castillo

    Puerta admin

    Intenta crear el marker mas grande, y mas en el medio de la puerta.
  8. He's talking about setPedStat: https://wiki.multitheftauto.com/wiki/SetPedStat @mrvicio: Things like infinite run, fire proof CJ, 150 health, 150 armor have special activation flags. They need a way to be triggered on/off.
  9. Funny, but vital for it to work .
  10. addEventHandler("onClientGUIComboBoxAccepted", root, function(comboBox) outputChatBox("Some comboBox has been changed and it's new value is " .. guiComboBoxGetItemText(comboBox, guiComboBoxGetSelected(comboBox))) end)
  11. addEventHandler("onClientGUIComboBoxAccepted", gui["menuCharSkin"], function(element) -- "OnClientGUIComboBoxAccepted", the "O" is upper case. outputChatBox("Menu Char Skin has been changed and it's value is " .. guiComboBoxGetItemText(element, guiComboBoxGetSelected(element))) end, false)
  12. Into MTA you could, but outside, no.
  13. setElementRotation(vehicle, 0, 0, findRotation(x, y, x2, y2)) You should check the example.
  14. Maybe this function can help you: https://wiki.multitheftauto.com/wiki/FindRotation
  15. Castillo

    MTA 1.1 Chat

    I don't think you can do this, I don't have much experience about voice chat, as I don't like mics .
  16. It is possible, never seen this function: setClipboard? GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Window[1] = guiCreateWindow(188,173,427,273,"",false) GUIEditor_Memo[1] = guiCreateMemo(34,18,366,140,"funnction scriptCreateTank ( commandName ) \n local luckyBugger = getLocalPlayer() -- get the local player \n local x, y, z = getElementPosition ( luckyBugger ) -- retrive the player's position \n createVehicle ( 432, x, y, z + 10 ) -- create te tank 10 units above them \n outputChatBox ( \"You got Tank'd!\", 255, 0, 0) \nend \n addCommandHandle( \"tank\", scriptCreateTank )",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(71,182,266,59,"copy all ",false,GUIEditor_Window[1]) addEventHandler("onClientGUIClick",GUIEditor_Button[1], function () setClipboard(tostring(guiGetText(GUIEditor_Memo[1]))) outputChatBox("Data copied to clipboard.",0,255,0) end, false) Should work.
  17. Castillo

    Ambulance

    You could use 'or', but would be easier to make a table . local medicSkins = { [0] = true, [299] = true } function onAmbulanceEnter(thePlayer, seat, jacked) if (getElementModel(source) == 416) then if (seat == 0) then return end local driver = getVehicleController(source) if (not driver) then return end if (not medicSkins[getElementModel(driver)]) then return end -- This will check if the player SKIN is on medicSkins table. if (getElementHealth(thePlayer) >= 100) then return end setElementHealth(thePlayer, 100) givePlayerMoney(driver, 500) end end addEventHandler ( "onVehicleEnter", root, onAmbulanceEnter ) Should work.
  18. With NeXTreme's way it'll remove the scripts just after they download? if not, you can still steal them while playing.
  19. Spanish4Life, that'll change the R, G, B color, it'll not remove the HEX colors. In admin_server.lua there's a function called: aAction Replace it with this one: function aAction ( type, action, admin, player, data, more ) if ( aLogMessages[type] ) then function aStripString ( string ) string = tostring ( string ) string = string.gsub ( string, "$admin", getPlayerName ( admin ):gsub("#%x%x%x%x%x%x","") ) string = string.gsub ( string, "$by_admin_4all", isAnonAdmin4All( admin ) and "" or " by " .. getPlayerName ( admin ):gsub("#%x%x%x%x%x%x","") ) string = string.gsub ( string, "$by_admin_4plr", isAnonAdmin4Victim( admin ) and "" or " by " .. getPlayerName ( admin ):gsub("#%x%x%x%x%x%x","") ) string = string.gsub ( string, "$data2", more or "" ) if ( player ) then string = string.gsub ( string, "$player", getPlayerName ( player ):gsub("#%x%x%x%x%x%x","") ) end return tostring ( string.gsub ( string, "$data", data or "" ) ) end local node = aLogMessages[type][action] if ( node ) then local r, g, b = node["r"], node["g"], node["b"] if ( node["all"] ) then outputChatBox ( aStripString ( node["all"] ), _root, r, g, b ) end if ( node["admin"] ) and ( admin ~= player ) then outputChatBox ( aStripString ( node["admin"] ), admin, r, g, b ) end if ( node["player"] ) then outputChatBox ( aStripString ( node["player"] ), player, r, g, b ) end if ( node["log"] ) then outputServerLog ( aStripString ( node["log"] ) ) end end end end
  20. El nombre te lo podes cambiar desde el "User Control Panel".
  21. Castillo

    Ambulance

    -- server side: function onAmbulanceEnter(thePlayer, seat, jacked) if (getElementModel(source) == 416) then if (seat == 0) then return end local driver = getVehicleController(source) if (not driver) then return end if (getElementModel(driver) ~= 0) then return end -- Change '0' to the Medic skin ID. if (getElementHealth(thePlayer) >= 100) then return end setElementHealth(thePlayer, 100) givePlayerMoney(driver, 500) end end addEventHandler ( "onVehicleEnter", root, onAmbulanceEnter ) Should work.
  22. I guess he want's it for his website, not for the server himself.
×
×
  • Create New...