
Plate
Members-
Posts
938 -
Joined
-
Last visited
Everything posted by Plate
-
a mi me funciona ElMota
-
Gracias ahora solamente me faltaria hacer que lo saque
-
creo que para bloquear comandos esto sirve addEventHandler ( "onPlayerCommand", root, function( cd ) if ( cd == 'kill' ) then cancelEvent() end end ) addEventHandler("onResourceStart", getRootElement(), cancelar) creo es un ejemplo para cancelar el kill
-
sigue bien ?( a medida que agregue cosas preguntare) function teams ( source, thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "LiderUmbrella" ) ) then local teams = getTeamFromName( 'Umbrella') if ( teams ) then setPlayerTeam( source, teams ) outputChatBox("Umbrella ",source,255,255,0) end end end addCommandHandler("Umbrella", teams)
-
solid hasta hay va bien no??? (despues ago los detalles) function team ( source ) local team = getTeamFromName( 'Umbrella') if ( team ) then setPlayerTeam( source, team ) outputChatBox("Umbrella ",source,255,255,0) end end addCommandHandler("umbrella", team)
-
Como se podria hacer para que con un comando uno user x del acl x agregue el player a un team instantaneamente y lo saque instantaneamente con ese comando
-
funcionara esto local randomSpawnTable = { { 1086.6645507813, 1076.1888427734, 10.838157653809,}, { -2086.9196777344, 173.74137878418, 35.0546875 }, { -2667.5134277344, 734.33197021484, 27.953125 }, { -2497.6953125, -697.30908203125, 139.3203125 }, { -2333.6032714844, -1621.1364746094, 483.71069335938 }, { 1862.423828125, 2624.6528320313, 13.8719085693 } } function Bot () local random = math.random ( #randomSpawnTable ) slothbot = exports["slothbot"]:spawnBot( unpack ( randomSpawnTable [ random ] ), 90, math.random (300,303), 0, 0, Boss, 38, hunting, true ) exports.extrahealth:setElementExtraHealth(slothbot,5000) end addEventHandler("onResourceStart",getRootElement(),Bot)
-
GRACIAS saben encontre un recurso que esta muy bueno pero en el spotmanager tiene bug de setElementData, getElementData --[[ /************************************************************** * * Script: Spot Management System * File: manager_server.lua * Version: 1.0.0 R3 * Date: 2012-05-26 * ***************************************************************/ --]] if not getResourceFromName("zombies") then return end local RADIUS = 10 local COUNT = 0 local SPOT = { } local ZOMBIESINSPOT = { } function setRadius(source,command,radius) if command == "setradius" then if not radius then return false end RADIUS = tonumber(radius) outputChatBox("You have set spot radius to " .. RADIUS,source) playSoundFrontEnd(source,41) end end addCommandHandler("setradius",setRadius) function setCSPOT(source,command,spot) if command == "setcurrentspot" then if not spot then return false end currentSpot = tonumber(spot) outputChatBox("You have set current spot to spot[" .. spot .. "]",source) playSoundFrontEnd(source,41) end end addCommandHandler("setcurrentspot",setCSPOT) function addZombieToSpot(source,command,spot,rot,skin,interior, dimension, level, maxhealth, boss) if command == "addzombie" then if not spot then return false end if not rot then rot = math.random (1,359) end if not skin then skin = 0 end if not interior then interior = 0 end if not dimension then dimension = 0 end if not level then level = 1 end if not maxhealth then maxhealth = 100 end if not boss then boss = false end currentSpot = tonumber(spot) local sx,sy,sz = getElementPosition(SPOT[currentSpot]) local sortZombies = RADIUS/1.2 local zom = exports.zombies:createZombie (sx+math.random(-sortZombies,sortZombies),sy+math.random(-sortZombies,sortZombies),sz+10,rot,skin,interior,dimension,level,maxhealth,boss) table.insert(ZOMBIESINSPOT,zom) setElementData(zom,"zombieSpot",SPOT[currentSpot]) outputChatBox("You have added '" .. getElementData(zom,"name") .. "' to spot[" .. spot .. "]",source) playSoundFrontEnd(source,41) end end addCommandHandler("addzombie",addZombieToSpot) -- ADD ZOMBIE GUI addEvent("addz",true) function addZgui(isboss,skin,interior,dimension,level,maxhp,name) if skin and interior and dimension and level and maxhp then rot = math.random (1,359) local sx,sy,sz = getElementPosition(SPOT[currentSpot]) local sortZombies = RADIUS/1.2 local zom = exports.zombies:createZombie (sx+math.random(-sortZombies,sortZombies),sy+math.random(-sortZombies,sortZombies),sz+10,rot,skin,interior,dimension,level,maxhp,isboss) table.insert(ZOMBIESINSPOT,zom) setElementData(zom,"zombieSpot",SPOT[currentSpot]) if name == "" then outputChatBox("You have added '" .. getElementData(zom,"name") .. "' to spot[" .. currentSpot .. "]",source) else outputChatBox("You have added '" .. name .. "' to spot[" .. currentSpot .. "]",source) setElementData(zom,"name",name) end end end addEventHandler( "addz", root, addZgui ) function destroySpot(source,command,spotToDestroy) if command == "destroyspot" then if currentSpot then if not spotToDestroy then spotToDestroy = currentSpot; currentSpotElem = SPOT[currentSpot] end local currentSpotElem = SPOT[tonumber(spotToDestroy)] if currentSpotElem and spotToDestroy then destroyElement(currentSpotElem) table.remove(SPOT,spotToDestroy) COUNT = COUNT - 1 outputChatBox("You have destroyed SPOT[" .. spotToDestroy .. "]",source) playSoundFrontEnd(source,41) else outputChatBox("SPOT[" .. spotToDestroy .. "] doesnt exist.",source) playSoundFrontEnd(source,41) end end end end addCommandHandler("destroyspot",destroySpot) function outputClick(mouseButton,buttonState,clickedElement,worldPosX,worldPosY,worldPosZ,screenPosX,screenPosY) if mouseButton == "right" and buttonState == "down" then local file = fileOpen("spots.lua",false) fileSetPos(file,fileGetSize(file)) COUNT = COUNT + 1 local written = fileWrite( file, '\n\r\nspot[' .. COUNT .. '] = createZombieSpot(' .. worldPosX .. ", " .. worldPosY .. ", " .. worldPosZ .. ", " .. RADIUS .. " )\r\n" ) if written then outputChatBox("You have created SPOT[" .. COUNT .. "]",source) playSoundFrontEnd(source,41) end --SPOT[COUNT] = createColSphere(worldPosX,worldPosY,worldPosZ,RADIUS) SPOT[COUNT],radius = exports.zombies:createZombieSpot(worldPosX,worldPosY,worldPosZ,RADIUS) setElementData(SPOT[COUNT],"radius",radius) --setElementData(SPOT[COUNT],"count",COUNT) currentSpot = COUNT fileFlush(file) end end addEventHandler("onPlayerClick",getRootElement(),outputClick) function markSpot() local spot = SPOT local currentspot = currentSpot local zombiesinspot = ZOMBIESINSPOT triggerClientEvent("markSpotC",root,spot,currentspot,zombiesinspot) end setTimer(markSpot,50,0) --DESTROYS CREATED ZOMBIES BY SPOT MANAGER function Zomb_delete (ped) if isElement(ped) then if (getElementData (ped, "zombie") == true) then for theKey,thePed in ipairs(ZOMBIESINSPOT) do if ped == thePed then table.remove( ZOMBIESINSPOT, theKey ) break end end destroyElement ( ped ) end end end addEventHandler ( "onResourceStop", getResourceRootElement(getThisResource()), function ( ) for k,zombie in ipairs(ZOMBIESINSPOT) do --table.remove( ZOMBIESINSPOT, k ) Zomb_delete(zombie) end end )
-
pero hay seteraias para que el player con el comando /Reset suba automaticamente a el level 32
-
pero para eso esta el setPlayerEXP y el setPlayerLevel no?
-
listo nose por que pero empeso a andar gracias solid y alex para poner que el player pueda resetear a un cierto level tendria que ser haci no miren exports [ "scoreboard" ]:scoreboardAddColumn ( "reset" ) function reset ( thePlayer ) exports [ "exp_system" ]:setPlayerEXP ( thePlayer, 0 ) exports [ "exp_system" ]:setPlayerLevel ( thePlayer, 1 ) exports [ "exp_system" ]:getPlayerLevel ( thePlayer, 32 ) local res = tonumber ( getElementData ( thePlayer, "reset" ) ) or 0 setElementData ( thePlayer, "reset", res + 1 ) end addCommandHandler ( "Reset", reset ) function respawn ( ) setElementData ( source, "reset", 0 ) end addEventHandler ( "onPlayerJoin", getRootElement(), respawn ) haci o esta mal hay
-
si solid esta en serverside pero me aparece devuelta lo mismo
-
alex pongo /Reset y me dice reset/reset.lua:14: attempt to comparate number whit boolean reset/reset.lua:13: Bad argument @ "getElemetnData" [Expected string at argument 2 ,got function
-
SOS UN KPO Gracias alex muchas muchas gracias muchas gracias gracias gracias por terminarlo pero no da +1 de reset u.u
-
Hola recuerdan mi intento de systema de resets bueno la cosa es haci puse esto exports [ "scoreboard" ]:scoreboardAddColumn ( "reset" ) function reset (thePlayer, command) exports [ "exp_system" ]:setPlayerEXP (thePlayer, 0) exports [ "exp_system" ]:setPlayerLevel (thePlayer, 1) setElementData(thePlayer,"reset",0) end addCommandHandler ("Reset", reset ) y hasta hay me funciono osea el player resetea y le aparece el 0 pero cuando vuelve a resetear no funciona Algo qe me puedan decir hacerca de esto?
-
cuando pongo start recurso1 en el panel de la consola sale esto main_s.lua:14: unexpect symbol near "and" y despues warning load script failed
-
hay ? mira cylinder3 = createMarker(206.76786804199,1860.228515625,13.140625 ,"cylinder",1.5,0,125,250,153) function mostrarTienda(hitPlayer) triggerClientEvent(hitPlayer,"mostrarTienda",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",cylinder3,mostrarTienda) ElMota hay un error en el script que me pasastes auto = createVehicle ( 433, -2270, 2300.8999023438, 5.4000000953674, 0, 0, 270 ) function autos(thePlayer, seat) if seat ~= 0 then and source == auto then local accountname = getAccountName (getPlayerAccount(thePlayer)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Umbrella" ) ) then return end cancelEvent() outputChatBox ( "solamente umbrella puede usar estos vehiculos", thePlayer, 255, 0, 0, true ) end end addEventHandler ( "onVehicleStartEnter", root, autos )
-
ya lo se solid es qe nose como cambiar el marker solid el recurso que corrigio ElMota no funciona me dice main_s.lua:14: unexpect symbol near "and"
-
es que solid uso el mismo recurso (tienda_de_armas) le cambio las imagenes y las id de las armas para que de otras (osea seria otra tienda) y se me mesclan las 2
-
muchas gracias ElMota y Solid son los mejores una cosa mas : que esta mal de esto cylinder3 = createMarker(206.76786804199,1860.228515625,13.140625 ,"cylinder3",1.5,0,125,250,153) function mostrarTienda(hitPlayer) triggerClientEvent(hitPlayer,"mostrarTienda",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",cylinder,mostrarTienda) me disculpo con edi por lo de la otra ves es que estaba demaciado cansado y en enojado , el me dijo eso y enojo mas todabia ElMota tiene un error el script dice main_s.lua:14: unexpect symbol near "and"
-
hola miren me tome mucho mucho tiempo estudiando (me parece que esta mal pero bue ) auto = createVehicle createVehicle ( 433, -2270, 2300.8999023438, 5.4000000953674, 0, 0, 270 ) function autos(player, seat, jacked) if source == auto then local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Umbrella" ) ) then return end cancelEvent() outputChatBox ( "solamente umbrella puede usar estos vehiculos", player, 255, 0, 0, true ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), autos ) pero no siirveeee
-
Disculpame Soren me olvide de decirte Bad Argument setElementData [Expected element at argument 1, got boolean] Bad Argument getElementData [Expected element at argument 1, got boolean]
-
hola encontre este script en un link (un spotmanager) de spawnee aalgunos y deja de funcionar y sale Bad Argument aqui el script (serverside) --[[ /************************************************************** * * Script: Spot Management System * File: manager_server.lua * Version: 1.0.0 R3 * Date: 2012-05-26 * ***************************************************************/ --]] if not getResourceFromName("zombies") then return end local RADIUS = 10 local COUNT = 0 local SPOT = { } local ZOMBIESINSPOT = { } function setRadius(source,command,radius) if command == "setradius" then if not radius then return false end RADIUS = tonumber(radius) outputChatBox("You have set spot radius to " .. RADIUS,source) playSoundFrontEnd(source,41) end end addCommandHandler("setradius",setRadius) function setCSPOT(source,command,spot) if command == "setcurrentspot" then if not spot then return false end currentSpot = tonumber(spot) outputChatBox("You have set current spot to spot[" .. spot .. "]",source) playSoundFrontEnd(source,41) end end addCommandHandler("setcurrentspot",setCSPOT) function addZombieToSpot(source,command,spot,rot,skin,interior, dimension, level, maxhealth, boss) if command == "addzombie" then if not spot then return false end if not rot then rot = math.random (1,359) end if not skin then skin = 0 end if not interior then interior = 0 end if not dimension then dimension = 0 end if not level then level = 1 end if not maxhealth then maxhealth = 100 end if not boss then boss = false end currentSpot = tonumber(spot) local sx,sy,sz = getElementPosition(SPOT[currentSpot]) local sortZombies = RADIUS/1.2 local zom = exports.zombies:createZombie (sx+math.random(-sortZombies,sortZombies),sy+math.random(-sortZombies,sortZombies),sz+10,rot,skin,interior,dimension,level,maxhealth,boss) table.insert(ZOMBIESINSPOT,zom) setElementData(zom,"zombieSpot",SPOT[currentSpot]) outputChatBox("You have added '" .. getElementData(zom,"name") .. "' to spot[" .. spot .. "]",source) playSoundFrontEnd(source,41) end end addCommandHandler("addzombie",addZombieToSpot) -- ADD ZOMBIE GUI addEvent("addz",true) function addZgui(isboss,skin,interior,dimension,level,maxhp,name) if skin and interior and dimension and level and maxhp then rot = math.random (1,359) local sx,sy,sz = getElementPosition(SPOT[currentSpot]) local sortZombies = RADIUS/1.2 local zom = exports.zombies:createZombie (sx+math.random(-sortZombies,sortZombies),sy+math.random(-sortZombies,sortZombies),sz+10,rot,skin,interior,dimension,level,maxhp,isboss) table.insert(ZOMBIESINSPOT,zom) setElementData(zom,"zombieSpot",SPOT[currentSpot]) if name == "" then outputChatBox("You have added '" .. getElementData(zom,"name") .. "' to spot[" .. currentSpot .. "]",source) else outputChatBox("You have added '" .. name .. "' to spot[" .. currentSpot .. "]",source) setElementData(zom,"name",name) end end end addEventHandler( "addz", root, addZgui ) function destroySpot(source,command,spotToDestroy) if command == "destroyspot" then if currentSpot then if not spotToDestroy then spotToDestroy = currentSpot; currentSpotElem = SPOT[currentSpot] end local currentSpotElem = SPOT[tonumber(spotToDestroy)] if currentSpotElem and spotToDestroy then destroyElement(currentSpotElem) table.remove(SPOT,spotToDestroy) COUNT = COUNT - 1 outputChatBox("You have destroyed SPOT[" .. spotToDestroy .. "]",source) playSoundFrontEnd(source,41) else outputChatBox("SPOT[" .. spotToDestroy .. "] doesnt exist.",source) playSoundFrontEnd(source,41) end end end end addCommandHandler("destroyspot",destroySpot) function outputClick(mouseButton,buttonState,clickedElement,worldPosX,worldPosY,worldPosZ,screenPosX,screenPosY) if mouseButton == "right" and buttonState == "down" then local file = fileOpen("spots.lua",false) fileSetPos(file,fileGetSize(file)) COUNT = COUNT + 1 local written = fileWrite( file, '\n\r\nspot[' .. COUNT .. '] = createZombieSpot(' .. worldPosX .. ", " .. worldPosY .. ", " .. worldPosZ .. ", " .. RADIUS .. " )\r\n" ) if written then outputChatBox("You have created SPOT[" .. COUNT .. "]",source) playSoundFrontEnd(source,41) end --SPOT[COUNT] = createColSphere(worldPosX,worldPosY,worldPosZ,RADIUS) SPOT[COUNT],radius = exports.zombies:createZombieSpot(worldPosX,worldPosY,worldPosZ,RADIUS) setElementData(SPOT[COUNT],"radius",radius) --setElementData(SPOT[COUNT],"count",COUNT) currentSpot = COUNT fileFlush(file) end end addEventHandler("onPlayerClick",getRootElement(),outputClick) function markSpot() local spot = SPOT local currentspot = currentSpot local zombiesinspot = ZOMBIESINSPOT triggerClientEvent("markSpotC",root,spot,currentspot,zombiesinspot) end setTimer(markSpot,50,0) --DESTROYS CREATED ZOMBIES BY SPOT MANAGER function Zomb_delete (ped) if isElement(ped) then if (getElementData (ped, "zombie") == true) then for theKey,thePed in ipairs(ZOMBIESINSPOT) do if ped == thePed then table.remove( ZOMBIESINSPOT, theKey ) break end end destroyElement ( ped ) end end end addEventHandler ( "onResourceStop", getResourceRootElement(getThisResource()), function ( ) for k,zombie in ipairs(ZOMBIESINSPOT) do --table.remove( ZOMBIESINSPOT, k ) Zomb_delete(zombie) end end )