
BinSlayer1
Members-
Posts
491 -
Joined
-
Last visited
Everything posted by BinSlayer1
-
str = '1,2,3,4' table = split(str, string.byte(',')) table contains your every character separated by comma in that string. example: table[1] = '1' And if you want to convert from string to number use the function tonumber(str)
-
why? all he needs to do is set the ped look at when the mouse moves around.. If you want a smooth movement use onClientPreRender actually, onClientCursorMove will provide the smoothness. No need for render events
-
that won't work. it'll just return some debug error like "event already added" or something like that @#DaMiAnO: No problem
-
why? all he needs to do is set the ped look at when the mouse moves around..
-
Well then do it? You've been pointed into the right direction. setPedLookAt(localPlayer, x, y, z) and x,y,z can be gathered using onClientCursorMove's last 3 parameters https://wiki.multitheftauto.com/wiki/SetPedLookAt https://wiki.multitheftauto.com/wiki/OnClientCursorMove Script -> Clientside
-
function noRadio() setRadioChannel(0) addEventHandler('onClientPlayerRadioSwitch', getRootElement(), function() cancelEvent() end ) end You have to call the noRadio function like noRadio() or a timer or whatever
-
it doesnt work like that Evil-Cod3r function Me ( thePlayer, command ) setElementData ( thePlayer, "Dinheiro" , getElementData(thePlayer, "Dinheiro")+1500 ) end addCommandHandler ( "give", Me )
-
Code's too messy. Please rephrase what you want the script to do EXACTLY
-
I didn't think it was something worth calculated/recalculated every single frame.. You will most of the time not change your speed that much between 2 frames so I doubt there will be any significant changes
-
--FUNCTION FROM WIKI: [url=https://wiki.multitheftauto.com/wiki/GetElementSpeed]https://wiki.multitheftauto.com/wiki/GetElementSpeed[/url] function getElementSpeed(element,unit) if (unit == nil) then unit = 0 end if (isElement(element)) then local x,y,z = getElementVelocity(element) if (unit=="mph" or unit==1 or unit =='1') then return (x^2 + y^2 + z^2) ^ 0.5 * 100 else return (x^2 + y^2 + z^2) ^ 0.5 * 1.61 * 100 end else outputDebugString("Not an element. Can't get speed") return false end end ---------------------- --YOUR SCRIPT sound = playSound ( "music.mp3", true ) setSoundVolume ( sound, 1 ) ------------- setTimer(function() local speed = getElementSpeed(getLocalPlayer(), 'mph') speed = math.floor(speed) local soundSpeed if speed < 20 then soundSpeed = 1 else soundSpeed = speed*0.05 end setSoundSpeed(sound, soundSpeed) end, 200, 0 ) Test this. It's a start for you and you can easily edit it now
-
https://wiki.multitheftauto.com/wiki/SetSoundSpeed https://wiki.multitheftauto.com/wiki/GetElementSpeed You'll need to get your own formula so that sound speed changes based on the element speed
-
Novo has already been helped. Your post is irrelevant.. I guess it's a +1 for your total count..
-
executeSQLCreateTable("achievements", "user TEXT, ach1 TEXT, ach2 TEXT, ach3 TEXT, ach4 TEXT, ach5 TEXT, ach6 TEXT, ach7 TEXT, ach8 TEXT, ach9 TEXT, ach10 TEXT") What do you mean by default value? You can't have default values because you have no rows
-
lol wtf this script looks like one of those example scripts from the wiki because it is VERY basic, so basic that you look like a fool if you're trying to get "copyright" for it .. lol unless you've really created something new and original I don't think you should argue about ownership. this script makes use of basic MTA Functions like outputChatBox and getPlayerMoney, there's nothing in it that you actually 'own' @ Evil-Cod3r To the topic starter: Is this script your full script ? Because nothing actually calls the buyJackPack event.. If it's not the full script then you should tell us what's not working or the debug errors EDIT: top sniper, you won't get anybody to give you full scripts like that. You need to start learning LUA as this is not a place to request stuff.
-
well you need to be running some resource that will do the job for you Here's what I got in 10 seconds of searching the MTA Community: https://community.multitheftauto.com/index.php?p= ... ls&id=2484 If you want more jobs, you'll need to search deeper and if you can't find it you'll need to learn LUA and maybe this link will give you a start: https://wiki.multitheftauto.com/wiki/Scr ... troduction
-
There's no way you can move the MTA Default Chatbox, however scripting tools allow you to disable it completely and rewrite it, giving you the chance to do whatever you want with it like moving it or even coloring it. It is however a very hard task to accomplish so unless you're a good scripter you should drop the idea really
-
[TUT] Protect your client-sided code with fileDelete
BinSlayer1 replied to NeXTreme's topic in Tutorials
What for? It's already scriptable. It was posted somewhere already. The server sends a string of code to execute and the client uses loadstring to run it. I'm sure you'll find it if you search for it. -
Isn't it possible with modules?
-
I don't usually help people via PM. You should keep your scripting-related questions to this topic as this is the purpose of this subforum
-
What's wrong with setCameraViewMode() with some colshapes for triggering ? Bumper camera does EXACTLY what is in the video
-
You will 99% not be given anything ready from scratch as people don't work for free (usually) . You've been given ideas as to how to do this and we'll only help when you got some coding already going and it's failing. Good luck
-
Well that's what random means.. you don't know the name of the map When the current race ends, it will calculate the random map (based on stuff like least played or most played) and it will start it So you can't know which one is the next one because the server only knows this right when the current map ends (If I'm not mistaken) However, you can recreate a random nextmap "setter" from scratch that will simply calculate it sooner and this will do what you need, but it will require a lot of work
-
function stopGrenadeDamage ( attacker, weapon, bodypart ) if ( weapon == 0 ) and ( attacker == getLocalPlayer() ) then --CHANGE THIS TO THE ID OF GRENADE LAUNCHER w/e cancelEvent() --cancel the event end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopGrenadeDamage )
-
What do you mean? If a string matches certain ascii code (string is a number) or what?
-
Issue with dxDrawImage postGUI and guiCreateStaticImage
BinSlayer1 replied to dragonofdark's topic in Scripting
well then try to create the image with dxDrawImage as well? So instead of using both GUI and DX, only use DX And the needle DX should be right after the image DX