-
Posts
684 -
Joined
-
Last visited
Everything posted by EstrategiaGTA
-
And how do you expect us to know about your Jobs system? How do you mess with policemen? With team? ElementData? There is not such function, instead he should use this (if his job system works with teams): if getTeamName(getPlayerTeam(thePlayer)) == "Police" then
-
Type /start admin You might have the admin resource bugged, because I think I saw you had two admin resources in one of your screenshots.
-
The resource won't work if the called resource is not running.
-
You have got some resources with the same name, so they will not work.
-
no.. there's a server that is using them and they are working 100% They could have fixed them. Anyways, you should give debugscript and console error logs.
-
ERROR - Quit Masivo (10-20 users)
EstrategiaGTA replied to Narutimmy's topic in Ayuda relacionada al cliente/servidor
¿Te pasa cuando cargas cualquier archivo? -
Then the resources you are talking about might have several bugs.
-
function sacar ( thePlayer ) arma = getPedWeapon (thePlayer) if arma == 24 then takeWeapon(thePlayer, arma) end end addEventHandler("onColShapeHit", g_base_cols, sacar)
-
Use the Lua forum tags for your codes, it wll help us a lot. function assignSkin(source) skin, skinID = nil, nil if getElementData(source, "jailed") then -- by Apo local race = getElementData(source, "race") if getElementData(source, "gender") == 1 then if race == 0 then -- Black Female skin = bFemale skinID = bFemaleID elseif race == 1 then -- White Female skin = wFemale skinID = wFemaleID else skin = aFemale skinID = aFemaleID end else if race == 0 then -- Black Male skin = bMale skinID = bMaleID elseif race == 1 then -- White Male skin = wMale skinID = wMaleID else skin = aMale skinID = aMaleID end end else local items = exports['item-system']:getItems( source ) -- [] [1] = itemID [2] = itemValue for itemSlot, itemCheck in ipairs(items) do if itemCheck[1] == 16 then local skinData = split(tostring(itemCheck[2]), ':') skin = tonumber(skinData[1]) skinID = tonumber(skinData[2]) end end end -- by Apo if skin then setElementModel(source, skin) setElementData(source, "clothing:id", skinID or nil) mysql:query_free( "UPDATE characters SET skin = '" .. exports.mysql:escape_string(skin) .. "', clothingid = '" .. exports.mysql:escape_string(skinID or 0) .. "' WHERE id = '" .. exports.mysql:escape_string(getElementData( source, "dbid" )).."'" ) end end About the 3rd line problem, it is clear the problem is 'source'. I guess source is not defined at all in the event you are using, even though you didn't even give us the event(s) you are using.
-
This is not true. I think he wants to do it like this: Everyone, except the Moderation Team, VIPs and whatever can use this script. If you just check if the user is within the "Everyone" group, it will work for Admins, too. However, I would use: hasObjectPermissionTo --in order to forbid any user who can kick or ban to use the script. isObjectInACLGroup --in order to forbid VIPs and such groups, too.
-
En el código que me tomé la molestia de realizar yo, incluí un condicional en onColShapeHit. Eso sí, lo pensé para que le establezca un arma que sea correcta, no para que le quites el arma ya del tirón, creía que eso era si insistían una vez dentro del colShape Bueno, ya comenté que es lo más sencillo lo que yo hice, no caí en la cuenta de isElementWithinColShape y utilicé ElementData, que básicamente sirve para casi todo
-
Gracias me sirvio lo de "onPlayerWeaponSwitch" ahora lo que no puedo hacer es que automaticamente al tener esa arma se la saque por que esto solo me funciona cuando la cambia, pero en mi caso si se givea la arma y no la cambia, la puede usar tranquilamente... Trate de usar esto pero no me funciono igual creo que lo estoy usando mal arma = getPedWeapon ( source) if not arma == 34 then takeAllWeapons(source) Prueba con el código que posteé arriba, creo que hace todo lo que quieres. EDIT: respecto a lo de que si se givea el arma no funciona, eso ya lo esperaba, pero no sé qué se puede hacer al respecto... Hay varias formas pero no sabría decir cuál es la más eficiente. Podríamos usar: setTimer + if getElementData (thePlayer, "detectar_colshape") == "dentro" then if (getPedWeapon(thePlayer) == IDprohibido1) or (getPedWeapon(thePlayer) == IDprohibido2) then setPedWeaponSlot (thePlayer, ID permitido) takeWeapon (thePlayer, IDprohibido1) takeWeapon (thePlayer, IDprohibido2) ó "onPlayerWeaponFire" + lo mismo Ambos métodos no son muy eficientes...
-
Voy a suponer que la ColShape será un rectángulo. createColRectangle setPedWeaponSlot takeWeapon "onColShapeHit" "onColShapeLeave" "onPlayerWeaponSwitch" Ahora, para que cuando cambie de arma el script reconozca si el jugador está dentro o fuera de la ColShape, se pueden usar muchos métodos, pero lo más sencillo sería: local laColShape = createColRectangle (...) local IDprohibido1 = [NÚMERO] local IDprohibido2 = [NÚMERO] function EntrarColShape ( thePlayer ) --todo lo que quieras que haga... setElementData (thePlayer, "detectar_colshape", "dentro") if (getPedWeapon (thePlayer) == IDprohibido1) or (getPedWeapon (thePlayer) == IDprohibido2) then setPedWeaponSlot (thePlayer, [SLOT PERMITIDO]) end end addEventHandler("onColShapeHit", laColShape, EntrarColShape) function SalirColShape ( thePlayer ) --todo lo que quieras que haga... setElementData (thePlayer, "detectar_colshape", "fuera") end addEventHandler("onColShapeLeave", laColShape, SalirColShape) function CambioDeArma ( previousWeaponID, currentWeaponID ) if getElementData (thePlayer, "detectar_colshape") == "dentro" then if (currentWeaponID == IDprohibido1) or (currentWeaponID == IDprohibido2) then setPedWeaponSlot (thePlayer, [SLOT DEL ARMA QUE QUIERES]) takeWeapon (thePlayer, IDprohibido1) takeWeapon (thePlayer, IDprohibido2) end end addEventHandler("onPlayerWeaponSwitch", getRootElement ( ), CambioDeArma) Debería ser algo así.
-
No problem
-
No sé, quizás me puedas responder tú. Aunque acabo de ver que onPlayerDamage no acepta cancelEvent ().
-
INCREÍBLE. Una obra maestra.
-
[REL] Lunix OS Phone [Messenger, Notes, Music]
EstrategiaGTA replied to AriosJentu's topic in Resources
Awesome job. Keep it up, it is amazing! -
A mí personalmente no me gusta. Se nota que te has esforzado en ello, y que a otra gente le gusta, así que puedes estar orgulloso de tu trabajo.
-
¿Esto no restaría la health del ataque con melee más el daño que tú das? ¿Quizás deberías usar cancelEvent? cancelEvent ( ) No estoy seguro, agradecería que me arreglaran esta duda... Depende de si getElementHealth obtiene la salud en el mismo evento, o justo con la salud de la katana perdida...
-
Use this: guiGetVisible guiSetVisible
-
Where is elementWeaponBack defined?
-
Anything in debugscript 3?
-
Es más limpio; si tus scripts son para un largo plazo, vas a agradecer en el futuro que estén las líneas bien organizadas.
-
Sería mucho más limpio utilizar esto: function destruirveh ( ) if prose1[source] then destroyElement (prose1[source]) prose1[source] = nil end end addEventHandler ("onPlayerQuit", root, destruirveh)
-
Jamás me ha gustado freeroam, así que no tengo mucha idea. Pero diría que tienes que editar el client-side de Freeroam. Encuentra el evento y la función que hacen que cuando hagas clic en un punto del mapa, te spawnee allí. Encuentra la función setElementPosition , y en sus argumentos x, y, z haz los cambios necesarios para tus necesidades.