Gamesnert
MTA Contributors-
Posts
2,035 -
Joined
-
Last visited
Everything posted by Gamesnert
-
Lol, except for that one failed experiment I never tried XML. So I didn't know. ^^
-
Oh? Never knew that, and it did fail in my own experiments... Anyway, might it be because typo's in your mapfile?
-
Hell yeah! It's possible in DP3. For more info, see THIS page in the wiki. Also look and click in the see also section. You might want to script now for later already.
-
No. It's in XML format. Only file type is .map. But does MTA know that? Answer: no. Every program doing this checks for the extension, before checking the contents. So although it is in XML format, MTA doesn't think so, and thus returns NIL. You may want to wait for an expert to come online to explain more and talk about a possible solution. I only tell my own experiences and things for as far as I know. What MIGHT help: http://development.mtasa.com/index.php?title=FileOpen Not for configuration files... .map is no configuration, right?
-
... You're trying to load a .map with a XML function... Might be the problem?
-
This is a common bug, and will hopefully be reduced in DP3. In the meantime, pick your battles. /reconnect MIGHT help, but is far from being any kind of a reliable fix. They said that DP3 had huge synch improvements. Well, apparently we really need it! For I have this problem too...
-
Make a custom event for showing the window. So for example: ... addEvent("forceClientToSeeRules",true) addEventHandler("forceClientToSeeRules",getRootElement(),showRulesWindow) ... And then serverside: function forceRules(somebody, commandName, player) local player=getPlayerFromName(player) triggerClientEvent(player,"forceClientToSeeRules",somebody) end addCommandHandler("rules",forceRules) Something like that. Since I'm pretty new, you might want to double-check the code. But for the biggest part, it should do the trick. --------------------------------------------------- Response to new post posted before mine: The way I did it, somebody is the source, and player is the target. So no in the case of my example.
-
Aaaah! The map of the freeroam resource! I think you'll need to tweak the resource for that...
-
Nametag visible on the MAP? How you did that... Anyway, you can do setElementData on the player in when the blip is created, then when you want to make it disappear. You retrieve it, do destroyElement, and off the blip goes! (I think...) EDIT: Oh lol, forgot about a better method: function destroyBlipsAttachedTo(player) local attached = getAttachedElements ( player ) if ( attached ) then for k,element in ipairs(attached) do if getElementType ( element ) == "blip" then destroyElement ( element ) end end end end And add a command handler or anything to make it easy to aim for certain players.
-
If you haven't enabled "playerblips" resource and you don't have them in your code, they're not in the game... And name? Make a for loop for players and use "setNametagText" or something like that.
-
Marker limits: HERE (note that if markers exceed this limit, they're not going to disappear)
-
You having that problem too? Hmmm... Not a bad idea... When I've solved several bugs on my own server for today, I'll take a look at the examples. Also, is the MTA team aware of the spawnmanager where are some bugs in? Such as the setSpawnpointTeam bugs? Look at my post about the spawnmanager. But well, back on topic: Apparently people are aware of the examples being broken. They'll be fixed in time. Still thanks for reporting Winky. And Winky, it won't take ages.
-
The support board is a relatively unvisited board. Be patient. It usually takes 1 - 3 days to get an answer here.
-
Nice to hear you want to MAKE one. You might like the function: logIn. (capital i) Type it in a wiki search and you'll find something. Also take a look at the GUI tut. It has an unfinished login GUI. So use that GUI in combination with a small script containing logIn, and you have the nicest login script you can imagine.
-
Took days/weeks to get it in my case... And it's my 3rd or 4th language... Anyway, the wiki is indeed difficult. But keep on reading, and you have learned your first programming language in no-time. By the way, read my sig. There is a sentence that may help you.
-
I think you're better off to do a small RP server first, and go to RPG later on. The reason is that RP servers do not contain all too much functions, lines and elements. Making it easier for you. But do you know how to script? Have you read the wiki? Those are things you should do before posting. We can help, sure RP things are a piece of cake to the most 'round here. But if you know how to script yourself, imagine the advantage. If you do know how to script, script these things atleast: -A spawnscript -A (small) map -An "onPlayerWasted" script (when a player died) -Some functions to make your server slowly go from RP to RPG. As I said you'll learn how to script in the wiki. You really can't find it there? THEN we can help you.
-
The difference between a gamemode and a 1 server gamemode is that a normal gamemode is adaptable to maps. So in the 1 server gamemode, there HAS to spawn a vehicle at 0,0,3 for example, and a normal gamemode is just adaptable. So that you can change it without changing the code, only the map. Making a normal gamemode is a quite bigger challenge, so are you sure you want to do it right now? Or do you want to wait first for you to learn Lua and scripting a bit better and then getting on it? I will give you a small example of a 1 server gamemode piece of code, and a normal gamemode code: 1 server: vehicle1=createVehicle(520,5,5,3,0,0,180) vehicle2=createVehicle(520,7,7,3,0,0,180) ... Normal: (map) <vehicle model="520" posX="5" posY="5" posZ="3" rotZ="180" /> <vehicle model="520" posX="7" posY="7" posZ="3" rotZ="180" /> Normal: (script) allVehicles=getElementsByType("vehicle") for i,vehicle in ipairs("allVehicles") vehicle[i]=vehicle end (Don't know for sure the script example of the normal gamemode works, that's why it's an example.) So just to make it clear: A gamemode is adaptable, for the biggest part by maps. And you can make it easy for the mapmakers to not edit your scripts.
-
Ok obviously, there are a few things wrong in spawnmanager itself... I'll give you an example of the setSpawnpointTeam script: function setSpawnpointTeam ( spawnpoint, team ) if not isElement ( spawnpoint ) then outputDebugString("setSpawnpointTeam: Invalid variable specified as spawnpoint. Element expected, got "..type(spawnpoint)..".",0,255,128,0) return false end if getElementType ( spawnpoint ) ~= "spawnpoint" then outputDebugString("setSpawnpointTeam: Bad spawnpoint element specified",0,255,128,0) return false end if not isElement ( team ) then outputDebugString("setSpawnpointTeam: Invalid variable specified as team. Element expected, got "..type(team)..".",0,255,128,0) return false end if getElementType ( team ) ~= "team" then outputDebugString("setSpawnpointTeam: Bad team element specified",0,255,128,0) return false end skin = math.ceil(skin) setElementData ( spawnpoint, "team", skin ) return true end Obviously, if you look at the end you see a few errors. First thing: "skin = math.ceil(skin)". Skin isn't specified anywhere. What you need it for anyway in a teamscript? Then, the last error, but still a serious error: "setElementData ( spawnpoint, "team", skin )". Setting a team to a skin ID might not be the best idea? After changing this, (and checking with getSpawnpointTeam) I've got it working. Unfortunatly, I still had to change my code to make the player spawn at a team spawnpoint... Well, atleast this function is supposed to work now. And hopefully this is automatically fixed in DP3 and so on.
-
You can replace every model you imagine. Heck, you can even replace the Hydra model with this one. But I don't think flying circuits are such a good idea. So you can replace the pirate ship for example. But will this change affect the original? I think that's the big question. I think it does though... But let's hope not...
-
I don't understand how the spawnmanager works... I'm trying to make a spawn code for 3 spawnpoints, all 3 specified in the map. call(getResourceFromName("spawnmanager"), "setSpawnpointTeam", getElementByID("sp1"), team1 ) call(getResourceFromName("spawnmanager"), "setSpawnpointTeam", getElementByID("sp2"), team1 ) call(getResourceFromName("spawnmanager"), "setSpawnpointTeam", getElementByID("sp3"), team1 ) The spawnpoints: <spawnpoint id="sp1" posX="283.339" posY="1972.488" posZ="17.64063" rot="270" skin="287"/> <spawnpoint id="sp2" posX="279.5817" posY="2013.327" posZ="17.64063" rot="270" skin="287"/> <spawnpoint id="sp3" posX="338.7903" posY="2012.863" posZ="20.63943" rot="270" skin="287"/> The reason I need this is that I'm making huge changes on my server, and with the previous version it didn't work either. Error messages say that the spawnpoints are invalid, they return a bool instead of an element. Why? Thanks in advance, Gamesnert
-
I think it's possible with the Engine functions. It needs to replace some objects though, and I don't know what the game will do with that. Then I look at the zip, and I see a few files and everything. It looks like only the models are necessary, but they're added to add 'em in the normal SA. So find a models to replace, (with engine functions) and then add them in the normal place. Place the object in a place you want, and there you have it. Hope it helps, Gamesnert.
-
So basically, you are saying the wiki doesn't mean anything? Well learn to read, and you'll see it DOES mean anything.
-
Who said I'm patient? By the way, attempting to script will make you wait less longer than wait for anyone to help... I think video tutorials are quite useless for showing how to script, and it's a wiki, not wikipedia. Although learning is very frustrating in the beginning, keep trying and you'll be rewarded.
-
Look at that, works like a charm. ^^ So next time I must remember: -To let source out of arguments list. -Not put something in 2 times. -To not make such a mess of my script. Ok, I'll probably have another question in a week or less... But well, atleast these mistakes probably won't be in.
-
Lol fool. You're just dumb. Why you doing this anyway? By the way, the webadmin can just add you between banlist in the .htaccess on the site, and ban you forever! So stop spamming, and make something out of your life
