botanist
Members-
Posts
613 -
Joined
-
Last visited
Everything posted by botanist
-
Oh, funny I always used get-attributes functions. But did you try what I said? My rotations always work, though they're retrieved another way. createPed ( 14, x, y, z, 0, 0, rot1 ) If rot1 doesnt work properly, use rot3. Idk what getElementRotation does on map elements.
-
The first one indeed. Replace "data/euros.txd" with the filepath of your file (be sure to add it to meta.xml!), and replace the number with the weapon model number. Don't use the rest; That's DFF (so the model) related stuff, and that doesn't work for weapons (and peds too if you wanted to know, only objects and vehicles can have a custom DFF.).
-
Set is correct, get according to the wiki not (I can't confirm this, as I never experienced the problem ) So, for the rotation parameters: '0, 0, rot1' should be correct in that case. BUT, does getElement...() actually work on map files? I never tried this, so could anyone confirm this?
-
No, the example replaces a vehicle texture. But you can retexture every possible model with that function. That's why he mentioned it.
-
Add 'return' in front of str:gsub, otherwise there won't be a new string returned
-
But you can make 'x' a bool in that script. x = false function changeX ( ) x = not x ... end Same with the timer. By the way, from your script: if (timer ~= 0) then timer = -1 So, the if condition will always pass, as a timer doesn't return zero, and you assign -1 to the variable. There's a problem though. We are creating and destroying a timer every second, so why would we make the 'loop' argument infinite in the first place? Also, we can't cancel this animation, as the timer recreates itself. Aibo's script should work neat, though it uses two functions. I'm not sure if that's needed, as you said too. Aibo is also creating two timers. That could be done in one. Let's mix those scripts. X,Y = guiGetScreenSize() X = X * (1/5.5) Y = Y * (1/3) show,timer = false,nil function draw ( ) if show then -- Only show the text when we want to dxDrawText("Slaineeed!", X, Y, X, Y, tocolor(255, 64, 64, 255), 5) end end function toggleAlertAdvice ( ) -- Call this function to put the flashing on or off if isTimer ( timer ) then killTimer ( timer ) else timer = setTimer ( function() show=not show end, 500, 0 ) end -- Function embedded in the timer end addEvent ( "alertRadar", true ) -- Or call the event addEventHandler ( "alertRadar", root, toggleAlertAdvice ) addEventHandler ( "onClientRender", root, draw ) -- 'root' is a global variable, the same as getRootElement().
-
ok ty oh.. if not bets == nil and isElement(player) then 'if not bets == nil'? lmao, that's basically the same as 'if bet', unless you want to filter 'false' out. But since this is a table (as you're using this var to loop), you have to put this check ABOVE the loop, not in it. It will never be called if the variable 'bets' isn't a table since there's nothing to loop then. Also, if bet[1] == theWinner then Why do you need a loop then? You only check bet[1], not all other bets. And you're counting bet[2] up to you stats, but what if the second bet won? Then the loser gets cash? Doesn't seem right for me Also try debugstrings. Output stuff like tostring(bets) or type(bets) to see if bets exists properly, and tostring(bet) to see if the bet is correct. And more like this. Debugging like this might solve the problem too
-
There's a documentation on the wiki, but if you tell me what you exactly need, I could make some start for you. Ofcourse no full one, you gotta learn from it The wiki describes about the custom elements you can make. But, you can always add a script to that.
-
That's not possible, but doesn't the adminpanel give you these options?
-
That's no model lmao, that's a serie. Sempron is pretty old, though. The model should be some number or name. For example: A hexacore 3.2 ghz phenom2 is called '1090T'.
-
He will have to forward his 22003 UDP and 22005* TCP anyway, as those two are always required iirc. If you already forwarded two ports, the third one shouldn't be a problem.
-
In that case he just asks the same question again, as karlis already posted a script for him to do such.
-
It CAN be done with EDF, that's why I mentioned it You can make your own elements using EDF, but also a script to prevent more than X stuff. See Wojak's script, that should really help you. Just place that EDF in your gamemode, not a separate resource. This is why EDF exists, to allow people to make their own preferations.
-
Oh lol, then you're trying to call an unexisting function Replace the setTimer line with this: setTimer ( unmutePlayer, 60000, 1, randomPlayer )
-
Just ignore him then. Such people like to get attraction, no matter in which way. Anything negative will make him feel statisfied and thus keep him going. Better stimulate him to make his own stuff, best way to change what he's doing.
-
If it won't work, post your unmuterandomPlayer function here as it might need to be modified now.
-
repeat randomPlayer = getRandomPlayer ( ) until randomPlayer ~= player Where the 'player' variable is the player who entered the command.
-
But we CAN tell him how to do it. I'm sure there are exported functions for vote/mapmanager. I remembered a function called getCompatibleMapsWithGamemode or somethong like that. It returned a table containing maps, which you can use to loop and fill a gridlist. Then add an eventhandler for a click or doubleclick to call some exported function from votemanager. Both resources (mapmanager and votemanager) are documented on the wiki in the resources catalogue.
-
Addition to JR10, which is actually the problem of all this: the setTimer syntax is incorrect. You used the function to call at the end, it has to be at the first argument. setTimer ( unmuterandomPlayer, 60000, 1, randomPlayer ) The last argument is needed to determine who was the random player. See the wiki for a full documentation about setTimer.
-
Why do you need a limit anyway? You can also tell your mappers to not place more than 4 vehicles. And did you already tried Wojak's script? That should do the job. Tbh, I don't think this is something which has to be in the map editor by default, as it's gamemode related. If it was, and users changed the amount of maximum allowed elements, you have to edit the map editor too. An EDF will be the best solution for you
-
Most likely his ports aren't forwarded, or he set 'donotbroadcastlan' to 1 in mtaserver.conf. Let him write 'openports' in the serverconsole to see if his ports are open. If they aren't, sent him to portforward.com to see how he can forward his ports on his router. Note that the mta tut for that is outdated, he will need to forward the following ports: - 22003 UDP - 22005 TCP* - 22126 UDP * iirc, might be 22004 TCP otherwise. Let him check his mtaserver.conf, it's the HTTP port. If the ports are forwarded, but you still don't see his server, change 'donotbroadcastlan' to 0. or am i wrong with donotbroadcastlan? I'm not so sure anymore now i'm thinking of it
-
Lol, offtopicers See The-kid's IWTG gamemode, that's a pretty nice 2d mode. Wishin: when 'over'? You mean with your mouse? If so, let me make some simple functions which you can expand.
-
Did you try to put that thing in your singleplayer installation? I'm pretty sure the TXD is incorrect, there's no other reason why that error could appear. Let your friend recheck it, or post it here so we can have a look at it.
-
Bandi94: read the wiki, then you know why. Chlorek: The debug already told you what's wrong, but might be unclear if youre sure the TXD was correct. Well, it isn't. Did you read any TXD tutorials yet? I got the idea you just added some BMP files to the TXD archive, but it isn't that simple There are some options you have to apply to the textures. I haven't modded for a while, so I dont exactly remember how this worked, but some TXD tutorial should help you with this.
-
I lol'd You're telling us your gamemode is at 40%. Funny part: you didnt even have a saving system, and dont have any custom models yet. Those two things my friend, are the basics of such a gamemode. How the hell do you want to test your scripts without even having these? Could you tell me and others what you've exactly done in these 40%? Then we know atleast something. Also, didnt you know about the element/object limit in MTA? Those limits can be a disaster for such a gamemode. You can have a total of 65535 elements which are objects, players, vehicles and whatever else created by MTA in total on your server, and a maximum of 350 objects streamed in at a time. Hope you bear them in mind
