Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 95 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty
Category: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: use button after respawn
vinhui
General Member
Since: Apr 9, 2009
Posts: 66
Last: Jun 27, 2011
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Friday, Aug. 6, 2010 07:33 pm
hi,

i got a weired problem with my gametype.
if i just kill myself, then i respawn and when i respawn i cant use my [use] button, on nothing (doors, weapons, cars etc) before respawning i can use that button

here is some code:
Code:
respawn(noclick, delay)
{
	self endon("spawned");
	self endon("end_respawn");

	firsttime = 0;
	while(!isDefined(self.pers["weapon"])) {
		
		wait 3;
		
		if (isDefined(self.pers["weapon"]))
			break;
		
		if (firsttime < 3)
		{
			if(self.pers["team"] == "allies")
				self openMenu(game["menu_weapon_allies"]);
			else
				self openMenu(game["menu_weapon_axis"]);
		}
		firsttime++;
	
		self waittill("menuresponse");
		
		wait 0.2;
	}
	self thread spawnPlayer();
}


do i also have to post my spawnPlayer() ?
Share |
vinhui
General Member
Since: Apr 9, 2009
Posts: 66
Last: Jun 27, 2011
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Saturday, Aug. 7, 2010 07:06 am
bump
Share |
vinhui
General Member
Since: Apr 9, 2009
Posts: 66
Last: Jun 27, 2011
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Saturday, Aug. 7, 2010 10:47 am
please someone [cry]
Share |
novemberdobby
General Member
Since: Sep 17, 2006
Posts: 1965
Last: Oct 13, 2013
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Saturday, Aug. 7, 2010 08:00 pm
You've probably got a problem with a player property somewhere; I remember this would sometimes happen when I messed with player.pers["team"] or player.sessionteam. There were a load of variables, I can't remember which one affected the player in this way.
Share |
vinhui
General Member
Since: Apr 9, 2009
Posts: 66
Last: Jun 27, 2011
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Saturday, Aug. 7, 2010 08:12 pm
ow thx, then ill check them all! really thanks, now i know the real prob! [jumping]
Share |
vinhui
General Member
Since: Apr 9, 2009
Posts: 66
Last: Jun 27, 2011
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Sunday, Aug. 8, 2010 01:44 pm
i cant find the problem, i checked all the threads where the spawn thing will come though.[ohwell]

i hope you can.

here is my respawn()
Code:
respawn(noclick, delay)
{
	self endon("spawned");
	self endon("end_respawn");

	self.spawned = true;

	while(!isDefined(self.pers["weapon"])) 
	{		
		wait 3;
		
		if (isDefined(self.pers["weapon"]))
			break;
	
		self waittill("menuresponse");
		
		wait 0.2;
	}

	self thread spawnPlayer();

	if(self.pers["team"] == "axis")
	{
		if(level.thirdp > 0)
			self setClientCvar ("cg_thirdperson", 1);

		wait 0.05;
		self takeAllWeapons();
		wait 0.05;

		self setweaponslotweapon("primary","crowbar_mp");
		wait 0.05;
		self switchtoweapon("crowbar_mp");
	}
	else
	{
		if(level.thirdp > 0)
			self setClientCvar ("cg_thirdperson", 1);

		wait 0.05;
		
		self takeAllWeapons();
		wait 0.05;
		self setweaponslotweapon("primary","beer_mp");
		wait 0.05;
		self switchtoweapon("beer_mp");
	}		
}


if you need another thread please say it [idea]
Share |
vinhui
General Member
Since: Apr 9, 2009
Posts: 66
Last: Jun 27, 2011
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Sunday, Aug. 8, 2010 03:21 pm
someone please [confused]
Share |
vinhui
General Member
Since: Apr 9, 2009
Posts: 66
Last: Jun 27, 2011
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Sunday, Aug. 8, 2010 03:48 pm
may you also need my move_to_axis() ?

here it is:
Code:
move_to_axis(delay, respawnoption)
{
	self notify("spawned");
	self notify("end_respawn");
	
	resettimeout();

	if(isPlayer(self))
	{
		if(level.graceperiod <= ((getTime() - level.starttime) / 1000))
		{
			self check_delete_objective();
			self.pers["nextWeapon"] = undefined;
			self.pers["lastweapon1"] = undefined;
			self.pers["lastweapon2"] = undefined;
			self.pers["savedmodel"] = undefined;
			self.pers["team"] = "axis";
			self.sessionteam = "axis";

			self.sessionstate = "playing";
			self.spectatorclient = -1;
			self.archivetime = 0;
			self.friendlydamage = undefined;

        		       	self.pers["weapon"] = "crowbar_mp";
        		       	self.pers["weapon1"] = undefined;
       		        	self.pers["weapon2"] = undefined;
       		        	self.pers["spawnweapon"] = undefined;
		               	self.pers["savedmodel"] = undefined;
               			self.pers["secondary_weapon"] = undefined;

               			self setClientCvar("ui_allow_weaponchange", "1");

			scriptMainMenu = game["menu_weapon_axis"];

			self.headicon = maps\mp\gametypes\_rank_gmi::GetRankHeadIcon(self);
			self.headiconteam = self.pers["team"];
			self.headicon = game["headicon_axis"];

			self.pers["rank"] = maps\mp\gametypes\_rank_gmi::DetermineBattleRank(self);
			self.rank = self.pers["rank"];

			self maps\mp\gametypes\_loadout_gmi::PlayerSpawnLoadout();

			self setClientCvar("cg_objectiveText", "^2You will have to hunt on the ^3Victims^2, kill them all!");

			maps\mp\gametypes\_teams::SetSpectatePermissions();

			if(isPlayer(self))
			{
   				self setClientCvar("g_scriptMainMenu", game["menu_weapon_axis"]);
   				self openMenu(game["menu_weapon_axis"]);
				self thread respawn("auto");
			}
		}
		else
		{

			if(!isDefined(self.pers["savedmodel"]))
				maps\mp\gametypes\_teams::model();
			else
				maps\mp\_utility::loadModel(self.pers["savedmodel"]);
	
			// setup all the weapons
			self maps\mp\gametypes\_loadout_gmi::PlayerSpawnLoadout();

			self.usedweapons = false;
			thread maps\mp\gametypes\_teams::watchWeaponUsage();

			self move_to_allies();
		}
	} 
}
Share |
vinhui
General Member
Since: Apr 9, 2009
Posts: 66
Last: Jun 27, 2011
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Sunday, Aug. 8, 2010 07:17 pm
could please someone help me with this, im almost done with my gametype this is the only thing what is a problem :s [sad]
Share |
vinhui
General Member
Since: Apr 9, 2009
Posts: 66
Last: Jun 27, 2011
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Saturday, Aug. 14, 2010 09:41 am
no one can help me? [ohwell]
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty : CoDUO Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»