-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
http://pastebin.com/wvLGUUwb
-
Post your OOC(/o) chat script.
-
Please talk about that kind of stuff via PM, msn, email.
-
That script works fine, I've tested and if I'm SuperModerator it'll output with SMOD tag, same for HeadAdmin and so on. What are you trying to achieve?
-
First, you wrote: "fuction" instead of "function", second you never added the event client side, and third, use this: -- client side: function opendoor() playSound ( "door.mp3", false ) end addEvent("opendoor",true) addEventHandler("opendoor",root,opendoor) -- server side: addEventHandler ("onMarkerHit",markerBHZ, function (hitPlayer) local account = getPlayerAccount(hitPlayer) if isObjectInACLGroup( 'user.'..getAccountName( account ), aclGetGroup( 'BHZ' ) ) then moveObject (puerta2,1000,742.4,-2442.5,14.39) triggerClientEvent (hitPlayer,"opendoor",hitPlayer) else outputChatBox ("Acceso denegado!",hitPlayer) killPed (hitPlayer) end end)
-
function ChatSystem(msg,msgtype) local root = getRootElement() local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) if (msgtype == 0) then cancelEvent() if isObjectInACLGroup("user." .. account, aclGetGroup("HeadAdmin")) then outputChatBox("#855863[HEAD] #FFFFFF" .. name .. ":#FFFFFF " .. msg, root, 255, 255, 255, true) outputServerLog("CHAT: [HEAD] " .. name .. ": " .. msg) elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then outputChatBox("#855863[sMOD] #FFFFFF" .. name ..":#FFFFFF " ..msg, root, 255, 255, 255, true) outputServerLog("CHAT: [sMOD] " .. name .. ": " .. msg) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then outputChatBox("#855863[MOD] #FFFFFF" .. name .. ":#FFFFFF " .. msg, root, 255, 255, 255, true) outputServerLog("CHAT: [MOD] " .. name .. ": " .. msg) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then outputChatBox(name .. ":#FFFFFF " .. msg, root, 255, 255, 255, true) outputServerLog("CHAT: " .. name .. ": " .. msg) end end end addEventHandler("onPlayerChat",getRootElement(),ChatSystem) function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end
-
function moveGUI() for k,v in ipairs(charImage) do local move = 0 local guiX, guiY = guiGetPosition(charImage[k],false) move = move + 40 guiSetPosition(charImage[k],guiX + move, screenHeight - 120,false) if move == 160 then guiSetAlpha(charImage[k],0.5) charImage[k] = nil end end end addEventHandler("onClientRender", getRootElement(), moveGUI) I don't know if that's what you wanted, neither if it's going to work correctly.
-
No, el script de teams y eso es server side, esas funciones son client side.
-
lol, that's because it has to be that way. /mods/deathmatch/resources/resourceName/<files> or: /mods/deathmatch/resources/resourceName.zip
-
No, estaba mal, usaste mal el "if" y el "elseif".
-
La verdad es que podrias poner la posicion en la misma tabla. local teams = { {getTeamFromName("Aliens"), {280, 0}, {0, 0, 5}}, -- 0, 0, 0 = la posicion. {getTeamFromName("Humans"), {280, 0}, {0, 0, 5}}, } addEventHandler("onPlayerLogin",root, function () local team, skins, position = unpack(teams[math.random(#teams)]) if (team and skins and position) then setPlayerTeam(source, team) setElementModel(source, skins[math.random(#skins)]) spawnPlayer(source, unpack(position)) end end)
-
local teams = { {getTeamFromName("Aliens"), {280, 0}}, {getTeamFromName("Humans"), {280, 0}}, } addEventHandler("onPlayerLogin",root, function () local team, skins = unpack(teams[math.random(#teams)]) if (team and skins) then setPlayerTeam(source, team) setElementModel(source, skins[math.random(#skins)]) end end) Como ves cree una tabla de skins en la tabla de los teams.
-
That's fine, it doesn't matter if it's a folder or a zip file. Are you using a external download URL?
-
Nop, eso esta mal, muy mal. No podes simplemente estudiar mi codigo y aprender del mismo?
-
Do you have the port 22003 (TCP) open? players can't download if closed.
-
Eso esta muy mal, yo te di un ejemplo, no pienses que te hare todo el script. Empeza a usar la wikipedia.
-
Maybe it's because we don't have the time we used to.
-
Y no funciona? deberia funcionar como vos queres. Lo probaste?
-
function plantWeedForPlayer( thePlayer, command ) if not (exports.global:hasItem(thePlayer, 49)) then outputChatBox("You need seeds to plant.", thePlayer, 255, 0, 0) else local x,y,z = getElementPosition( thePlayer ) x = x + 1 z = z - 0.5 local weed = createObject( 2241,x,y,z ) setTimer( destroyElement, 1440000, 1, weed ) addEventHandler ("onElementDestroy", weed, growWeed) end end addCommandHandler( "plantseeds", plantWeedForPlayer ) function growWeed ( ) local x, y, z = getElementPosition ( source ) z = z - 1 grass = createObject ( 3409, x, y, z ) end
-
setTimer( function() if (not source) then return end local account = getPlayerAccount(source) local money = getPlayerMoney(source) if (money >= 1000) then setAccountData(account,'My Level','New User') setElementData(source,'Level','New User') elseif (money >= 5000 and money > 1000) then setAccountData(account,'My Level','Regular') setElementData(source,'Level','Regular') elseif (money >= 20000 and money > 1000) then setAccountData(account,'My Level','Experienced') setElementData(source,'Level','Experienced') elseif (money >= 45000 and money > 20000) then setAccountData(account,'My Level','Veteran') setElementData(source,'Level','Veteran') elseif (money > 45000) then setAccountData(account,'My Level','Guru') setElementData(source,'Level','Guru') end end,500,0)
-
Osea que 280 y 0 (CJ) son iguales? mira vos, no tenia idea... solo cambia el modelo en la tabla de teams.
-
local teams = { {getTeamFromName("Aliens"), 280}, {getTeamFromName("Humans"), 0}, } addEventHandler("onPlayerLogin",root, function () local team, skin = unpack(teams[math.random(#teams)]) if (team and skin) then setPlayerTeam(source, team) setElementModel(source, skin) end end)