
MatXpl
Members-
Posts
180 -
Joined
-
Last visited
Everything posted by MatXpl
-
but for example i have map1 map2 map3 i open map 1 it takes the 'team1s' elements from map3 and map1 NOT from map2 in my opinion its somthing wrong with map 3 before i created it, everything works great @Edit meybe upload meta.xml from maps ? @EDIT 2 i restarted server and now everything works edf
-
its not userful and it need scripting and when i create new map in editor i must leater seting id's its wrong, but thanks
-
hi i have map in edf i load my spawnpoints <team1s id="team1s (1)" interior="0" skin="73" posX="143.60000610352" posY="1875.5" posZ="17.799999237061" rotX="0" rotY="0" rotZ="0"></team1s> and sometimes it loads a spawnpoint from another map but its not all! i have 3 maps and only it load from right map but somtimes form map3 (only 3) its freaky! (spawnpoints in map 3 is the same as in other maps) it is code of my geting spawnpoints to table: mercpoints = getElementsByType ( "team1s", mapRoot or getRootElement()) for k,v in pairs(mercpoints) do team1spawns[k] = {} team1spawns[k].posX = getElementData(v, "posX") team1spawns[k].posY = getElementData(v, "posY") team1spawns[k].posZ = getElementData(v, "posZ") team1spawns[k].skin = getElementData(v, "skin") team1spawns[k].rot = getElementData(v, "rot") or getElementData(v, "rotZ") or 0 end and loading it local randomt = math.random ( 1, table.getn ( team1spawns ) ) spawnPlayer ( source, team1spawns[randomt].posX, team1spawns[randomt].posY, team1spawns[randomt].posZ, team1spawns[randomt].rot, team1spawns[randomt].skin, mapinterior ) whats wrong? if you wanna see spawnpoints map code its here: MAP1: <team1s id="team1s (1)" interior="0" skin="73" posX="143.60000610352" posY="1875.5" posZ="17.799999237061" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (2)" interior="0" skin="73" posX="249.19999694824" posY="1840.9000244141" posZ="17.60000038147" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (3)" interior="0" skin="73" posX="143.10000610352" posY="1868.5999755859" posZ="17.799999237061" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (4)" interior="0" skin="73" posX="163.60000610352" posY="1859.9000244141" posZ="17.799999237061" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (5)" interior="0" skin="73" posX="154.39999389648" posY="1829.5999755859" posZ="17.60000038147" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (6)" interior="0" skin="73" posX="170" posY="1824.8000488281" posZ="17.60000038147" rotX="0" rotY="0" rotZ="0"></team1s> MAP2: <team1s id="team1s (1)" interior="0" skin="102" posX="1755.6999511719" posY="-1590.4000244141" posZ="13.5" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (2)" interior="0" skin="103" posX="1754.4000244141" posY="-1590.3000488281" posZ="13.5" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (3)" interior="0" skin="104" posX="1753.1999511719" posY="-1590.1999511719" posZ="13.5" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (4)" interior="0" skin="102" posX="1755.6999511719" posY="-1589.1999511719" posZ="13.39999961853" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (5)" interior="0" skin="103" posX="1754.5" posY="-1589.0999755859" posZ="13.39999961853" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (6)" interior="0" skin="104" posX="1753.3000488281" posY="-1588.9000244141" posZ="13.39999961853" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (7)" interior="0" skin="102" posX="1751.9000244141" posY="-1590.0999755859" posZ="13.5" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (8)" interior="0" skin="103" posX="1751.8000488281" posY="-1588.6999511719" posZ="13.39999961853" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (9)" interior="0" skin="104" posX="1750.5999755859" posY="-1589.8000488281" posZ="13.5" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (10)" interior="0" skin="104" posX="1750.6999511719" posY="-1588.5" posZ="13.39999961853" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (11)" interior="0" skin="103" posX="1755.5999755859" posY="-1588.1999511719" posZ="13.300000190735" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (12)" interior="0" skin="102" posX="1754.3000488281" posY="-1587.8000488281" posZ="13.300000190735" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (13)" interior="0" skin="104" posX="1752.5999755859" posY="-1587.6999511719" posZ="13.300000190735" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (14)" interior="0" skin="103" posX="1751.0999755859" posY="-1587.4000244141" posZ="13.300000190735" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (15)" interior="0" skin="104" posX="1755.3000488281" posY="-1587.4000244141" posZ="13.300000190735" rotX="0" rotY="0" rotZ="0"></team1s> MAP3 (wrong! sometimes gets spawnpoints from here when playing map1 or map2, but sometimes!): <team1s id="team1s (1)" interior="0" skin="114" posX="2224.6000976562" posY="-2123.3999023438" posZ="7.8000001907349" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (2)" interior="0" skin="115" posX="2225.6999511719" posY="-2123.1000976562" posZ="7.8000001907349" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (3)" interior="0" skin="116" posX="2226.6000976562" posY="-2122.6999511719" posZ="7.8000001907349" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (4)" interior="0" skin="114" posX="2225.1999511719" posY="-2124.5" posZ="7.8000001907349" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (5)" interior="0" skin="116" posX="2228.1000976562" posY="-2124.5" posZ="7.6999998092651" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (6)" interior="0" skin="115" posX="2226.8000488281" posY="-2124.5" posZ="7.6999998092651" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (7)" interior="0" skin="114" posX="2226.5" posY="-2125.8999023438" posZ="7.6999998092651" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (8)" interior="0" skin="115" posX="2227.5" posY="-2125.6999511719" posZ="7.6999998092651" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (9)" interior="0" skin="116" posX="2228.6000976562" posY="-2125.1999511719" posZ="7.6999998092651" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (10)" interior="0" skin="115" posX="2227.3000488281" posY="-2126.8000488281" posZ="7.6999998092651" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (11)" interior="0" skin="116" posX="2229.1999511719" posY="-2125.8999023438" posZ="7.5999999046326" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (12)" interior="0" skin="114" posX="2228.8000488281" posY="-2123.5" posZ="7.6999998092651" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (13)" interior="0" skin="116" posX="2229.6000976562" posY="-2124" posZ="7.6999998092651" rotX="0" rotY="0" rotZ="0"></team1s> <team1s id="team1s (14)" interior="0" skin="115" posX="2229.8000488281" posY="-2124.8999023438" posZ="7.5999999046326" rotX="0" rotY="0" rotZ="0"></team1s>
-
i found magic line in ctf resource local player = source -- its important. trust me. i added this, trigger to player not source, and.. ITS WORKING! magic
-
im using just gearup(source,"team1") Solidsnake14 I have this same problem! How to resolve it ?
-
its only in game when i enter game i spawn with weapons all working, but when i dead, i respawn and function gearplayer() giveme weapons but now it looks like client side only i can see my weapons and when i shoot someone he dosnt loss hp
-
its a weapon invisible, bullets too (ONLY FOR PLAYER1 AND AFTER RESPAWN P2), and when player2 (after respawn) wants to shoot he shooting but player1 see that player2 is punching and dont hurt him.
-
dead player (player2) respawn good, but his weapons is like client side
-
ohh thanks! it working topic can be closed look at me new problem please! viewtopic.php?f=91&t=51798
-
Hi i have problem with this code: Respawn: function kill( totalAmmo, killer, killerWeapon, bodypart ) if getPlayerTeam(source) == team1 then triggerEvent("team1spawn",source) elseif getPlayerTeam(source) == team2 then triggerEvent("team2spawn",source) end end Respawn function: function team1spawn() currentmap = call(getResourceFromName"mapmanager","getRunningGamemodeMap") local mapinterior = get(getResourceName(currentmap)..".#interior") if mapinterior == false then mapinterior = 0 end mercpoints = getElementsByType ( "team1s", mapRoot or getRootElement() ) local random = math.random ( 1, table.getn ( mercpoints ) ) local posX = getElementData(mercpoints[random], "posX") local posY = getElementData(mercpoints[random], "posY") local posZ = getElementData(mercpoints[random], "posZ") local skin = getElementData(mercpoints[random], "skin") local rot = getElementData(mercpoints[random], "rot") or getElementData(mercpoints[random], "rotZ") or 0 spawnPlayer ( source, posX, posY, posZ, rot, skin, mapinterior ) --setCameraMode ( source, "player" ) setCameraTarget ( source, source) fadeCamera(source,true) setPlayerTeam(source,team1) gearup(source,"team1") --outputChatBox("Welcome to '"..getTeamName(team1).."' team",thisplayer,255,30,0) setPedFightingStyle ( source, 7 ) end addEventHandler ( "team1spawn", getRootElement(), team1spawn) Giving the guns: function gearup (thisplayer,team) setElementAlpha ( thisplayer, 255 ) if team == "team1" then weapon1s = getElementsByType ( "weapon1s", mapRoot or getRootElement() ) for i,weapon1st in pairs(weapon1s) do local id = getElementData(weapon1st, "model") local ammo = getElementData(weapon1st, "ammo") giveWeapon ( thisplayer, tonumber(id), tonumber(ammo),true ) end elseif team == "team2" then weapon2s = getElementsByType ( "weapon2s", mapRoot or getRootElement() ) for i,weapon2st in pairs(weapon2s) do local id = getElementData(weapon2st, "model") local ammo = getElementData(weapon2st, "ammo") giveWeapon ( thisplayer, tonumber(id), tonumber(ammo),true ) end end end addEventHandler ( "givetheguns", getRootElement(), gearup ) Now, i used givethe guns in the spawn function, everything working but when player1 kills player2 is respawn. But when killed player (player2) wants to shoot player1 don't see it and dont hurt (it looks like giveWeapon in client side) what is wrong?! Here is simple map code of weapon: <weapon1s id="weapon1s (AK-47) (1)" model="30" ammo="200"></weapon1s> Help me!
-
i checked, its good (like in starting map)
-
function showCamera() local posX = getElementData(camera,"posX") local posY = getElementData(camera,"posY") local posZ = getElementData(camera,"posZ") local targetX = getElementData(camera,"targetX") local targetY = getElementData(camera,"targetY") local targetZ = getElementData(camera,"targetZ") local players = getElementsByType("player") for k,v in ipairs(players) do setCameraMatrix(v,posX,posY,posZ,targetX,targetY,targetZ) end end function onStealthPlayerJoin () setElementData ( source, "Kills", 0 ) setElementData ( source, "Deaths", 0 ) end addEventHandler ( "onPlayerJoin", getRootElement(), onStealthPlayerJoin ) function mapStart(startedMap) setElementData ( team1, "Score", 0 ) setElementData ( team2, "Score", 0 ) outputChatBox("Map loading...") outputChatBox("Odpalamy mape: "..getResourceName(startedMap)) currentmap = startedMap local maptime = get(getResourceName(currentmap)..".#time") --missionTimer = exports.missiontimer:createMissionTimer (maptime,true,"%m:%s",0.5,20,true,"default-bold",1,255,255,255) local mapweather = get(getResourceName(currentmap)..".#weather") if mapweather then setWeather (mapweather) end local mapwaves = get(getResourceName(currentmap)..".#waveheight") if mapwaves then setWaveHeight ( mapwaves ) end local mapspeed = get(getResourceName(currentmap)..".#gamespeed") if mapspeed then setGameSpeed ( mapspeed ) end local mapgravity = get(getResourceName(currentmap)..".#gravity") if mapgravity then setGravity ( mapgravity ) end local cameraInfo = get(getResourceName(currentmap)..".camera") if not (camera) then camera = createElement("camera") end setElementData ( camera, "posX", cameraInfo[1][1] ) setElementData ( camera, "posY", cameraInfo[1][2] ) setElementData ( camera, "posZ", cameraInfo[1][3] ) setElementData ( camera, "targetX", cameraInfo[2][1] ) setElementData ( camera, "targetY", cameraInfo[2][2] ) setElementData ( camera, "targetZ", cameraInfo[2][3] ) outputChatBox(cameraInfo[1][1]) outputChatBox(cameraInfo[1][2]) outputChatBox(cameraInfo[1][3]) outputChatBox(cameraInfo[2][1]) outputChatBox(cameraInfo[2][2]) outputChatBox(cameraInfo[2][3]) showCamera() end addEventHandler( "onGamemodeMapStart", getRootElement(), mapStart) Ok, i start this resource first map is good it sets camera matrix but when i start second map its only black screen what is wrong? (its partly from stealth gamemode) PS: In .map files is all right!
-
hi how can i allow player to walking when hi is doing animation?
-
HI! Can i make second camera inside gui? It needs some dx Drawing or somthing else? It's posible ? If it is, how can i make it?
-
Can i load files from another folder ? i have file x in folder a and i wanna to use file x in script in folder b
-
setTimer( function() destroyElement(tooMuchJuggernauts) end, 5000, 1 ) end before time
-
outputChatBox(tostring(message), sendto, r,g,b)
-
DxDraw: https://wiki.multitheftauto.com/wiki/SetElementData https://wiki.multitheftauto.com/wiki/GetElementData Labels: https://wiki.multitheftauto.com/wiki/GuiSetVisible
-
Hi! Why when i setSetCameraMatrix to point A, and next setCameraTarget to player, i lose some hp ?
-
Hi I have local chat script, and how can i allow to use commands in this chat like '/setskin' ? LocalChat: https://community.multitheftauto.com/index.php?p= ... ls&id=2801
-
what are the id numbers of unused objects in the game in gta3.img?
-
https://wiki.multitheftauto.com/wiki/SetElementData https://wiki.multitheftauto.com/wiki/GetElementData https://wiki.multitheftauto.com/wiki/Dxscoreboard tonumber(x) Thats all
-
how can i allow to use replaced anims ifp file ? but nothing else!