-
Posts
2,753 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Captain Cody
-
Need someone with 3ds max
-
The model is currently exported from 3ds max with vehicle parts checked, thus you cannot use it as a regular object.
-
Fight fire with fire.
-
.... It has to be exported from 3ds max / zmodeler with these
-
Export the bumper objects and what not without vehicle body part tag.
-
Nothing really can be done about it
-
Oh sorry, swap all the weapon tables out with a capital W.
-
Untested, but fixed a few things -- Now finds closest hospital, other one just choose the last hospital -- Saves and loads skin -- Saves and loads weapons function getPedWeapons(ped) local playerWeapons = {} if ped and isElement(ped) and getElementType(ped) == "ped" or getElementType(ped) == "player" then for i=2,9 do local wep = getPedWeapon(ped,i) local ammo = getPedTotalAmmo (ped,i) if wep and wep ~= 0 then table.insert(playerWeapons,{wep,ammo}) end end else return false end return playerWeapons end Weapons = {} Skins = {} hospitalsTable = { { 1177.7994384766, -1323.0667724609, 14.088536262512 }, { -2656.2421875, 635.99420166016, 14.453125 }, { 1607.1225585938, 1817.8732910156, 10.8203125 }, } function findNearestHostpital(thePlayer) local nearest = nil local mini = 999999 for key,val in pairs(hospitalsTable) do local xx,yy,zz=getElementPosition(thePlayer) local x1=val[1] local y1=val[2] local z1=val[3] local dist = getDistanceBetweenPoints2D(xx,yy,x1,y1) if dist then if dist < mini then mini = dist nearest = val end end end return nearest[1],nearest[2],nearest[3] end function spawn(player) xx,yy,zz = findNearestHostpital(player) spawnPlayer( player, xx,yy,zz) fadeCamera(player,true,3.0) setElementModel(player,Skins[player] or 0) for i,v in pairs(weapons[player]) do giveWeapon ( player, v[1], v[2] ) end weapons[player] = nil Skins[player] = nil end addEventHandler("onPlayerWasted", root, function() weapons[source] = getPedWeapons(source) Skins[source] = getElementModel(source) fadeCamera(source,false,6.0,0,0,0) setTimer(spawn, 8000, 1, source) end )
-
Questionable how it saved your guns and skin because spawnPlayer( player, xx,yy,zz) resets your skin to 0, and removes all your weapons.
-
Save skin and guns in a table when he dies, give him the skins and guns in said table when he respawns.
-
MultiTheftAuto and Multi Theft Auto are the 2 same games?
Captain Cody replied to kleinmarquez's topic in MTA Chat
Nope MTASA R1.0 are not the right ports for these ones 22003, 22005 and 22126 are the right ones -
Replace for i,v in ipairs(Water) do local water = createWater (v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12]) local x,y,z = getElementPosition(water) setElementPosition(water,x,y,z) end With WaterB = {} ObjectB = {} Blip = {} for i,v in pairs(Water) do local WaterA = createWater (v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12] ) local x,y,z = getElementPosition(WaterA) setElementPosition(WaterA,x,y,z+700) local theObject = createObject ( 3003,x,y,z+700) WaterB[theObject] = WaterA ObjectB[theObject] = i end function fixWater() local v = Water[ObjectB[source]] local water = createWater (v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12]) local x,y,z = getElementPosition(water) setElementPosition(water,x,y,z+700) destroyElement(WaterB[source]) WaterB[source] = water end function fixWater2() local Water = WaterB[source] local x,y,z = getElementPosition(Water) setElementPosition(Water,x,y,z) end addEventHandler( "onClientElementStreamIn",resourceRoot,fixWater2)
-
Add this to the end WaterB = {} ObjectB = {} Blip = {} for i,v in pairs(Water) do local WaterA = createWater (v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12] ) local x,y,z = getElementPosition(WaterA) setElementPosition(WaterA,x,y,z) local theObject = createObject ( 3003,x,y,z) WaterB[theObject] = WaterA ObjectB[theObject] = i end function fixWater() local v = Water[ObjectB[source]] local water = createWater (v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12]) local x,y,z = getElementPosition(water) setElementPosition(water,x,y,z) destroyElement(WaterB[source]) WaterB[source] = water end function fixWater2() local Water = WaterB[source] local x,y,z = getElementPosition(Water) setElementPosition(Water,x,y,z) end addEventHandler( "onClientElementStreamIn",resourceRoot,fixWater2)
-
Try running the water script server side.
-
I really don't know what you're trying to say, to be honest.
-
Tails this is a water script for a VC map, creating a single water plane will flood multiple bits of the map.
-
I told you before Replace setElementPosition(water,x,y,z) with setElementPosition(water,x,y,z+700)
-
It odes not have a virus... Their security Certificate expired
-
..... Change - exports.global:giveMoney(source, money) to givePlayerMoney(source, money) Unless you're running some sort of fancy money system (You'd need to post that code)
-
Ah alright makes sense.
-
I've seen a few times NPCs just going in circles, you should add some sort of system that kills the NPCs current path if it's found that it's just looping around.
-
It'd actually be possible to script this very easily.
-
Well soon as you figure out that non sense hit me up aye.
-
Could we get an example of how to achieve something such as the lighting image projection? I haven't one clue about FX. I can kind of see what you're talking about, but at the same time I haven't a single clue.
