Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » START_TIMER Parameters
Re: START_TIMER Parameters [message #434583 is a reply to message #434519] Wed, 11 August 2010 12:50 Go to previous messageGo to previous message
T0tNl
Messages: 63
Registered: July 2007
Karma:
Recruit
Thank you both of you, and thank's Omar, for clarifying that.
This does not seem to work, for a apperant reason . . . .
I also noticed reborn mentioned a way but I'm not to sure on how to do the "transtion" . If I use the change_character function then set_model it won't set the model to the desired model I want it'll only change the character.


.h code
class MyTimerScript : public ScriptImpClass
{
    void Created(GameObject *obj);
	Commands->Start_Timer(obj, this, 1.0f, 1); 

    void Timer_Expired(GameObject *obj, int number);
{
	if(number == 1) //if timer with number (ID) 1 ended (the 10 second timer)
	{
		Commands->Set_Model(obj, "clown"); 
	}
};


gmmain.cpp chat hook code


class testChatCommand : public ChatCommandClass {
   void Triggered(int ID,const TokenClass &Text,int ChatType) {
      GameObject *obj = Get_GameObj(ID);
float Credits = Commands->Get_Money(obj);
int Team = Get_Object_Type(obj);
Vector3 position;
position = Commands->Get_Position(obj);
{
if(Credits >= 10 && (Team == 0) ){
   Commands->Give_Money(obj,-10,false);
char message[256];
sprintf(message,"msg %s has bought a test character.", Get_Player_Name_By_ID(ID));
Console_Input(message);  
Commands->Attach_Script(obj, "MyTimerScript" , "");
Commands->Set_Position(obj,position);
   }
else{
Console_Input(StrFormat("ppage %d You need 10 credits for this selection!.",Get_Player_ID(obj)).c_str());      
}
}
   }
};
ChatCommandRegistrant<testChatCommand> testChatCommandReg("!test",CHATTYPE_ALL,0,GAMEMODE_AOW);



I really don't know what's wronge maybe I'm not attaching it correctly :L

[Updated on: Wed, 11 August 2010 12:51]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: build error
Next Topic: Update_PT_Data
Goto Forum:
  


Current Time: Wed Dec 18 02:59:57 MST 2024

Total time taken to generate the page: 0.00926 seconds