-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Maybe the TXD/DFF is wrong, have you tried replacing it with another mod?
-
The resource is outdated badly, I didn't get free time to update it yet ( if I ever do ).
-
https://wiki.multitheftauto.com/wiki/Ser ... our_server
-
I can, but I won't, because that wouldn't be helpful, you should learn the basics.
-
That's all wrong, read the basics and then start with something else.
-
addCommandHandler ( "blip", function ( thePlayer ) for index, element in ipairs ( getAttachedElements ( thePlayer ) ) do if ( getElementType ( element ) == "blip" ) then setElementVisibleTo ( element, root, ( not isElementVisibleTo ( element ) ) ) end end end ) Not sure if that'll work though.
-
dxDrawRectangle dxDrawText
-
Stolen: https://community.multitheftauto.com/ind ... ls&id=5428 DONE
-
Nice job , keep up the good work
-
Do all these files exist?
-
addCommandHandler ( "blip", function ( thePlayer ) for index, element in ipairs ( getAttachedElements ( thePlayer ) ) do if ( getElementType ( element ) == "blip" ) then destroyElement ( element ) end end end )
-
Because if you put it at the top, the function won't exist yet, other way would be using onResourceStart event. local objects = { { model = 1210, x = -1318, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 }, { model = 1210, x = -1322, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 }, { model = 1210, x = -1330, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 } } addEventHandler ( "onResourceStart", resourceRoot, function ( ) createRandomLocation ( ) end ) function giveCash ( player ) givePlayerMoney ( player, 20000 ) destroyElement ( mymarker ) destroyElement ( myobject ) createRandomLocation ( ) end function createRandomLocation ( ) local object = objects [ math.random ( #objects ) ] myobject = createObject ( object.model, object.x, object.y, object.z, object.rot3, object.rot2, object.rot ) local x, y, z = getElementPosition ( myobject ) mymarker = createMarker ( x, y, z, "cylinder", 4, 200, 0, 0, 255 ) addEventHandler ( "onMarkerHit", mymarker, giveCash ) end
-
local locationsTable = { { 0, 0, 1 }, { 0, 0, 2 }, { 0, 0, 3 }, { 0, 0, 4 }, { 0, 0, 5 }, { 0, 0, 6 }, { 0, 0, 7 }, { 0, 0, 8 }, { 0, 0, 9 }, { 0, 0, 10 }, { 0, 0, 11 }, { 0, 0, 12 }, { 0, 0, 13 }, { 0, 0, 14 }, { 0, 0, 15 }, { 0, 0, 16 }, { 0, 0, 17 }, { 0, 0, 18 }, { 0, 0, 19 }, { 0, 0, 20 } } function getRandomLocations ( ) local found = { } for i = 1, 10 do table.insert ( found, locationsTable [ math.random ( #locationsTable ) ] ) end return found end for index, loc in ipairs ( getRandomLocations ( ) ) do local x, y, z = unpack ( loc ) -- Your pickup creating code here. end
-
local objects = { { model = 1210, x = -1318, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 }, { model = 1210, x = -1322, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 }, { model = 1210, x = -1330, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 } } function giveCash ( player ) givePlayerMoney ( player, 20000 ) destroyElement ( mymarker ) destroyElement ( myobject ) createRandomLocation ( ) end function createRandomLocation ( ) local object = objects [ math.random ( #objects ) ] myobject = createObject ( object.model, object.x, object.y, object.z, object.rot3, object.rot2, object.rot ) local x, y, z = getElementPosition ( myobject ) mymarker = createMarker ( x, y, z, "cylinder", 4, 200, 0, 0, 255 ) addEventHandler ( "onMarkerHit", mymarker, giveCash ) end createRandomLocation ( )
-
local objects = { { model = 1210, x = -1318, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 }, { model = 1210, x = -1322, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 }, { model = 1210, x = -1330, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 } } local object = objects [ math.random ( #objects ) ] myobject = createObject ( object.model, object.x, object.y, object.z, object.rot3, object.rot2, object.rot ) local x,y,z = getElementPosition ( myobject ) mymarker = createMarker ( x, y, z, "cylinder", 4, 200, 0, 0, 255 ) Did you mean that?
-
function hudChanger ( ) showPlayerHudComponent ( source, "all", false ) end addEventHandler ( "onPlayerJoin", getRootElement(), hudChanger ) That should hide all the default HUD when you join the game.
-
Increase the marker size.
-
Topic moved to: "Resources" section.
-
local positions = { { -643.82635498047, 1945.7033691406, 2 }, { -1980, 4991, 39 } } function (attacker, gun) if getTeamName(getPlayerTeam(attacker)) == "Police" then -- if attacker was a cop if gun == 23 or gun == 3 then -- if it was a tazer or stick setElementPosition(source, unpack ( positions [ math.random ( #positions ) ] ) ) end end end )