-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
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.
-
findMap is a custom function in race/racevoting_server.lua.
-
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)
-
What do you mean by "random sound"? do you mean a random sound file?
-
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)
-
Intenta crear el marker mas grande, y mas en el medio de la puerta.
-
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.
-
Funny, but vital for it to work .
-
addEventHandler("onClientGUIComboBoxAccepted", root, function(comboBox) outputChatBox("Some comboBox has been changed and it's new value is " .. guiComboBoxGetItemText(comboBox, guiComboBoxGetSelected(comboBox))) end)
-
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)
-
Into MTA you could, but outside, no.
-
setElementRotation(vehicle, 0, 0, findRotation(x, y, x2, y2)) You should check the example.
-
Maybe this function can help you: https://wiki.multitheftauto.com/wiki/FindRotation
-
Great! I'll be there if possible.
-
You're welcome.
-
I don't think you can do this, I don't have much experience about voice chat, as I don't like mics .
-
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.
-
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.
-
With NeXTreme's way it'll remove the scripts just after they download? if not, you can still steal them while playing.
-
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
-
El nombre te lo podes cambiar desde el "User Control Panel".
-
-- 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.
-
I guess he want's it for his website, not for the server himself.
