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