Jump to content

DazzaJay

Members
  • Posts

    739
  • Joined

  • Last visited

Everything posted by DazzaJay

  1. i have somthing that works! altho, its at a sacrifice of framerate...... function syncTime() local realTime = getRealTime() local hour = realTime.hour local minute = realTime.minute setTime( hour , minute ) end setTimer ( syncTime, 1000, 0 ) function syncweather() local weatherID = getWeather() setWeather( weatherID ) end setTimer ( syncweather, 1, 0 ) i have been testing it for a half hour, and it works really well, [sLR]Racer told me to put the weather check and sync into a seperate function, that does the check and update every 1MS. it starts to get a bit flashy if you go under 20FPS. how much of my FPS is lost to this method is, my normal FPS is 48, with the script like that, im down to 38~ so its a fair drop in performance. but it works.
  2. How would i go about getting this script to check to see what the weather is set to, and set the weather to the same setting at the same time as setting the time?
  3. i dare say getting the chat bubble to show above a player would be a simmilar system to how thier name and health bar appears to others
  4. "comming soon" what is? map editor? phisycs adjustment? both?
  5. MOD NOTE: The resource that mainly gets discussed here, "kchaticon", has been revived by MTA staff and re-uploaded to https://community.multitheftauto.com/index.php?p=resources&s=details&id=14639. The latest version solves all problems discussed on the pages of this topic; it optimizes bandwidth, and also fixes chat icons remaining (floating) on the screen. The resource has been rewritten partially. Im sure some of you have played Quake III before, and have seen the blue logo that appears over somones head when they have started to type a chat message. well, i was wondering if it is possible to get a script that will display this image...... above the players head when they have the "say" or "Team say" box open. (displayed on everyones screen above the player that is typing's head that is) the good thing is that i belive you wouldent need to host the image on the server, as it is located in the game defaultly! its called "badchat" and is located in the /san andreas/models/txd/LD_CHAT.txd file! can somone help out with a script like this? :::EDIT::: i have made a Photoshopped image of how i would like it to work when its done...... (click for bigger photoshopped image)
  6. i have a question to ask about this. im just guessing as i dont really know... but it looks like this script Shows an image of the servers choice, then removes the image when the player gets killed.... so instead of removing the image when the player gets killed, is there a way to remove it after say a 20 second timer?
  7. Can anyone convert it to be public? as i have allready set up a place on my website for it: http://www.potholestudios.com/Content/pid=36.html thanks in advance to the genious who can pull this off.
  8. just a quick question about object physics.... in MTA race, the barrels that didnt explode, you could run into them, and nock them about with your car, but in DM they are solid. will there be a way to change things like this when the map editor is released?
  9. that script is syncing time server side, if change my server pc's time, and relaod the script, the time in game is sync'd to it, and not my client pc. This screenshot has Xfire's Clock Overlay turned on, showing my Client PC's time "7:30 PM" (19:30) where at the game is clearly syncing time to the server "5:32" (17:32) http://files.potholestudios.com/dazzaja ... -times.jpg this is the script i am using: function syncTime() local realTime = getRealTime() local hour = realTime.hour local minute = realTime.minute setTime( hour , minute ) end setTimer ( syncTime, 1000, 0 ) as for the weather changing, i can nock up some screenshots to prove my thoery. Heres a download of TimeSync Tool V1.81 http://files.potholestudios.com/dazzaja ... ncTool.zip load it up, make sure that "Weather Fix" is unchecked, and you will see the weather changine when it syncs the time, once per second. alt tab out, check Weather Fix, go back in, and you will see that it is still syncing time once a second, but there is no flicker, or anything like that. :::EDIT::: The following links are 9 Sequential Frame Captures, taken from a video filmed with Fraps at 25FPS. With the Time script set to update time once a second. Ok, this first screenshot shows everything normal, just before a time update. the time in the top corner is 16:56 http://files.potholestudios.com/dazzaja ... ther/1.jpg This next image shows that the time has changed to the next second... (16:57) http://files.potholestudios.com/dazzaja ... ther/2.jpg Third image shows game time being updated by script, setting it back to (16:56) Noote, the sky has gone dark and the car lights are on. This here is your "Sky Flash" http://files.potholestudios.com/dazzaja ... ther/3.jpg This 4th image shows that the weather has fixed itself, but there is now water spray comming from the tyres. http://files.potholestudios.com/dazzaja ... ther/4.jpg more water spray http://files.potholestudios.com/dazzaja ... ther/5.jpg more water spray http://files.potholestudios.com/dazzaja ... ther/6.jpg more water spray http://files.potholestudios.com/dazzaja ... ther/7.jpg more water spray http://files.potholestudios.com/dazzaja ... ther/8.jpg more water spray http://files.potholestudios.com/dazzaja ... ther/9.jpg as you can see in those 9 frames of footage, the weather changed when the time updated, for only 1 frame of gameplay. i have been playing quite a bit with this, and pretty much every time update, the game goes to a random weather setting for 1 frame, then goes back. That my friend, is the sky flicker. So..... how do we go about stopping this from happening. My gues is we could get it to check what weather setting the game is currently at, and reset the same weather when the time is set. that SHOULD keep it from changing the weather for a brief second. which should stop the flickering.
  10. Small question, with these being made for Hay and Fallout... can we use the scripts on servers that play all game modes? without them banning people for using weapons on a normal game mode?
  11. it works Bloody Brilliant mate! Good Job, and thanks for this awesome script.
  12. it works great now, altho i have 1 problem. the !say command to send messages to people in game, can i turn this off? so all chat messages in IRC is relayed into the game? mainly because my channel bot allready has an !say command, and it insists on replying every time it is used. that and with Race, we never had to use !say to talk to players in the game, how would i go about changing it so you dont have to !say.
  13. thanks, i will redownload and check it out. also, i have been a user of Rizon for years now, so i dont really want to change to gtanet or any other network.
  14. anyone know why this is happening?
  15. DazzaJay

    Player kick

    I was thinking about doing somthing like this.. and i auctually did..... i know this works, as i have tested it..... local playerTable = {} function scanPlayers() local allPlayers = getElementsByType("player") for k,v in ipairs(allPlayers) do if (playerTable[v] ~= true) then checkNickname(v) end end end function kickNickname(thePlayer) playerName = getClientName(thePlayer) if (string.find(playerName, "Player", 1, plain)) then --outputChatBox ( playerName.." is being kicked for: Not changing nickname", getRootElement(), 255 ) setTimer ( kickPlayer, 1500, 1, thePlayer, "Change your name before returning") else playerTable[thePlayer] = false end end function checkNickname(thePlayer) playerName = getClientName(thePlayer) if (string.find(playerName, "Player", 1, plain)) then outputChatBox ( playerName..", you have 30 seconds to change your nickname before you are kicked - type /nick <nick>", thePlayer) outputChatBox ( "The reason you will be kicked is: Using a Forbidden Nickname (Player)", thePlayer) setTimer ( kickNickname, 30000, 1, thePlayer ) playerTable[thePlayer] = true end end function onPlayerJoin() checkNickname(source) end addEventHandler ( "onPlayerJoin", getRootElement(), onPlayerJoin ) function onResourceStart(thisResource) setTimer ( scanPlayers, 5000, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), onResourceStart ) these are in the ACL <group name="ackick"> <acl name="playerkick"/> <object name="resource.playernamekick"/> </group> <acl name="playerkick"> <right name="function.kickPlayer" access="true"/> </acl> and this is in the mtaserver.conf <resource src="playernamekick" startup="1" protected="0"/> i think i got those ACL codes copied out correctly, as i have 3 different copys of this script, all modified to do different things running in there.
  16. I KNOW WHAT THE FLICKERING IS!!!! very quick, possibly only a couple of Millisecond lasting "Weather Changes" i worked this out by running the script and driving down the highway.... on some of the flickers i noticed that the cars tail lights blinked on with them during the flash, and in some flash's you would get water spray from the tyres. its weather changing to a random weather on time changes for a very very short time. This was one of the problems with one of the earlier "Time Sync Tool"'s for single player, every second, on time update, the weather would change to a random weather. it seems like the same thing is happening with this script, with the only difference being that after a few ms the weather gets set right by the server. So now, we have a cause for the flicker. as for a way to fix it...... what about somthing that checks what weather is set at the time, and make sure that weather stays with the time change, or somthing like that.
  17. yeah, at dawn / dusk just 1 game minute of difference is a big change in the sky and the brigntness, so that idea would be really noticeable. and yeah, i just tested the script then, and i can see the flickering your talking about, where almost everything flashes white each time it changes.
  18. Thanks so much for your help guys! im going to go and test this now... i will post in here again if i have any problems.
  19. ok, so this dosent need an ACL? function syncTime() local realTime = getRealTime() local hour = realTime.hour local minute = realTime.minute setTime( hour , minute ) end setTimer ( syncTime, 500, 0 ) just to doubble check, is that correct? also, if i go to admin console, and click the set time thing over and over.... about once a second, i dont get any sky flickering.... i havent tested this script yet tho, so i dont know what it does, but im guessing it should act in a similar way to the admin panel.
  20. thanks for the tip. as id only started to get a basic grasp on Mirc scripting, and now DM is out, ive gotta learn everything again, so now i know what order thigns fgo in in timers Any luck with the ACL?
  21. Dosent the script need an ACL or somthing that allows it to make the time change commands?
  22. is that right? and also, how would i go about running this on the server to test, like, is that the only stuff to go in the .lua file? or is more code neded or what?
  23. Well, Time Sync Tool keeps the time at system time (in single player only ofcourse) the only thing that even slightly flickers is the Realtime Shadows of static objects, as they move 3 times a second. As for flickering, there is a massive problem with that as it is, because of this "Awesome new font rendering system" or whatever, i have to put up with constant sky flickering, and if i use that console command to stop that crap from happening, the chat goes all blocky, and other text on screen gets supersised. its really a Great new system. But anyways, how do i put that code into a script so i can test this out on my end with a timer of 500ms instead of the render option, and the game time being set to server time and not client time? as if it gets set to client time, then that means that some people will have daytime on thier screen while others will have night, and that will make things a little unfair on some maps visability wise.
  24. i guess id better go further in depth with my gametype.... Basically, It would be set up in a similar fashon to "Initial D Stage 4" on join, you get to select your car, you can also select what mods to do to the car, such as colours, paintjobs, bodykits. heres where it gets interesting..... If you are the only person in the server, once you have selected your car, you start the race, with your choice of uphill, downhill or compound stage. if another player joins, and has selected thier car, the message will appear on everyones screen "New Challenger" Both of these people will now be able to vote on the game type, uphill, downhill, or compound stage, and the set of rules, which are "Dash or Outrun" once that vote is complete they will start the race. now, lets go further into "Stage Type" Uphill. Start at bottom of Akina, and race to the top. Downhill. Start at the top of Akina and race to the bottom. Compound Stage. Start at the bottom, race to the top, turn around at the cone, and race back down. Now, Rules Sets: Dash: Both cars start side by side, and it is a race to the finish line. Outrun: Players vote on if they want to be the Leader or the Chaser, Cars start one behind the other, The leaders job is to get to the finish line 5 seconds infront of the chaser, the chasers job is to overtake, and finish first. If the chaser dosent pass the leader, or the leader dosent finish 5 seconds ahead of the chaser, then the race will go into round 2 with the starting positions reversed, this will continue untill a winner is decided. Also, There is No respawn, so a blown up car = a loss. a person who quits the server while in a race is a loss also. ok, because only 2 players can race at once, other people that join can choose thier cars and spectate til a winner is decided, the looser then gets set to spectate and the next person who joined goes into the next race. and so on. If anyone can build this complex gametype for me, and ofcourse the other Initial D fans, that would be great, as i will have a 24/7 Akina server running with it.
  25. Changing game speed, will not only slow the clock down, but put everything into slow motion... so to get the clock to run at real time in that method, it would mean dlowing the game down 60X which means that everything, walking, shooting, driving, everything would be 60X slower. but for a better way of setting the time to real time without slowing the game down...... my guesses are this would be easy for somone who knows what they are doing. a part that checks server time, which using a timer once a second sets the game time to the same time. and ofcourse, repeas once a second, to keep the game time set to real time. as for how to go about it, no idea, altho i do know that you can set the game time with the admin panel, so i dare say the awnser lies in there, i just have no idea how to find it, or how to get it to work.
×
×
  • Create New...