Have a question about modding, modelling or skinning? Have a tutorial to post? Post here!
Moderator: Core Staff
-
Mox09
- CJ Wannabe
- Posts: 22
- Joined: April 9th, 2010, 8:01 am
- Location: St louis
-
Contact:
Post
by Mox09 » June 4th, 2010, 5:02 pm
Hey, guys i've been working on this cod1 mod for sometime trying to make it so the player has to stay at spawn for 60 secend so that the other team can have time to hide. is there anyway that someone can show me an easyer way to make it so it holds the player for 60 secend and after the 60 secend is up it lets them go at normal speed. the code under this is what i have so far. PLEASE HELP!!!
Code: Select all
seeker()
{
if(!isDefined(game["allies"]))
{
self.maxspeed = getEntArray( "holdplayer", "classname" );
for( i = 0; i <holdplayer.size; i++ )
if(isdefined(holdplayer[i]))
{
holdplayer[i] = true;
self delWeaps();
wait .5;
self setWeaponSlotWeapon("primary", "Seeker_mp");
self iprint1n ("You have been given a Seekers Weapon");
self.maxhealth = 1000000;
self.health = self.maxhealth;
}
wait .5;
holdplayer[i] = false;
}
}
-------------Hiders line---------->
Code: Select all
hider()
{
self delWeaps();
wait .5;
self setWeaponSlotWeapon("primary", "hider_mp");
self iprint1n ("You have been given a Hiders Weapon");
self iprint1n ("you have 60 sec to find a hiding spot!");
self.maxhealth = 100;
self.health = self.maxhealth;
}
-
xeno
- CJ Wannabe
- Posts: 38
- Joined: October 31st, 2007, 12:37 am
- Location: United States - GA
Post
by xeno » June 4th, 2010, 7:32 pm
Try this:
Code: Select all
precacheString(&"Time Remaining: ");
seeker()
{
level.seektimer = 60;
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
{
if(!isDefined(game["allies"]))
{
//Timer Hud
level.seektimerhud4 = newHudElem();
level.seektimehud.x = 580;
level.seektimerhud.y = 230;
level.seektimerhud.alignX = "center";
level.seektimerhud.alignY = "middle";
level.seektimerhud.fontScale = 1;
level.seektimerhud.color = (1, 1, 1);
level.seektimerhud.label = &"Time Remaining: ";
//Blind Hud
players[i].seekblindhud = newClientHudElem(players[i]);
players[i].seekblindhud.archived = false;
players[i].seekblindhud.x = 0;
players[i].seekblindhud.y = 0;
players[i].seekblindhud.sort = -100;
players[i].seekblindhud setShader("white", 640, 800);
players[i] takeAllWeapons();
wait .5;
players[i] setWeaponSlotWeapon("primary", "Seeker_mp");
players[i] iprintln ("You have been given a Seekers Weapon");
players[i].maxhealth = 1000000;
players[i].health = players[i].maxhealth;
players[i].maxspeed = 1;
for (k = 60; k >= 0; k--)
{
level.seektimer = k;
level.seektimerhud setValue(level.seektimer);
}
if (k <= 0)
{
players[i].maxspeed = 190;
//Destroy Huds
if (isdefined (level.seektimerhud))
level.seektimerhud destroy();
if (isdefined (players[i].seekblindhud))
players[i].seekblindhud destroy();
}
}
}
wait .5;
}
-
BatterY
- CJ Worshipper
- Posts: 238
- Joined: January 29th, 2010, 10:27 pm
Post
by BatterY » June 12th, 2010, 8:21 pm
Doesn't this belong to Modding section
-
Drofder2004
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Post
by Drofder2004 » June 13th, 2010, 11:23 am
yes.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Users browsing this forum: No registered users and 1 guest