lukluk Posted June 26, 2007 Share Posted June 26, 2007 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 ! Link to comment Share on other sites More sharing options...
DarthDie Posted June 26, 2007 Share Posted June 26, 2007 You never made "anim" anything...its supposed to be a int: void Svcmd_taunt_f(void) { if (trap_Argc() < 2) { int anim = BOTH_GESTURE1; return; } } [/Code] Also this will not set the players anim....I dont have the function name off the top of my head that will.... Link to comment Share on other sites More sharing options...
lukluk Posted July 11, 2007 Author Share Posted July 11, 2007 lol why player dont use animation when i type /taunt2 in console with using this code void Svcmd_taunt2_f(void) { if (trap_Argc() < 2) { int anim = BOTH_GESTURE1; return; } } Link to comment Share on other sites More sharing options...
Griswald Posted July 12, 2007 Share Posted July 12, 2007 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 =) Link to comment Share on other sites More sharing options...
ensiform Posted July 13, 2007 Share Posted July 13, 2007 You're also not calling that function when the player had typed /taunt2 anyway. :| *cough* ClientCommand *cough* Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.