
haybail
Members-
Posts
145 -
Joined
-
Last visited
Everything posted by haybail
-
When you shoot at a player client side, is it possible to determine which body part you hit? Or does that only work onDamage? For use with OnClientPlayerWeaponFire.
-
But I want to extract the variable so I can do this: print( apple ) Another example would be like this, but this is sloppy: # local tab = { apple = 1, banana = 10 } function takeFruit ( ) for a,e in pairs ( tab ) if a = apple then apple = e elseif a = banana then banana = e end end end Maybe not sloppy but not how I would like to do it. If I could get the name of the variable I could do this: for a,e in pairs ( tab ) a = e -- ( apple = 1 ) end
-
oh thats not too bad. unless it was released on the 6th, then u would have lost two whole days!
-
Can you set a weapons delay in mta? I always thought you could, but I had a quick look for it under some of the functions and events relating to weapons and I couldn't find it. Do I have to make my own You know the one where you can set an ak to shoot like a deagle.
-
I think this was originally posted in General MTA Discussion. It may of been moved accidently. Or something is wrong with the forums.
-
Maybe its the name of the server or a setting thats causing it. You could try troubleshooting. Try changing the name to something simple like: one Try switching out all the settings for default ones Unload any addons. Try a brand new blank server, if you can And ask somebody who couldn't join before to try after each change. See if you can find what is wrong.
-
So it will print the string out to chatbox? Pretend its: # local tab = { apple = 1, banana = 10 } It will print apple, banana? I'm trying to extract the variable from the table and take it in its simplest form so for example: table = { for = true, fabalaba = 10 } Would be table[for] and table[fabalaba]. I'm trying to get it to be for and fabalaba with the same values by extracting it and making the new variables from the table. Can I do that with print? Maybe: print( k, type( k ) ) = v or tostring(v)
-
rockstar sure must be slow on their emails. that information was announced on the 6th, everywhere
-
Spam users in MTA forums
haybail replied to Ace_Gambit's topic in Site/Forum/Discord/Mantis/Wiki related
And: memberlist.php?mode=viewprofile&u=32486 -
How do you name a variable the name of another variable so to copy it down? On the script. Say I have one of these: crazies = { ["one"] = 500, ["two"] = 5000, ["three"] = 50000 } or this: crazies = [10] = 5, [4] = 2, [1] = .5 } or even this: local x,y,z, = getElementPosition ( theElement) crazies = { [x], [y], [z] } Not sure if you can do that but anyway. And I want to call the variable and write it down as its name in the crazies. How do I do that? for k,v in pairs(crazies) do ( the name of the variable in crazies ) = theValue end outputChatBox ( one ) outputChatBox ( 10 ) outputChatBox ( x ) I tried tostring().
-
Ohhh. thats the second time I done that now. all the forums are all the same, u can't tell in prs can't u just do !banip ? i think u can add it manually to the ban file or possible via remote admin. i know its possible in race but i never did it myself !banip 212 logfile > add the ip 212. ? remote admin > see if theres a button for it its been a while.
-
they both look really nice. like really professional. some of the nicest work I ever seen. good job ! post some screenies in case people don't look at the video. and, um, howcome u have two light poles in the middle of the road
-
and / or: timing = { } -- make the variable a table function toggleFlashingLights ( thePlayer ) -- thePlayer who initiated the command if timing[thePlayer] then killTimer ( timing[thePlayer] ) timing[thePlayer] = nil -- remove the old variable else timing[thePlayer] = setTimer ( toggleVehicleLights, 250, 500, thePlayer ) -- set a timer every 250ms for 500 times, in case the timer overruns, for thePlayer end end addCommandHandler ( "flash", toggleFlashingLights ) function onPlayerQuit ( reason ) if timing[source] then -- if the timer is active when a player quits killTimer ( timing[source] ) timing[source] = nil end end addEventHandler ( "onPlayerQuit", getRootElement(), onPlayerQuit ) bindKey ( source, "I", "down", "toggleFlashingLights" ) -- assuming its onJoin u make a variable for each individual ( timing[thePlayer] ) so if someone kills their timer, it won't kill it for everyone. u need timing = { } so u can use timing[whateverulikeinhereincludingtextbuttextneedstobeinquations] otherwise u can only use timing = 0 or it will error. You may also like to do it for the vehicle, so if a player hops out it will continue flashing: function toggleFlashingLights ( thePlayer ) if getPlayerOccupiedVehicleSeat ( thePlayer ) == 0 then if vehicles[getPlayerOccupiedVehicle ( thePlayer )] then killTimer ( vehicles[getPlayerOccupiedVehicle ( thePlayer )] ) vehicles[getPlayerOccupiedVehicle ( thePlayer )] = nil else vehicles[getPlayerOccupiedVehicle ( thePlayer )] = setTimer ( toggleVehicleLights, 250, 0, getPlayerOccupiedVehicle ( thePlayer ) ) end end end addCommandHandler ( "flash", toggleFlashingLights ) function toggleVehicleLights ( car ) if ( getVehicleOverrideLights ( car ) ~= 2 ) then setVehicleOverrideLights ( car, 2 ) else setVehicleOverrideLights ( car, 1 ) end end vehicles = { }
-
Poor Russia, if it is like that. Originally they make Russia sound like the enemy here too. But now they say Russia has agreed to hold off to its original positions because of the French president but only for a day because Georgia attacked them again? 2000 dead, 130,000 displaced? I didn't even hear about it for a while too, because of the Olympics I first heard it on steampowered forums, thought it was a joke. Someone said like 'Georgia attacked Russia'. Cause I didn't hear anything I was like yea right
-
is it because of the new version? did u change the files around. maybe it can't save cause the folder isn't there
-
might want to try here if no one answers: viewforum.php?f=30 I thought u were talking about lua
-
can u do it by script? onPlayerJoin if getClientIP >= 212. and <= 215. then mta.ban $1 $2
-
sure.
-
and an if to kill the timer if its already running, on i. but make it client side, so if the player quits and the timers still running... it won't be a problem.
-
but that would be useless, mta already bans by ip and both those information are changeable. but u already know that, hmm.