All Activity

This stream auto-updates     

  1. Past hour
  2. Today
  3. My apologies. The code works fine. For some reason, when I used FTP to update the AFK code, it added unnecessary code to the end of my_afk_camp_time++; I manually deleted the code and replaced it as above and it works perfectly! Thank you again.
  4. I tested the code and it worked fine. Can you send me the error that you see in console?
  5. Yesterday
  6. This should work (I tried it in my mod) but it would only affect the players who chose the sniper class (if another player gets sniper from another class it does not affect it) ps: I just needed to declare class main() { for(;;) { level waittill("connected", player); player thread anticamp(); } } anticamp() { self endon("disconnect"); self.campingtime = 0; maxcamptime = 20; warntime = 10; class = self.pers["class"]; while( isDefined( game["state"] ) && game["state"] == "playing" && class == "sniper" ) { wait 0.1; if ( self.pers["team"] == "allies" || self.pers["team"] == "axis" ) { wait 0.1; if ( isAlive(self) ) { wait 0.1; startpos = self.origin; wait 1; endpos = self.origin; if(distance(startpos, endpos) < 100) { self.campingtime++; } else { self.campingtime = 0; } if(self.campingtime >= warntime && warntime != 0) { self iprintlnbold("^1You are camping, move"); } if(self.campingtime >= maxcamptime) { self iprintlnBold("^1You have to play not camp"); iprintlnBold ("^3" + self.name + " ^1WAS ELIMINATED BY CAMPER"); self suicide(); self.campingtime = 0; } } } } } if(distance == 0 && !self.hasSniper()) {
  7. The following line is causing a server crash: if(distance == 0 && !self hasSniper()) { my_afk_camp_time++; Any suggestions? I GREATLY appreciate your help with this! Thanks.
  8. Last week
  9. I offer this as a solution. However, it is untested and might need adjusting. afk_camp_watcher() { self endon("death"); self endon("disconnect"); self endon("joined_spectators"); self endon("game_ended"); my_afk_camp_time = 0; have_i_been_warned = false; camp_time = 20; while( 1 ) { old_position = self.origin; old_angles = self.angles; wait 1; new_position = self.origin; new_angles = self.angles; distance = distance2d( old_position, new_position ); if(distance == 0 && !self hasSniper()) { my_afk_camp_time++; } else { my_afk_camp_time = 0; have_i_been_warned = false; } if( my_afk_camp_time == camp_time && !have_i_been_warned ) { self IprintLnBold("^1Anti-Camp Software ^7Initiated"); self IprintLnBold("^710 seconds to move!"); have_i_been_warned = true; } if( my_afk_camp_time == ( camp_time + 10 ) && have_i_been_warned ) { self IprintLnBold("^7You will be moved to spectators for ^1AFK ^7/ ^1Camping^7!"); wait 2; self.sessionteam = "spectator"; self.sessionstate = "spectator"; self [[level.spawnSpectator]](); iPrintln("^3" +self.name + " ^7was moved to spectator by ^1Anti-Camp Software!"); } } } hasSniper() { sniper_rifles = strTok("m40a3_mp:M21_mp:M21_acog_mp:dragunov_mp:remington700_mp:barrett_mp:barrett_acog_mp", ":"); current_weapon = self getcurrentweapon(); for(i=0;i<sniper_rifles.size;i++) { if(current_weapon == sniper_rifles[i]) return true; } return false; }
  10. Here is a sample nginx conf what I use, maybe for someone gonna get useful: server { listen 80; listen [::]:80; server_name <yourdomain.com>; # Replace this with your domain, as you want, prefer a subdomain, something like: fastdl.domain.tld root /home/<user>/cod4; # The root folder of the cod4 directory, replace the PATH with yours. location / { # Try to serve file directly, fallback to front controller, deny all access. deny all; } location ~* "\.(ff|iwd)$" { # Add or remove all the extensions you need. Obviously we allow only .ff and .iwd files to download, so no config files are obtainable. allow all; } error_log /var/log/nginx/fastdl_error.log; access_log /var/log/nginx/fastdl_access.log; }
  11. Thank you for all the links. Very helpful. I'm still stumbling around. Hardest thing for me (so far) was getting the redirect to work. I found out it was the website I was using did not have the "mime" type set for cod4 files to download. It's working now... mostly. Occasionally get a server map mismatch which is weird since it IS the same map I downloaded. * I found deleting all references to the map on my client, clearing the game cache on Steam, AND THEN verifying the game files did the trick. It downloaded the map again. I'm probably doing something wrong somewhere, but what else is new. Many thanks.
  12. The following is my current AFK code: afk_camp_watcher() { self endon("death"); self endon("disconnect"); self endon("joined_spectators"); self endon("game_ended"); my_afk_camp_time = 0; have_i_been_warned = false; camp_time = 20; while( 1 ) { old_position = self.origin; old_angles = self.angles; wait 1; new_position = self.origin; new_angles = self.angles; distance = distance2d( old_position, new_position ); if( distance == 0 ) { my_afk_camp_time++; } else { my_afk_camp_time = 0; have_i_been_warned = false; } if( my_afk_camp_time == camp_time && !have_i_been_warned ) { self IprintLnBold("^1Anti-Camp Software ^7Initiated"); self IprintLnBold("^710 seconds to move!"); have_i_been_warned = true; } if( my_afk_camp_time == ( camp_time + 10 ) && have_i_been_warned ) { self IprintLnBold("^7You will be moved to spectators for ^1AFK ^7/ ^1Camping^7!"); wait 2; self.sessionteam = "spectator"; self.sessionstate = "spectator"; self [[level.spawnSpectator]](); iPrintln("^3" +self.name + " ^7was moved to spectator by ^1Anti-Camp Software!"); } } } Adding the above from JeeNNN:] simply crashes the server.
  13. Also learning the scripting side of life but using OpenWarfare MoD it is a completely different ball game.
  14. if ( class == "sniper" ) { You system afk } I think this would solve your problem, just add the camper code inside and that's it
  15. search these forums - you will get the hang on scripting and how to fix errors this is where I started https://github.com/callofduty4x/CoD4x_Server/blob/202c06a7d6c970d258ecb84184114a726a524f8d/scriptdocumentation/ScriptingGuide.md
  16. What's your current code look like? You can simply make a function called hasSniper that returns true and have it respond the way you want.
  17. Does anyone have a simple way to have the standard AFK Anti Camp code from applying to players using sniper rifles?
  18. Hi, Just joined, and I wanted to thank you for making all of this. I can't believe this has been going on (behind my back.) I had a server when COD4 came out but it seemed everyone moved on, so I shut it down. Recently I put up a COD4x server (Maxx Powr's Crouch) server at the request of my MW3 friends. (Yes, I know many hate crouch. Bring on the hate, I'm used to it.) I've been playing on an MW3 crouch server for a few years now with people who have become friends, simply by shooting them in the face repeatedly. Who knew that was how you made friends. Granted, it's unorthodox but it works. I'm only learning and finally got the server to work, mostly. I don't understand mods and scripts, can't get anything to load without errors, but that's nothing new. At least the server is up. So, thanks for what must have taken years of work. Maxx Powr
  19. Okay so i was in my game making some changes with my sensitivity and i saw this mouse raw input option well I didn't want to enable it cause I don't really now what it is for, can someone tell me what does it do? Is it better having it on when playing? Does it cancels input lag from mouse? Please reply? Oh and smooth mouse is it good to have it enabled too?
  20. Hi, I am using Duffman's killcard and would like to remove it from the killcam, is there a way? it only shows when players kill each other, and in finalkillcam I don't want it to show up
  21. Hi Sir . Thanks for script , it works as well . Thank you so much 😘 How can i contact you bro? I need more help
  22. are you trying to make the server on a windows system or Linux system? look at https://github.com/callofduty4x/CoD4x_Server/wiki/Server-setup and https://github.com/callofduty4x/cod4x_server#setting-up-a-call-of-duty-4-server-with-cod4x-18 you can also look at http://www.kab.iogcod4.com/viewtopic.php?f=246&t=5526&p=32018#p32018 for windows http://www.kab.iogcod4.com/viewforum.php?f=256 for ubuntu for help
  1. Load more activity