What? Could you explain your problem a bit clearer so I can maybe help you.
ok there is a script that i need for my version of gungame. it has been give to me before but did not work so please before you give my the code see if it work. also i am putting all scripts in the _rank.gsc if it needs to go somewhere else please let me know where that file can be located or if you could put that full fills code on here and i will create it that would be fine to. sorry for being noob but i am still learning the scripting. if you are willing to explain how th script works that you send me that would be cool as well but im not saying you have to thanks in advanced.
What? Could you explain your problem a bit clearer so I can maybe help you.
i need the codes/scripted needed to not allow people to camp for more then a certain time. i have been given a code in the past to do so but it did not work so im just asking to make sure its a working code that is all
Ok Heres A Anti Camp script i found in one of the mods.
Code:#include maps\mp\gametypes\_hud_util; #include maps\mp\_utility; #include common_scripts\utility; antiAFK() { for(;;) { self.before = self getorigin(); wait 4; self.after = self getorigin(); if( ( distance(self.before, self.after) < 50) ) { self iPrintlnBold("You have been killed for camping"); self.health = int(self.health / 2); } if (self.health == 1) self suicide(); } }
put this in : \maps\mp\Mods\_AntiCamp.Gsc
Press Thanks If I Helped!
Last edited by justas1234; 09-28-2010 at 08:09 AM. Reason: .
You could put this in missions or rank
and add "self thread antiAFK();" to onplayerspawned()
if you add self endon("disconnect"); to the script
i dont completely understand what you mean by adding it could you show me fallen so i understand what u are saying. just trying to learn
add this anywhere
Code:antiAFK() { for(;;) { self endon("disconnect"); self.before = self getorigin(); wait 4; self.after = self getorigin(); if( ( distance(self.before, self.after) < 50) ) { self iPrintlnBold("You have been killed for camping"); self.health = int(self.health / 2); } if (self.health == 1) self suicide(); } }
Then add "self thread antiAFK();" to onplayerspawned()
see if it works if it don't try without self endon("disconnect");
is the onplayerspawned in the rank.gsc file somewhere?
Yes, Its Caled onplayerspawned()
put the self thread antiAFK(); below self waittill("spawned_player");
player thread doBinds();
self thread antiAFK();
player thread onPlayerSpawned();
player thread onJoinedTeam();
player thread onJoinedSpectators();
}
}
like this for the onplayerspawn part of the code
If you have a thread called doDvars() in your _rank.gsc file then the onplayerspawned() needs to look like this whit your threads :
if that dosent work delete theCode:onPlayerSpawned() { self endon("disconnect"); for(;;) { self waittill("spawned_player"); player thread doBinds(); self thread antiAFK(); player thread onJoinedTeam(); player thread onJoinedSpectators(); self thread doDvars() } }
lines.Code:player thread onJoinedTeam(); player thread onJoinedSpectators();
if you dont have doDvars() then remove the self thread doDvars() in onplayerspawned()
Press Thanks If I Helped!
--------------------------------------------------------------------------
Mah Stuff
Care Pacage Rain 2.5
Care Pacage Rain 1.0
Last edited by justas1234; 09-28-2010 at 08:50 AM.
/moved to help
Big no no! You do not delete:
And you don't put player entity threads inside a self entity thread! Leave everything as it was at the start.Code:player thread onJoinedTeam(); player thread onJoinedSpectators();
Change your onPlayerSpawned so it looks like this:
After that, add the antiAFK thread under it:Code:onPlayerSpawned() { self endon("disconnect"); for(;;) { self waittill("spawned_player"); self thread doDvars(); self thread antiAFK(); //self thread checkKick(); // Disabled Kick Menu for now //self thread displayPlayerMenu(); //self thread monitorUp(); //self thread monitorDown(); //self thread monitorLeft(); //self thread monitorB(); //self thread monitorA(); //self thread monitorX(); } }}
Code:antiAFK() { for(;;) { self.before = self getorigin(); wait 4; self.after = self getorigin(); if( ( distance(self.before, self.after) < 50) ) { self iPrintlnBold("You have been killed for camping"); self.health = int(self.health / 2); } if (self.health == 1) self suicide(); } }
Donate:
BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9
Handy Tools/Hacks:
Extreme Injector v3.7.3
A powerful and advanced injector in a simple GUI.
Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!
Minion Since: 13th January 2011
Moderator Since: 6th May 2011
Global Moderator Since: 29th April 2012
Super User/Unknown Since: 23rd July 2013
'Game Hacking' Team Since: 30th July 2013
--My Art--
[Roxas - Pixel Art, WIP]
[Natsu - Drawn]
[Natsu - Coloured]
All drawings are coloured using Photoshop.
--Gifts--
[Kyle]
Insane (09-28-2010)