
InDev
Members-
Posts
106 -
Joined
-
Last visited
Everything posted by InDev
-
MTA:SA 1.1 Released: Harder, Better, Stronger, Faster
InDev replied to darkdreamingdan's topic in News
Good Job to all the MTA:SA team ! Keep up the awesome work ! PS: YEAH WOOT NYAN'S 5 HOURS MOVIE NOW ON CINEMA !!! -
Hi all, I'm having a problem with the function getSoundLength in my script, it always return 100 for whatever sound I use and i can't get over this problem in my script, I'm under the last nightly MTA1.1 and I didn't have this problem before Here's the part of script that I use function play3DMusic(sonname, x, y, z, volume, attachedTo) local sound = playSound3D("sounds/"..sonname, x, y, z) setSoundVolume(sound, volume) if( attachedTo )then attachSound( sound, attachedTo ) end outputChatBox( "playing" ) end addEventHandler("play3DMusic", getLocalPlayer(), play3DMusic) function attachSound( sound, element ) if( sound and element )then outputChatBox( getSoundLength(sound) ) sTimer = setTimer( setSoundPos, 50, getSoundLength(sound)/50, sound, element ) outputChatBox( "attached" ) end end function setSoundPos( sound, element ) if( sound and element )then local x, y, z = getElementPosition( element ) setElementPosition( sound, x, y, z ) outputChatBox( "updated" ) else outputChatBox( "fail" ) end end I really need this function to know how many times the update timer must executes himself...
-
I use the same method as Ransom since months ago but I just read all files and split the finished text each trigger limit characters, probably a bit longer than Ransom's method, put it in a table and send to the client then make all in one and loadstring() but the problem is with the 'onClientResourceStart' event...
-
When you'll go on servers it will downloads the needed files if not exists on your computer, so it must work
-
You need to script it: for example creating a resource... You can learn scripting basics here https://wiki.multitheftauto.com/wiki/Scr ... troduction
-
No problem .
-
Well, when you have this code you can do something like this with your table: bikes = { "522" , "481" , "581" , "462" , "521" , "463" , "523" , "461" , "448" , "468" , "586" , "471" , "509" , "510" } function isABike( modelID ) for k,i in ipairs( bikes )do -- go through the table if( tonumber( modelID ) == tonumber( i ) )then -- if the modelID is equal to the table value return true end end return false end function addHelmetOnEnter ( thePlayer, seat, jacked ) if ( isABike( getElementModel ( source ) ) ) then -- if its a bike addPedClothes ( thePlayer, "moto", "moto", 16 ) -- add the helmet end end addEventHandler ( "onVehicleEnter", getRootElement(), addHelmetOnEnter ) function removeHelmetOnExit ( thePlayer, seat, jacked ) if ( isABike( getElementModel ( source ) ) ) then -- if its a bike removePedClothes ( thePlayer, 16 ) -- remove the helmet end end addEventHandler ( "onVehicleExit", getRootElement(), removeHelmetOnExit )
-
Use this function to put the friendly fire: setTeamFriendlyFire ( team theTeam , bool friendlyFire )
-
It seems that your code is incorrect you put: invalidSkin = But you put in your check function: if ( tonumber( skinID ) == tonumber( i ) ) then return true end I think you want to put: if ( tonumber( skinID ) == tonumber( i ) ) then return false end
-
Hi, I think your problem is here: if attachedElements and #attachedElements > 0 and playerTeam then Is it possible that players, at the map starting, have no blip or no team ? try to output a message if the test return false addEvent("onMapStarting", true) function MapStarted() for id, player in ipairs(getElementsByType("player")) do playerTeam = getPlayerTeam" class="kw2">getPlayerTeam(player) local attachedElements = getAttachedElements(player) if attachedElements and #attachedElements > 0 and playerTeam then outputChatBox( "Player "..getPlayerName( player ).." have attached elements and team ! " ) for k,v in ipairs(attachedElements) do if getElementType(v) == "blip" then local r,g,b = getTeamColor(playerTeam) setBlipColor(v, r, g, b, 255) setBlipSize ( v, 4 ) -- THIS IS ONLY FOR TEST! end end else outputChatBox( "Player "..getPlayerName( player ).." have no attached elements or no team ! " ) end end end addEventHandler("onMapStarting", getRootElement(), MapStarted)
-
Not at the moment because there is no script to do this and no informations about the samp .rec files structure =)
-
No problem but, be careful next time ^^
-
You posted it three minutes just before me: when I've started to see what's wrong and write my response your post wasn't here. And it's explain what is exactly wrong with this kind of problem... Don't be so annoying Oo. I'm trying to help people, I'm spending time for the others and you try to say what with this kind of unpleasant posts ? I can't believe you take 30 secs just to tell me that which is not necessary...
-
But we can help you script this kind of thing You can use the LUA function: string.find( s, pattern ) Where 's' is the player name and 'pattern' is the character or string you want to find in the name
-
Replace your fixVehicle function by fixVehicleCommand or something like this be cause you put the same name of the existing mta function . You can't create a function with the same name of an other.
-
Making a good and full RP script like this take a lots of time... It's not because the lua scripting langage is easier than the PAWN one that it's shorter to make a script. Me and Citizen are on a RP script since November 2009 and it's not finished ( we want a perfect script ) So if you take only one scripter he is gonna be fed up I think, even for money... The best way to have what you want is starting learning LUA in MTA so you can modify the script easier because you'll understand your sheets...
-
Or, https://wiki.multitheftauto.com/wiki/Scr ... troduction
-
Salut, Je me présente vite fait: Bah comme la dis Citizen je code le serveur avec lui et je suis son frère ça fait un moment qu'on est dessus etc... N'hésitez pas à poster dans la section fr de mta, ça fait toujours plaisir de voir des gens censés de mta qui parle français =) Donc comme il l'a dit si jamais ya besoin d'aide contactez par mp ou autre. A bientôt sur le meilleur mode qui ait existé pour ce jeu mythique. Yeah ! +1
-
Really Nice ! What's the name of the song ?
-
That's not a port problem ? Like is it a download if the port is not open the download won't start i think.
-
Ho, really. Long time I haven't been playing GTA alone . I think you're not gonna go back on desktop in an interior now until there is a solution. Personally I always get out of interiors when i want to come back desktops, but sometimes, I forget.
-
Hi, I have a problem with MTA, when I launch there is the normal MTA's splash screen but after northing's happen, when i look a the gta_sa.exe process in the task manager, Isee that GTA is freeze, I tried all the solutions without any results, the normal GTA works fine and SAMP too ! So if everyone can help it would be great. The last time I launch MTA successfully was yesterday and there was nothing wrong. EDIT: resolved.