Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » C++ void On_Player_Death???
C++ void On_Player_Death??? [message #432193] Tue, 06 July 2010 14:47 Go to previous message
MutateMeh is currently offline  MutateMeh
Messages: 11
Registered: January 2008
Karma:
Recruit
Hey, i tried to make a code that turns people on team nod when they getkilled or when they die.
This is the code i use in gmmain.cpp:

void On_Player_Death(int i,const char *Nick) {
GameObject *obj = Get_GameObj(ID);
if (Commands->Get_Player_Type(obj) == 1)
{

Commands->Attach_Script(obj, "JFW_Change_Team_On_Custom", "0");
Commands->Attach_Script(obj, "JFW_Change_Spawn_Character", "Mutant_1_Renegade");
}
};


This is the error i get:

1>.\gmmain.cpp(1303) : error C2065: 'ID' : undeclared identifier
1>Build log was saved at "file://c:\Westwood\RenegadeFDS\Server\SSGM Source\tmp\scripts\debug\BuildLog.htm"
1>SSGM - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



I asked some friend of me what's wrong, he said it's the ID wich would be correct I think xD He said the void On_Player_Death doesn't exist, I believe him, because i changed void On_Player_Join i think to player_death.. If someone of you guys would be so kind to give me the correct function how to use this?

I searched in the ssgm files but couldn't find anything.. :s


Hi.
 
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
Read Message
Read Message
Previous Topic: Lua Plugin V5
Next Topic: distance between two objects c++
Goto Forum:
  


Current Time: Tue Dec 03 00:10:08 MST 2024

Total time taken to generate the page: 0.01233 seconds