-
Posts
667 -
Joined
-
Last visited
-
Days Won
4
Everything posted by Mr.Loki
-
Idk if this is a troll or not but this is a bad way of moving the player. Also the source in your code is nil @Pirulax your code didn't work because you defined a function name for an anon function.
-
addCommandHandler("gotobeach", function(plr) setElementPosition(plr, 343.20026, -1780.60388, 5.22299) end )
-
Not every "zombie" script is the same.
-
It's server side.
-
You cant encode the file while the resource is running. Make a copy of the dff Encode the dff Add it to the main resource Then when u start the script you need to: Read the dff Decode Then load it
-
You will need to edit the votemanager to check if the player is logged in before showing the voting menu.
-
@Galactix This is definitely not what he's looking for. @Cyber14 This isn't available in mta at this moment. Your only option is to use shaders.
-
Race is a default gamemode on MTASA just enter the server and run the command /start race Your server should not be a race server. For maps you can check the community because there are tons of race maps on there.
-
This is how i save and load: --save function getPlayerWeapons( p ) local weps={} for i=1,12 do weps[i]={getPedWeapon( p, i ),getPedTotalAmmo( p, i )} end return toJSON(weps) end --load local weaponTable = fromJSON(d.weapons) for i=1,12 do local row = weaponTable[i] if tonumber(row[2]) > 0 then giveWeapon( plr, row[1], row[2] ) end end
-
For it to work you need to increase the progress argument from 0-1 over time like this local x, y, z = 134.52067565918, -69.88720703125, 2.4778761863708 local marker = createMarker (x, y, z) local start = getTickCount( ) local length = 3000 -- 3 seconds addEventHandler ("onClientRender", root, function() local progress = (getTickCount( )-start)/length local x, y, z = interpolateBetween (x, y, z, x, y, z + 3, progress, "Linear") setElementPosition (marker, x, y, z) end)
-
Do you want to marker to keep moving forever?
-
Use moveObject instead and do not use it in render.
-
@s2sk function optional( value, value2, value3 ) iprint(value,(value2 or 20),(value2 or 30)) end optional(9) -- Print: 9, 20, 30 optional(9,9) -- Print: 9, 9, 30 optional(9,false,9) -- Print: 9, 20, 9
-
addEventHandler("onPlayerChat", root, function(msg, msgType) if msgType == 0 then local r,g,b = getPlayerNametagColor( source ) local name = getPlayerName( source ):gsub("#%x%x%x%x%x%x","") -- remove cc from name local msg = msg:gsub("#%x%x%x%x%x%x","") outputChatBox(name.."#FFFFFF: "..msg,r,g,b,true) end end )
-
That event captures every thing that happens in the discord server it is connected to. By monitoring the packed and payload parameters you can see what gets sent to the event. You can monitor it by using the iprint function.
-
@JamesB You will need to modify the onDiscordPacket event at line 75 in the discord-events resource.
-
All the functions you will need to do this: FileRead TeaEncode FileCreate FileWrite FileClose Try creating something and if it does not work post ya code here and we'll help.
-
@Equis Yes it can work on a local server. Pretty much the same steps. I mentioned VPS because i know some people have their server based on slots and not a VPS.
-
In the first killPlaya func use the isPedDead function to check if the player is dead so it wont trigger again and you will want to only use 19 in the explosiveWeaponIDS because 50 is damage of helicopter blades and 51 is exlposive damage so if a vehicle sxploded near u it would destroy your hydra. If it does not work post what you did and we'll look at it.