
therenex
Members-
Posts
48 -
Joined
-
Last visited
Everything posted by therenex
-
Shit, I'll have to take a look to what's wrong with the code. I know this is a little bit offtopic, but, is the admin resource working? Last time I used a nightly, it didn't. I loaded ladmin into MTA, it also uses menus, and I think that could be the source of the problem.
-
Are menus supposed to work? If not, could you make some cheap implementation from menus to a simple GUI (idk, maybe buttons with the name of the options)? That would be really cool.
-
Thank you, Gamesnert. That was my mistake. I used getLocalPlayer. But now that I use getRootElement, the script just pushes peds, and doesn't pop them. This is the code that executes the push n' pop: function onStreamIn ( ) local tipo = getElementType ( source ) if tipo == "ped" then table.insert ( zombies, source ) outputConsole ( "STACK PUSH!" ) end end function onStreamOut ( ) local tipo = getElementType ( source ) if tipo == "ped" then table.remove ( zombies, source ) outputConsole ( "STACK POP!" ) end end addEventHandler( "onClientElementStreamIn", getRootElement(), onStreamIn ) addEventHandler( "onClientElementStreamOut", getRootElement(), onStreamOut ) Can't see anything wrong with it.
-
Yep, the first thing i did was to put some output, it doesn't get triggered. It worked once and what it made my player attack himself because I wasn't checking if streamed objects were peds or not, but after I started checking, never worked again.
-
Ok so I tried to do something like Ace told me, but with tables, by using Lua's table.insert & table.remove on an empty table, but they don't get in it. Hmm...
-
Thanks for the help. @Talidan: after getting all the peds I use that function, but getting all the peds is really what lags the client, they're over 5000. @Ace_Gambit: thanks for that, sounds like a great idea. However, I just have a minimal idea of what a stack is... could you give me an example, please?
-
Thanks. I tried using a timer, but it's kinda the same, it freezes two times per second lol. I'm searching for a more useful method of getting the peds around me. I currently use (all this is clientside) getElementsByType and then isElementStreamedIn. I tried to create a colcircle around the player's position, that gets updated (or created again) everytime my function is called, but the circle simply won't create. I don't know what to do. Please help me.
-
You don't understand the syntax posted in the wiki. Your line should be: setPedAnimation ( thePed, "ped", "WALK_drunk", 1, true, true, true) Try that, it should work. A tip: To stop the animation, just do setPedAnimation ( thePed )
-
HALLO =D I'm making a nice zombie peds script like a multiplayer survival horror. But I have some problems. I always have some problems. I spawn 5000 peds all over San Andreas. Then, to make them follow the nearest player, I use onClientRender, so every client checks if there are any near peds and make them follow the local player. To do this, I create a colshape (circle) around the player and get the ped elements in it, but it fucking lags. Any ideas on how to do this?
-
Two things: You don't ask for free custom scripts here. You don't speak like that. I had to read it all over again to understand what you said. So, yup, you better go to the wiki and start scripting it by yourself, it can't be that hard ;D
-
lol... i just used that title because makes people pay attention, i got my awnser in about ten minutes, that is what i wanted. Thank you all. I don't think MTA is fucked, i love it, i use it since the old releases in VC.
-
onClientPlayerDamage Event - when someone else is damaged
therenex replied to Phat Looser's topic in Scripting
You don't actually hit him, the guy gets hit by you. Contradictory, isn't it ? -
Of course I payed attention NOW. I made multiple windows and everything's fine.
-
humm... it has to be f*cked (or changed) in some way because not even the example in the wiki worked. Gonna try your code. EDIT: Whoa, it fucking works. I don't know, it used to work before the way I did it. Thanks. I kinda love you. I owe you one.
-
onClientPlayerDamage Event - when someone else is damaged
therenex replied to Phat Looser's topic in Scripting
but those are sync issues from MTA itself, you can't really do much about it. -
function crearVentanaSplash ( ) ventanaSplash = guiCreateWindow ( 0.25, 0.25, 0.5, 0.5, "MTA: No More Hope", true ) guiCreateLabel ( 0.07, 0.1, 0.9, 0.1, "Para continuar, inicia tu sesion o bien crea una cuenta nueva.", true, ventanaSplash ) botonLogin = guiCreateButton ( 0.25, 0.3, 0.5, 0.2, "iniciar sesion >>", true, ventanaSplash ) botonRegistro = guiCreateButton ( 0.25, 0.55, 0.5, 0.2, "registrarse >>", true, ventanaSplash ) guiSetVisible ( ventanaSplash, true ) guiSetInputEnabled ( true ) end addEvent ( "crearSplash", true ) addEventHandler ( "onClientResourceStart", getResourceRootElement ( getThisResource ( ) ), crearVentanaSplash ) function crearVentanaLogin ( ) ventanaLogin = guiCreateWindow ( 0.25, 0.25, 0.5, 0.5, "Iniciar Sesion", true ) guiCreateLabel ( 0.07, 0.1, 0.9, 0.1, "Bienvenido, usuario antiguo, Inicia sesion a continuacion.", true, ventanaLogin ) botonLoginx = guiCreateButton ( 0.25, 0.3, 0.5, 0.2, "iniciar sesion >>", true, ventanaLogin ) botonRegistrox = guiCreateButton ( 0.25, 0.55, 0.5, 0.2, "registrarse >>", true, ventanaLogin ) guiSetVisible ( ventanaLogin, true ) guiSetInputEnabled ( true ) end addEvent ( "crearLogin", true ) addEventHandler ( "crearLogin", getLocalPlayer(), crearVentanaLogin ) function pulsarBotonLogin ( boton, estado, absoluteX, absoluteY ) guiSetVisible ( ventanaSplash, false ) crearVentanaLogin ( ) end addEventHandler ( "onClientGUIClick", botonLogin, pulsarBotonLogin, false ) When i click 'botonLogin', it should show me another window, but it does not work. It says there's a f*cked up argument in line 34, but there's nothing wrong with it? May be the fact that GUI in 1.0 is f*cked? You decide, people!
-
On line 4, the 4th argument defines how many times the animation plays. Put 1 and the animation will play just 1 time. -1 is for infinite repetitions. I can't really understand what you say. I think that is what you want.
-
i think it's impossible if you don't have ftp access to the file. what you are able to download is just the html output made out of the php script. or.. i just don't get it. it's my english, i knew it. f*cking dumbass english of mine.
-
Nothing.. It's my own private server. LOL.
-
If you are having SERIAL Problems, Read this!!
therenex replied to fgwelder's topic in DM Client-side
The same guys you try to ban with your incredible serial system... they are going to delete their cookies, they are going to change their computer's name, and they are going to create brand new accounts at community.multitheftauto.com with brand new hotmail accounts. YOU CAN'T BAN SOMEONE PERMANENTLY IF YOU DONT HAVE HIS IP. You could ban an ip range, but instead of banning someone you'll ban a whole country. I waited for MTA:DM much more that what can you expect. I reloaded the fucking page every 5 minutes to see if "the best multiplayer mod for GTA:SA ever" was done and when it is released, what happens? Everything is fucked up. Not even the BAN function works, and when dp2 comes out, everything stills the same and even in some ways worse. Why? Because the fucking camera is fucked up (again another scripting shit), the crappy server browser gots owned and some scripts doesnt even work because the server fails executing the scripts. For the players is nice, obviously, they just register, download, install & play, like a lot of the MMORPGS out there, no problem. But now we got really, REALLY FUCKED UP because now not even the players are enjoying MTA because the programmers thinked in a amazing serial system that they dont even want to mantain. -
the problem was in the login function. when i check "status", if 0 i trigger a client event and i didnt fix that event.
-
this is very strange. im doing it just like you said, but still not working. damn it im going to get like the angry german kid i'd updated the code so you can see the changes i'd made thanks for all teh help (:
-
with a lot of poor people trying to make their game run faster, this guy needs to make it run slower. lol.
-
i did solve this but i dont remember how to what i want to mean is that is a script error - not an mta bug.
-
LOL. Im pretty sure that its easier to make websites than hosting MTA decent servers. I mean, if you have a good MTA server that diserves a webpage, you should know how to make it, huh? Knowking LUA but not HTML? I dont think so.