Jump to content

DRW

Members
  • Posts

    364
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by DRW

  1. DRW

    dxDrawImage3D

    Really nobody can help me?
  2. DRW

    dxDrawImage3D

    Hello, I have a problem, I want to make a big dximage that always looks at the player, and I tried this local white = tocolor(255,255,255,255) function dxDrawImage3D(x,y,z,w,h,m,c,r,...) local lx, ly, lz = x+w, y+h, (z+tonumber(r or 0)) or z return dxDrawMaterialLine3D(x,y,z, lx, ly, lz, m, h, c or white, ...) end local pnet = dxCreateTexture("planet.png") addEventHandler("onClientRender", root, function() dxDrawImage3D(0,0, 20, 20, 800, pnet, tocolor(255,255,255,255)) end ) Actually it works... If you look at the right side. If you look at the image from another position it looks like this. I've seen some images like that working perfectly, without distortions and always looking at the player, so, how can I make it like that?
  3. Hello, I'd like to know what I'll have to use to make a script which attaches weapons to a vehicle like this script does: https://community.multitheftauto.com/ind ... ls&id=5711 As you see, doing this is actually possible, but this one is compiled and I need to make an editable one. Thanks!
  4. Still not working, tried almost everything and had to stay with the original save-system, people in my server is getting angry because their weapons won't save sometimes.
  5. ZNEXT: ZOMBIE RPG ¡Donde tú también cuentas! 92.222.150.56:22013 o busca ZNEXT:RPG en el buscador. ¡Muy buenas a todos! Me presento, soy MadnessReloaded (Aunque en MTA me conocen como Madness) y soy el máximo creador de ZNEXT: Zombie RPG junto a mi amigo Paramore, y como veréis, estoy dando un poco de publicidad a nuestro servidor, ya que nunca está de más eso de que su actividad suba un poquito. Os voy a mostrar una pequeña parte de una creación de lo más ambiciosa que he hecho en mi vida, un server de "Zombie Gamemode" en el que no solo pretendí crear una base, meter zombies, un sistema de coches de Community y cuatro mapeos, sino que quise crear una gran plataforma, con scripts y avances que se notan día a día, dando oportunidad a los miembros de que propongan ideas, y de que haya gente de un rango superior que les escuche. Tened en cuenta que por ahora estamos en fase BETA, por lo que siguen habiendo bugs (ya que estamos integrando un sistema RPG y varios otros scripts creados por una sola persona con unos conocimientos bastante mediocres, es decir, yo), así que, por favor, no seáis muy crueles . LOGROS ZNEXT: Zombie RPG ha conseguido logros que para ser un server nuevo, han sido bastante grandes. Nos pareció increíble que a la semana y media de la apertura del server llegaramos a 25 personas de 38, con calificaciones bastante altas por parte de los miembros, incluso ha habido gente que decía que éste era el mejor server de zombies que han jugado (No es por tirar flores, pero estoy siendo sincero). En 3 meses hay gente que ha llegado a tener más de 350 horas jugadas. Hemos avanzado mucho, desde pasar al típico server de zombies con el spawnmanager modificado, una base medio mapeada, simples tiendas de armas y vehiculos, a un server con edificios y casas mapeadas, una base en cada ciudad con sus propios spawns, vehículos de diferentes tipos y modificados, 7 clases elegibles, mejoras de armas, resistencia y vida, niveles personalizados y extensos, misiones, clanes y zonas de guerra para éstos, un boss brutal y realmente mortífero, integración a nuestra comunidad y a su foro (znextservers.foroac.com), canales IC, incluso una guía para iniciarte en el mundo del RP, sistemas automáticos de tag, tiendas de compra de regeneración de vida, recompensa doble por zombie asesinado, entre otros, un gran número de casas, y mucho más. STAFF Éste server se rige por el respeto cuando hablamos de Staff. Nosotros, al contrario que algunos servers que he visto, no invitamos a gente al Staff que no veamos lo suficientemente apropiada para poder tener éste título, y aún creyendo que lo es, se tendrá que pasar por un período de prueba de días o incluso semanas para evaluar si realmente es lo que creemos, al rango correspondiente de este período se le llama Community Manager, y creedme, no es fácil. Una vez habiendo pasado a mod, tendrás la oportunidad de MODERAR, es decir, acceso a mute, kick, slap, warp y otras cosas, en las cuales no se incluyen opciones como spawnear vehículos, dar armas, setear dinero, etc., así la experiencia de juego es equitativa y no hay Staff que se pueda dar cualquier ventaja in-game que provocase un desequilibrio entre el Staff y el miembro normal. CUALIDADES Ya lo sabes, éste server es de habla hispana, pero, ¿vamos a dejar a la gente angloparlante de brazos cruzados? La respuesta es no. Nuestro server tiene un sistema de idiomas patentado, en el cual, al primer login de una nueva cuenta, pedirá una preferencia entre inglés o español, si eliges "español", tendrás gran parte de los paneles en éste idioma, si eliges "english", podrás ver los paneles esenciales traducidos al inglés, y el Staff en general también sabe hablar inglés, por lo que no habrán problemas. Además, si necesitas soporte de parte nuestra, no hay problema, el grupo de creadores está activo todos los días, eso significa que siempre estaremos abiertos a sugerencias, quejas, soluciones de problemas y arreglo de bugs. Si ésto no funciona, aún puedes entrar a ZNEXTServers.foroac.com, donde puedes presentar quejas, solicitudes para Staff y clanes, donativos, discusiones, saludos, posts, spam, etc., siempre podrás estar conectado con ZNEXT. CONTENIDO > Misiones (Varias han sido borradas y están en mantenimiento por bug abuse) > Clanes > Guerras > Skins de armas, zombies, vehículos, etc. > Boss sacado de la saga Serious Sam (El Bio-Mechanoid). > 3 bases predeterminadas con 3 spawns diferentes, elige tu ciudad favorita. > 7 clases predeterminadas, algunas de ellas desbloqueables o privadas. > Mejoras de stats (Puedes conseguir prácticamente cualquier arma dual, incluyendo hasta la minigun) > Mejoras de habilidades (Puedes conseguir regeneración de vida, recompensa doble, stats mejoradas al 100, regeneración de armadura, una clase adicional, etc.) > Indicadores de ataque y vida, HUD renovado. > Vehículos restringidos a clase. > Eventos ideados por los creadores. > Mapeado personalizado. > Gran variedad de casas. > Canales de RolePlay junto a una guía para iniciarte debidamente si eres nuevo. > Tags por clan oficial. > Aún habiendo donativos y puestos VIP para donantes, cada mes hacemos un sorteo de un puesto de donante gratis. > Niveles actualizados para que nunca pares de matar zombies. > Sistema de vehículos. > Sistema de puntos especiales para mejorar tu personaje. > Sistema de skins. > Control de SQL e información de cuentas para resolver pérdidas de datos. > Estabilidad media (Muy pocas veces se cae, pero ocurre, en esos casos, entre 5 minutos y 3 horas volverá a abrirse). > Animaciones para darle más realismo a la escena RP. > Máscaras cómicas para quitarle un poco de seriedad al asunto. > Más contenido por descubrir en el server... CAPTURAS Ignora la falta de radar y chat, sí que los hay, pero los quité porque pensaba que iban a quedar mal, me equivoqué. BOSS CIUDAD MAPEADA DE LV BASE MAPEADA DE LV BASE MAPEADA DE LS SELECCIÓN DE BASE COMPRA Y VISTA PREVIA DE STATS SKINS DE ZOMBIES EJEMPLOS DE PANELES MENCIONADOS OTRAS ¡No olvides! Entra en 92.222.150.56:22013 o busca ZNEXT:RPG en el buscador.
  6. As i told you there is many things wrong . timesToExecute must be 1 not 0. But I want it to repeat it every 10000ms or 30000, not only one time
  7. It expects ped at getPedAmmo, getPedStats and getPedWeapon What's wrong?
  8. It says it expects an element on getPlayerAccount, so it doesn't detect the source as a the player, what can I do? addEventHandler ("onPlayerLogin",root, function() setTimer(function() if not (isGuestAccount (getPlayerAccount (source))) then local account = getPlayerAccount (source) if (account) then setAccountData (account, "zmgm.money", tostring (getPlayerMoney (source))) setAccountData (account, "zmgm.skin", tostring (getPedSkin (source))) setAccountData (account, "zmgm.health", tostring (getElementHealth (source))) setAccountData (account, "zmgm.armor", tostring (getPedArmor (source))) setAccountData (account, "zmgm.weaponID0", getPedWeapon (source, 0)) setAccountData (account, "zmgm.weaponID1", getPedWeapon (source, 1)) setAccountData (account, "zmgm.weaponID2", getPedWeapon (source, 2)) setAccountData (account, "zmgm.weaponID3", getPedWeapon (source, 3)) setAccountData (account, "zmgm.weaponID4", getPedWeapon (source, 4)) setAccountData (account, "zmgm.weaponID5", getPedWeapon (source, 5)) setAccountData (account, "zmgm.weaponID6", getPedWeapon (source, 6)) setAccountData (account, "zmgm.weaponID7", getPedWeapon (source, 7)) setAccountData (account, "zmgm.weaponID8", getPedWeapon (source, -- s8) -->) setAccountData (account, "zmgm.weaponID9", getPedWeapon (source, 9)) setAccountData (account, "zmgm.weaponID10", getPedWeapon (source, 10)) setAccountData (account, "zmgm.weaponID11", getPedWeapon (source, 11)) setAccountData (account, "zmgm.weaponID12", getPedWeapon (source, 12)) setAccountData (account, "zmgm.weaponAmmo0", getPedTotalAmmo (source, 0)) setAccountData (account, "zmgm.weaponAmmo1", getPedTotalAmmo (source, 1)) setAccountData (account, "zmgm.weaponAmmo2", getPedTotalAmmo (source, 2)) setAccountData (account, "zmgm.weaponAmmo3", getPedTotalAmmo (source, 3)) setAccountData (account, "zmgm.weaponAmmo4", getPedTotalAmmo (source, 4)) setAccountData (account, "zmgm.weaponAmmo5", getPedTotalAmmo (source, 5)) setAccountData (account, "zmgm.weaponAmmo6", getPedTotalAmmo (source, 6)) setAccountData (account, "zmgm.weaponAmmo7", getPedTotalAmmo (source, 7)) setAccountData (account, "zmgm.weaponAmmo8", getPedTotalAmmo (source,8)) setAccountData (account, "zmgm.weaponAmmo9", getPedTotalAmmo (source, 9)) setAccountData (account, "zmgm.weaponAmmo10", getPedTotalAmmo (source, 10)) setAccountData (account, "zmgm.weaponAmmo11", getPedTotalAmmo (source, 11)) setAccountData (account, "zmgm.weaponAmmo12", getPedTotalAmmo (source, 12)) setAccountData (account, "zmgm.skill0", getPedStat ( source, 69 )) setAccountData (account, "zmgm.skill1", getPedStat ( source, 70 )) setAccountData (account, "zmgm.skill2", getPedStat ( source, 71 )) setAccountData (account, "zmgm.skill3", getPedStat ( source, 72 )) setAccountData (account, "zmgm.skill4", getPedStat ( source, 73 )) setAccountData (account, "zmgm.skill5", getPedStat ( source, 74 )) setAccountData (account, "zmgm.skill6", getPedStat ( source, 75 )) setAccountData (account, "zmgm.skill7", getPedStat ( source, 76 )) setAccountData (account, "zmgm.skill8", getPedStat ( source, 77 )) setAccountData (account, "zmgm.skill9", getPedStat ( source, 78 )) setAccountData (account, "zmgm.skill10", getPedStat ( source, 79 )) end end end,10000,0) end)
  9. I didn't realize there was that exact example in the wiki, but now there is another problem: ERROR: Attempt to call global 'callClientFunction' (a nil value) Serverside part calling that client function posted before. addEventHandler("onPlayerJoin", getRootElement(), function() fadeCamera(source, true) --triggerClientEvent("onJoinPlayTrack",source) --callClientFunction(source,"onJoinPlayTrack") sX = math.random(-3000,3000) -- start X sY = math.random(-3000,3000) -- start Y sZ = math.random(50,100) -- start Z rX = math.random(90,270) -- Rotation X rY = math.random(90,270) -- Rotation Y rZ = 0 -- Rotation Z tX = math.random(-3000,3000) -- Target X tY = math.random(-3000,3000) -- Target Y tZ = sZ -- Target Z callClientFunction(source,"smoothMoveCamera",sX,sY,sZ,rX,rY,rZ,tX,tY,tZ,rX,rY,rZ,100000) end)
  10. Hello, I'm using a camera movement script that I extracted from a login panel, here is the part of the client, the problem is: WARNING: Bad argument @ 'getElementPosition' [Expected element at argument 1, got nil] WARNING: Bad argument @ 'getElementPosition' [Expected element at argument 1, got nil] WARNING: Bad argument @ 'setCameraMatrix' [Expected vector3 at argument 1, got boolean] local sm = {} sm.moov = 1 sm.object1,sm.object2 = nil,nil local function removeCamHandler() if(sm.moov == 1)then sm.moov = 0 end end local function camRender() if (sm.moov == 1) then x1,y1,z1 = getElementPosition(sm.object1) --The warning talks about this. x2,y2,z2 = getElementPosition(sm.object2) --The warning talks about this. setCameraMatrix(x1,y1,z1,x2,y2,z2) --The warning talks about this. end end addEventHandler("onClientPreRender",root,camRender) function smoothMoveCamera(x1,y1,z1,x1t,y1t,z1t,x2,y2,z2,x2t,y2t,z2t,time) if(sm.moov == 1)then return false end sm.object1 = createObject(1337,x1,y1,z1) sm.object2 = createObject(1337,x1t,y1t,z1t) setElementAlpha(sm.object1,0) setElementAlpha(sm.object2,0) setObjectScale(sm.object1,0.01) setObjectScale(sm.object2,0.01) moveObject(sm.object1,time,x2,y2,z2,0,0,0,"InOutQuad") moveObject(sm.object2,time,x2t,y2t,z2t,0,0,0,"InOutQuad") sm.moov = 1 setTimer(removeCamHandler,time,1) setTimer(destroyElement,time,1,sm.object1) setTimer(destroyElement,time,1,sm.object2) return true end
  11. Hello, community. Today I'm having a huge problem with my server, people loses its weapon data saved in their account, sometimes even the money, everything is managed by a save system I downloaded long time ago. I think that's problem of my server, but I have no idea, seems like the accounts lose some of the data or the save system is broken, which is strange because it worked a lot of time ago and I haven't edited it since then. For now, some of the members I caught online with this bug say that it happened when their game crashed, but crashes happened a lot of times and nobody lost their data. Any help or advice? NOTE: It only happens with weapons and money loss is very unusual, but for example zombie kills, levels, playtime and other account data elements get saved and retrieved perfectly no matter what happens, but those values are dynamic, I mean, they change every minute or every time the player kills a zombie, should I make the save system attached to a timer that makes it save account money and weapons every 5-10 minutes or something? --[[ Save system by Zyky Edited a little bit to fit our needs Deleted x,y,z, nametag, interior, dimension, renamed things, and more that i dont know anymore. Thanks Zyky. ]]-- addEventHandler("onPlayerWasted",root, function () setElementData(source,"tempSkin",getElementModel(source)) end) addEventHandler("onPlayerSpawn",root, function () local skin = tonumber(getElementData(source,"tempSkin")) if (skin) then setElementModel(source, skin) end removeElementData(source,"tempSkin") end) function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "zmgm.money") if (accountData) then local playerMoney = getAccountData (theCurrentAccount, "zmgm.money") local playerSkin = getAccountData (theCurrentAccount, "zmgm.skin") local playerHealth = getAccountData (theCurrentAccount, "zmgm.health") local playerArmor = getAccountData (theCurrentAccount, "zmgm.armor") local playerWeaponID0 = getAccountData (theCurrentAccount, "zmgm.weaponID0") local playerWeaponID1 = getAccountData (theCurrentAccount, "zmgm.weaponID1") local playerWeaponID2 = getAccountData (theCurrentAccount, "zmgm.weaponID2") local playerWeaponID3 = getAccountData (theCurrentAccount, "zmgm.weaponID3") local playerWeaponID4 = getAccountData (theCurrentAccount, "zmgm.weaponID4") local playerWeaponID5 = getAccountData (theCurrentAccount, "zmgm.weaponID5") local playerWeaponID6 = getAccountData (theCurrentAccount, "zmgm.weaponID6") local playerWeaponID7 = getAccountData (theCurrentAccount, "zmgm.weaponID7") local playerWeaponID8 = getAccountData (theCurrentAccount, "zmgm.weaponID8") local playerWeaponID9 = getAccountData (theCurrentAccount, "zmgm.weaponID9") local playerWeaponID10 = getAccountData (theCurrentAccount, "zmgm.weaponID10") local playerWeaponID11 = getAccountData (theCurrentAccount, "zmgm.weaponID11") local playerWeaponID12 = getAccountData (theCurrentAccount, "zmgm.weaponID12") local playerWeaponAmmo0 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo0") local playerWeaponAmmo1 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo1") local playerWeaponAmmo2 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo2") local playerWeaponAmmo3 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo3") local playerWeaponAmmo4 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo4") local playerWeaponAmmo5 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo5") local playerWeaponAmmo6 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo6") local playerWeaponAmmo7 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo7") local playerWeaponAmmo8 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo8") local playerWeaponAmmo9 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo9") local playerWeaponAmmo10 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo10") local playerWeaponAmmo11 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo11") local playerWeaponAmmo12 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo12") local skill0 = getAccountData(theCurrentAccount, "zmgm.skill0") local skill1 = getAccountData(theCurrentAccount, "zmgm.skill1") local skill2 = getAccountData(theCurrentAccount, "zmgm.skill2") local skill3 = getAccountData(theCurrentAccount, "zmgm.skill3") local skill4 = getAccountData(theCurrentAccount, "zmgm.skill4") local skill5 = getAccountData(theCurrentAccount, "zmgm.skill5") local skill6 = getAccountData(theCurrentAccount, "zmgm.skill6") local skill7 = getAccountData(theCurrentAccount, "zmgm.skill7") local skill8 = getAccountData(theCurrentAccount, "zmgm.skill8") local skill9 = getAccountData(theCurrentAccount, "zmgm.skill9") local skill10 = getAccountData(theCurrentAccount, "zmgm.skill10") local zombieKills = getAccountData(theCurrentAccount,"zombies.kills") setElementData(source,"Zombie kills",zombieKills) triggerClientEvent(source,"expOnChange",getRootElement(),zombieKills,0) setPlayerMoney (source, playerMoney) setTimer (setElementHealth, 500, 1, source, playerHealth) setTimer (setPedArmor, 500, 1, source, playerArmor) setTimer (setElementModel, 500, 1, source, playerSkin) giveWeapon(source, playerWeaponID0, playerWeaponAmmo0, true) giveWeapon(source, playerWeaponID1, playerWeaponAmmo1, false) giveWeapon(source, playerWeaponID2, playerWeaponAmmo2, false) giveWeapon(source, playerWeaponID3, playerWeaponAmmo3, false) giveWeapon(source, playerWeaponID4, playerWeaponAmmo4, false) giveWeapon(source, playerWeaponID5, playerWeaponAmmo5, false) giveWeapon(source, playerWeaponID6, playerWeaponAmmo6, false) giveWeapon(source, playerWeaponID7, playerWeaponAmmo7, false) giveWeapon(source, playerWeaponID8, playerWeaponAmmo8, false) giveWeapon(source, playerWeaponID9, playerWeaponAmmo9, false) giveWeapon(source, playerWeaponID10, playerWeaponAmmo10, false) giveWeapon(source, playerWeaponID11, playerWeaponAmmo11, false) giveWeapon(source, playerWeaponID12, playerWeaponAmmo12, false) setPedStat ( source, 69, skill0 ) setPedStat ( source, 70, skill1 ) setPedStat ( source, 71, skill2 ) setPedStat ( source, 72, skill3 ) setPedStat ( source, 73, skill4 ) setPedStat ( source, 74, skill5 ) setPedStat ( source, 75, skill6 ) setPedStat ( source, 76, skill7 ) setPedStat ( source, 77, skill8 ) setPedStat ( source, 78, skill9 ) setPedStat ( source, 79, skill10 ) else triggerClientEvent(source,"expOnChange",getRootElement(),0,0) giveWeapon(source, 22, 200, true) end end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then local account = getPlayerAccount (source) if (account) then setAccountData (account, "zmgm.money", tostring (getPlayerMoney (source))) setAccountData (account, "zmgm.skin", tostring (getPedSkin (source))) setAccountData (account, "zmgm.health", tostring (getElementHealth (source))) setAccountData (account, "zmgm.armor", tostring (getPedArmor (source))) setAccountData (account, "zmgm.weaponID0", getPedWeapon (source, 0)) setAccountData (account, "zmgm.weaponID1", getPedWeapon (source, 1)) setAccountData (account, "zmgm.weaponID2", getPedWeapon (source, 2)) setAccountData (account, "zmgm.weaponID3", getPedWeapon (source, 3)) setAccountData (account, "zmgm.weaponID4", getPedWeapon (source, 4)) setAccountData (account, "zmgm.weaponID5", getPedWeapon (source, 5)) setAccountData (account, "zmgm.weaponID6", getPedWeapon (source, 6)) setAccountData (account, "zmgm.weaponID7", getPedWeapon (source, 7)) setAccountData (account, "zmgm.weaponID8", getPedWeapon (source, -- s8) -->) setAccountData (account, "zmgm.weaponID9", getPedWeapon (source, 9)) setAccountData (account, "zmgm.weaponID10", getPedWeapon (source, 10)) setAccountData (account, "zmgm.weaponID11", getPedWeapon (source, 11)) setAccountData (account, "zmgm.weaponID12", getPedWeapon (source, 12)) setAccountData (account, "zmgm.weaponAmmo0", getPedTotalAmmo (source, 0)) setAccountData (account, "zmgm.weaponAmmo1", getPedTotalAmmo (source, 1)) setAccountData (account, "zmgm.weaponAmmo2", getPedTotalAmmo (source, 2)) setAccountData (account, "zmgm.weaponAmmo3", getPedTotalAmmo (source, 3)) setAccountData (account, "zmgm.weaponAmmo4", getPedTotalAmmo (source, 4)) setAccountData (account, "zmgm.weaponAmmo5", getPedTotalAmmo (source, 5)) setAccountData (account, "zmgm.weaponAmmo6", getPedTotalAmmo (source, 6)) setAccountData (account, "zmgm.weaponAmmo7", getPedTotalAmmo (source, 7)) setAccountData (account, "zmgm.weaponAmmo8", getPedTotalAmmo (source, -- s8) -->) setAccountData (account, "zmgm.weaponAmmo9", getPedTotalAmmo (source, 9)) setAccountData (account, "zmgm.weaponAmmo10", getPedTotalAmmo (source, 10)) setAccountData (account, "zmgm.weaponAmmo11", getPedTotalAmmo (source, 11)) setAccountData (account, "zmgm.weaponAmmo12", getPedTotalAmmo (source, 12)) setAccountData (account, "zmgm.skill0", getPedStat ( source, 69 )) setAccountData (account, "zmgm.skill1", getPedStat ( source, 70 )) setAccountData (account, "zmgm.skill2", getPedStat ( source, 71 )) setAccountData (account, "zmgm.skill3", getPedStat ( source, 72 )) setAccountData (account, "zmgm.skill4", getPedStat ( source, 73 )) setAccountData (account, "zmgm.skill5", getPedStat ( source, 74 )) setAccountData (account, "zmgm.skill6", getPedStat ( source, 75 )) setAccountData (account, "zmgm.skill7", getPedStat ( source, 76 )) setAccountData (account, "zmgm.skill8", getPedStat ( source, 77 )) setAccountData (account, "zmgm.skill9", getPedStat ( source, 78 )) setAccountData (account, "zmgm.skill10", getPedStat ( source, 79 )) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit)
  12. DRW

    Windows 10 lag

    Hello, I've been a MTA SA user since 2009, and I've never had framerate problems, not even when I had a PC from 1999. I've tested this awesome modification at Windows XP, Windows 7, Windows 8 and Windows 10 Technical Preview, it always worked at 30-60FPS depending on the server. But today I've upgraded to the Windows 10 Pro Insider Preview build 10130 and since that update, playing MTA is a nightmare. I have a server, and I've been always playing in at 25-50fps, now I can't even play it because it's awful to play it at 2FPS. I've tested every single game I have installed in my PC, all those games have the same FPS they had before the new Windows 10 update, even the original GTA SA works like a charm. What can I do? Is this happening to anyone else or is it my problem?
  13. Hello, I'm using a script made by Falke, it creates a bot in a zone and this one tries to kill you. The problem is that I don't want the bot to attack peds that have the "zombie" element data with the value "true". How can I do that? Server --[[ ########################################################################## ## ## ## Project: 'Boomer of L4D 2' - resource for MTA: San Andreas ## ## ## ########################################################################## [C] Copyright 2013-2014, Falke ]] createTeam ( "Zombies", 0, 0, 0 ) local Zteam = getTeamFromName ( "Zombies" ) function Boss () blip = {} local localPed = exports [ "slothBot" ]:spawnBot (2908.3369140625, -1937.263671875, 1.6241011619568, 90, math.random ( 300, 303 ), 0, 0, Zteam, 0, "hunting", true ) local health = exports.extra_health:setElementExtraHealth ( localPed, 5000 ) setElementModel ( localPed, 38 ) setElementData(localPed, "type", "RealBoomer") setPedStat(localPed, 24, 1000) RealBoomer = localPed blip[1] = (createBlipAttachedTo ( localPed, 0 )) triggerClientEvent ( "sound2", root ) end addEventHandler("onResourceStart", resourceRoot, Boss) addEvent("onWitchReady", true) addEventHandler("onPedWasted", getRootElement(), function(ammo, killer) if isElement(RealBoomer) then if source == RealBoomer then local x, y, z = getElementPosition(RealBoomer) destroyElement(blip[1]) createExplosion ( x, y, z, 1 ) triggerClientEvent ( "estallido", root ) local oldZcount = getAccountData(killer,"zombies.kills") local attacker2 = getPlayerAccount(killer) if oldZcount ~= false then setAccountData ( attacker2, "zombies.kills", oldZcount+30 ) setElementData( killer, "Zombie kills", oldZcount+30 ) setTimer(Boss, 30000, 1) end end end end ) Client --[[ ########################################################################## ## ## ## Project: 'Boomer of L4D 2' - resource for MTA: San Andreas ## ## ## ########################################################################## [C] Copyright 2013-2014, Falke ]] function replaceModel() txd = engineLoadTXD("skin/boomer.txd", 38) engineImportTXD(txd, 38) dff = engineLoadDFF("skin/boomer.dff", 38 ) engineReplaceModel(dff, 38) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadskin", replaceModel ) addEvent ( "estallido", true ) addEventHandler ( "estallido", root, function ( ) playSound ( "boom.mp3" ) end ) addEvent ( "sound1", true ) addEventHandler ( "sound1", root, function ( ) local sound1 = playSound ( "sonido1.mp3" ) end ) addEvent ( "sound2", true ) addEventHandler ( "sound2", root, function ( ) local sound2 = playSound ( "sonido2.mp3" ) end )
  14. DRW

    Antidamage greenzone

    i already tested it and it's working fine. Sure it's making attackers to not deal damage to players? Because people in my server keep DMing in those zones
  15. DRW

    Antidamage greenzone

    Still not working D:
  16. Now it works with armor, but look [2015-06-07 06:53:47] WARNING: zps\script.lua:15: Bad argument @ 'getElementHealth' [Expected element at argument 1, got nil] [2015-06-07 06:53:47] ERROR: zps\script.lua:15: attempt to perform arithmetic on a boolean value
  17. addEventHandler ("onPlayerLogin", root, function(prev,cur) if isObjectInACLGroup ("user."..getAccountName(cur), aclGetGroup ( "Reg1" ) ) then setTimer (function(player) setElementHealth (player, getElementHealth (player)+2) end, 2000, 0,source) end end) addEventHandler ("onPlayerLogin", root, function(prev,cur) if isObjectInACLGroup ("user."..getAccountName(cur), aclGetGroup ( "Reg2" ) ) then setTimer (function(player) setPedArmor (player, getPedArmor (player)+2) end, 2000, 0,source) end end) Hello, I made this thing so people in an expected acl group could have health regen, the script works but it spams all the time this to the console: [2015-06-07 06:37:27] WARNING: zps\script.lua:15: Bad argument @ 'getElementHealth' [Expected element at argument 1] [2015-06-07 06:37:27] ERROR: zps\script.lua:15: attempt to perform arithmetic on a boolean value [2015-06-07 06:37:27] WARNING: zps\script.lua:24: Bad argument @ 'getPedArmor' [Expected ped at argument 1] [2015-06-07 06:37:27] ERROR: zps\script.lua:24: attempt to perform arithmetic on a boolean value What can I do?
  18. EDIT: Forget about this, it was a script problem, not a DXText one. Solved function drawText() local playerCoins = getPlayerCoin(getLocalPlayer()); local gPlayerCoins = string.format("%08d", playerCoins); dxDrawText("ZP: "..gPlayerCoins, x*795, y*698, x*973, 198, tocolor(0, 0, 0, 255), size, "pricedown", "left", "top", false, false, false, false, false); dxDrawText("ZP: "..gPlayerCoins, x*795, y*702, x*973, 198, tocolor(0, 0, 0, 255), size, "pricedown", "left", "top", false, false, false, false, false); dxDrawText("ZP: "..gPlayerCoins, x*800, y*700, x*973, 196, tocolor(0, 0, 0, 255), size, "pricedown", "left", "top", false, false, false, false, false); dxDrawText("ZP: "..gPlayerCoins, x*795, y*702, x*971, 198, tocolor(0, 0, 0, 255), size, "pricedown", "left", "top", false, false, false, false, false); dxDrawText("ZP: "..gPlayerCoins, x*800, y*698, x*971, 198, tocolor(0, 0, 0, 255), size, "pricedown", "left", "top", false, false, false, false, false); dxDrawText("ZP: "..gPlayerCoins, x*796, y*700, x*971, 196, tocolor(0, 0, 0, 255), size, "pricedown", "left", "top", false, false, false, false, false); dxDrawText("ZP: "..gPlayerCoins, x*797, y*700, x*972, 197, tocolor(0,252,151, 200), size, "pricedown", "left", "top", false, false, false, false, false); end addEventHandler("onClientRender", root, drawText) I want to fit this text to the bottom right corner, but I don't know how, how can I do that?
  19. Clientside markerzp = createMarker ( -509.60546875, 2629.099609375, 52.6140625, "cylinder", 1.0) local screenW, screenH = guiGetScreenSize() ventanazp = guiCreateWindow((screenW - 501) / 2, (screenH - 337) / 2, 501, 337, "Tienda de ZombiePoints [ZNEXT]", false) guiWindowSetSizable(ventanazp, false) guiWindowSetMovable (ventanazp, false) guiSetAlpha(ventanazp, 0.71) mejora1 = guiCreateButton(10, 89, 142, 35, "Chuck Norris\n(ZP:1595)", false, ventanazp) guiSetProperty(mejora1, "NormalTextColour", "FFAAAAAA") memo1 = guiCreateMemo(152, 89, 335, 35, "Todas las mejoras de \"stats\" serán desbloqueadas.", false, ventanazp) guiMemoSetReadOnly(memo1, true) memo2 = guiCreateMemo(9, 22, 478, 57, "Aquí podrás comprar todo tipo de mejoras con ZombiePoints, ten en cuenta que subir la cantidad de éstos te costará un tiempo, pero al fin y al cabo merecen la pena.\nPuedes conseguirlos a base de subir niveles empezando por el 13, no funcionará\npedírselo a los Admins.", false, ventanazp) guiMemoSetReadOnly(memo2, true) mejora2 = guiCreateButton(10, 124, 142, 35, "Regeneración\n(ZP:1095)", false, ventanazp) guiSetProperty(mejora2, "NormalTextColour", "FFAAAAAA") memo3 = guiCreateMemo(152, 124, 335, 35, "Tendrás regeneración de vida.", false, ventanazp) guiMemoSetReadOnly(memo3, true) mejora3 = guiCreateButton(10, 159, 142, 35, "Recompensa doble\n(ZP:995)", false, ventanazp) guiSetProperty (mejora3, "NormalTextColour", "FFAAAAAA") memo4 = guiCreateMemo(152, 159, 335, 35, "Ganarás el doble de dinero por zombie asesinado.", false, ventanazp) guiMemoSetReadOnly(memo4, true) mejora4 = guiCreateButton(10, 299, 477, 28, "Cerrar", false, ventanazp) guiSetProperty(mejora4, "NormalTextColour", "FFFF0000") mejora5 = guiCreateButton(10, 194, 142, 35, "Regeneración II\n(ZP:1295)", false, ventanazp) guiSetProperty(mejora5, "NormalTextColour", "FFAAAAAA") memo5 = guiCreateMemo(152, 194, 335, 35, "Tendrás regeneración de armadura.", false, ventanazp) guiMemoSetReadOnly(memo5, true) mejora6 = guiCreateButton(10, 229, 142, 35, "Clase - Especialista\n(ZP:1595)", false, ventanazp) guiSetProperty(mejora6, "NormalTextColour", "FFAAAAAA") memo6 = guiCreateMemo(152, 229, 335, 35, "Desbloquea la clase \"Especialista\". 500 balas de M4,\nUZI y Francotirador son ganadas si apareces con ésta clase,\nademás puedes vender armas, e incluso\natacar bases.", false, ventanazp) mejora7 = guiCreateButton(10, 264, 142, 35, "Transporte a base\n(ZP:895)", false, ventanazp) guiMemoSetReadOnly(memo6, true) guiSetProperty(mejora7, "NormalTextColour", "FFAAAAAA") memo7 = guiCreateMemo(152, 264, 335, 35, "Serás transportado a la base principal desde cualquier lugar si escribes el comando /base. Tardas 10 segundos en ir.", false, ventanazp) guiMemoSetReadOnly(memo7, true) addEventHandler ("onClientResourceStart", getResourceRootElement(), function() guiSetVisible (ventanazp, false) end) addEvent ("verzps", true) addEventHandler ("verzps", localPlayer,function() guiSetVisible (ventanazp, true) showCursor (true) end) addEventHandler ("onClientGUIClick", mejora1, function() coins = exports.coinsystem:getPlayerCoin (localPlayer) if (coins<1595) then outputChatBox ("¡NO TIENES SUFICIENTES ZPS!", 255,0,0) return elseif (coins>=1595) then triggerServerEvent ("mejora1q",localPlayer) outputChatBox ("¡Gracias por tu compra!", 100,255,100) end end) addEventHandler ("onClientGUIClick", mejora2, function() coins = exports.coinsystem:getPlayerCoin (localPlayer) if (coins<1095) then outputChatBox ("¡NO TIENES SUFICIENTES ZPS!", 255,0,0) return elseif (coins>=1095) then triggerServerEvent ("mejora2q",localPlayer) outputChatBox ("¡Gracias por tu compra!", 100,255,100) end end) addEventHandler ("onClientGUIClick", mejora3, function() coins = exports.coinsystem:getPlayerCoin (localPlayer) if (coins<995) then outputChatBox ("¡NO TIENES SUFICIENTES ZPS!", 255,0,0) return elseif (coins>=995) then triggerServerEvent ("mejora3q",localPlayer) outputChatBox ("¡Gracias por tu compra!", 100,255,100) end end) addEventHandler ("onClientGUIClick", mejora4, function() guiSetVisible (ventanazp, false) showCursor (false) end) addEventHandler ("onClientGUIClick", mejora5, function() coins = exports.coinsystem:getPlayerCoin (localPlayer) if (coins<1295) then outputChatBox ("¡NO TIENES SUFICIENTES ZPS!", 255,0,0) return elseif (coins>=1295) then triggerServerEvent ("mejora5q",localPlayer) outputChatBox ("¡Gracias por tu compra!", 100,255,100) end end) The problem is when I click the window only the script executes all the events bound to the GUI buttons. Why?
  20. addEventHandler ("onPlayerLogin", root, function() local account = getPlayerAccount (source) if not isGuestAccount(account) then local accName = getAccountName (account) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then setTimer (function () setElementHealth (source, getElementHealth (source)+10) end, 2000, 0) end end end) it says getElementHealth expected element at argument 1, got nil. What's happening?
  21. It's using gang_system by castillo, included in meta.xml
×
×
  • Create New...