Re: Rotating weapon help
Posted: July 12th, 2010, 10:19 pm
ok thx.
CoDJumper.com - For all your CoDJumping needs!
https://codjumper.com/forums/
Code: Select all
time()
{
if (!isDefined(level.timelimit_custom))
{
level.timelimit_custom = getCvarFloat("scr_dm_timelimit");
level.realtime_custom = getTime();
}
while (timeleft() > 300)
wait 1;
iPrintLnBold("5 minutes left");
wait 1;
level.timelimit_custom = getCvarFloat("scr_dm_timelimit");
//thread time(); //unlock this string if you want to let the script print it again if some admin changed (extended) timelimit after the printing
}
timeLeft()
{
if (level.timelimit != getCvarFloat("scr_dm_timelimit"))
{
level.timelimit_custom = getCvarFloat("scr_dm_timelimit");
level.realtime_custom = getTime();
}
realtime = (getTime()-level.realtime_custom)/1000;
timeleft = getCvarFloat("scr_dm_timelimit")*60 - realtime;
if (timeleft < 300) timeleft = 1000; //if timelimit is less than 5 minutes, do not let the script print anything to players
return timeleft;
}
Code: Select all
players[i] playsound("jump_pad");
Code: Select all
players[i] playLocalSound("jump_pad");
Code: Select all
main()
{
thread time();
}
time()
{
if (!isDefined(level.timelimit_custom))
{
level.timelimit_custom = getCvarFloat("scr_dm_timelimit");
level.realtime_custom = getTime();
}
while (timeleft() > 300)
wait 1;
player = getent("player","classname");
player playsound("fiveminutes");
wait 1;
level.timelimit_custom = getCvarFloat("scr_dm_timelimit");
//thread time(); //unlock this string if you want to let the script print it again if some admin changed (extended) timelimit after the printing
}
timeLeft()
{
if (level.timelimit_custom != getCvarFloat("scr_dm_timelimit"))
{
level.timelimit_custom = getCvarFloat("scr_dm_timelimit");
level.realtime_custom = getTime();
}
realtime = (getTime()-level.realtime_custom)/1000;
timeleft = getCvarFloat("scr_dm_timelimit")*60 - realtime;
if (timeleft < 300) timeleft = 1000; //if timelimit is less than 5 minutes, do not let the script print anything to players
return timeleft;
}
Code: Select all
player = getent("player","classname")