lfnetwork.com mark read register faq members calendar

Thread: What is bad here ?
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 06-26-2007, 04:43 PM   #1
lukluk
Lurker
 
Join Date: Apr 2007
Posts: 8
What is bad here ?

Code:
void Svcmd_taunt_f (void)
{
	if ( trap_Argc() < 2 ) {
		anim = BOTH_GESTURE1;
		return;
	}
}
I have 1 error in this code :
1.error C2065: 'anim' : undeclared identifier

Please help me !
lukluk is offline   you may: quote & reply,
Old 06-26-2007, 05:44 PM   #2
DarthDie
Junior Member
 
DarthDie's Avatar
 
Join Date: May 2005
Location: The Matrix
Posts: 407
You never made "anim" anything...its supposed to be a int:
Code:
void Svcmd_taunt_f(void)
{
if (trap_Argc() < 2)
{
int anim = BOTH_GESTURE1;
return;
}
}
Also this will not set the players anim....I dont have the function name off the top of my head that will....


OJP Sponsors and websites

"...and what about all those screenshots in there of DarthDie with a swastika of demo charges."
DarthDie is offline   you may: quote & reply,
Old 07-11-2007, 06:34 PM   #3
lukluk
Lurker
 
Join Date: Apr 2007
Posts: 8
lol why player dont use animation when i type /taunt2 in console with using this code
Code:
void Svcmd_taunt2_f(void)
{
if (trap_Argc() < 2)
{
int anim = BOTH_GESTURE1;
return;
}
}

Last edited by lukluk; 07-11-2007 at 06:47 PM.
lukluk is offline   you may: quote & reply,
Old 07-11-2007, 09:27 PM   #4
Griswald
 
Join Date: Aug 2002
Location: ent->ps.get_loc();
Posts: 25
you shouldn't even need the "int anim" part, but you do need to pass on the entity to the function you created. The function for animating (I believe) is G_SetAnim:

G_SetAnim(ent, &ent->client->pers.cmd, SETANIM_BOTH, BOTH_GESTURE1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 0);

However, there is also PM_SetAnim and BG_SetAnim (an NPC_SetAnim exists, but thats for npcs of course). If someone else could clarify when each instance are best used, I'm sure the Original poster would be more educated as well as the rest of us =)


-- Griswald, RKR Project Co-Leader
Griswald is offline   you may: quote & reply,
Old 07-13-2007, 03:33 PM   #5
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
You're also not calling that function when the player had typed /taunt2 anyway. :| *cough* ClientCommand *cough*


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > What is bad here ?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:25 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.