03-07-2013, 02:32 PM
03-07-2013, 02:37 PM
Use this :
void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
Sets a checkpoint at which the player will respawn in case he dies.
Callback syntax: void MyFunc(string &in asName, int alCount)
Count is 0 on the first checkpoint load!
asName - the internal name
asStartPos - the name of the StartPos in the editor
asCallback - the function to call when the player dies/respawns
asDeathHintCat - the category of the death hint message to be used in the .lang file
asDeathHintEntry - the entry in the .lang file
void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
Sets a checkpoint at which the player will respawn in case he dies.
Callback syntax: void MyFunc(string &in asName, int alCount)
Count is 0 on the first checkpoint load!
asName - the internal name
asStartPos - the name of the StartPos in the editor
asCallback - the function to call when the player dies/respawns
asDeathHintCat - the category of the death hint message to be used in the .lang file
asDeathHintEntry - the entry in the .lang file
03-07-2013, 02:53 PM
(03-07-2013, 02:37 PM)No Author Wrote: [ -> ]Use this :Thanks, but I need a little more info, does the first code go in OnStart? do i need that setplayercallback code? where does what go?
void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
Sets a checkpoint at which the player will respawn in case he dies.
Callback syntax: void MyFunc(string &in asName, int alCount)
Count is 0 on the first checkpoint load!
asName - the internal name
asStartPos - the name of the StartPos in the editor
asCallback - the function to call when the player dies/respawns
asDeathHintCat - the category of the death hint message to be used in the .lang file
asDeathHintEntry - the entry in the .lang file
Cheers.
03-07-2013, 03:03 PM
(03-07-2013, 02:53 PM)39Gamer Wrote: [ -> ]Here is a code that i found in the dark depths of the development support section.(03-07-2013, 02:37 PM)No Author Wrote: [ -> ]Use this :Thanks, but I need a little more info, does the first code go in OnStart? do i need that setplayercallback code? where does what go?
void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
Sets a checkpoint at which the player will respawn in case he dies.
Callback syntax: void MyFunc(string &in asName, int alCount)
Count is 0 on the first checkpoint load!
asName - the internal name
asStartPos - the name of the StartPos in the editor
asCallback - the function to call when the player dies/respawns
asDeathHintCat - the category of the death hint message to be used in the .lang file
asDeathHintEntry - the entry in the .lang file
Cheers.
PHP Code:
void OnStart()
{
CheckPoint("", "PLAYERSTARTAREA", "CALLBACKFUNC", "", "");
}
void CALLBACKFUNC(string &in asName, int alCount)
{
//////////Your scripts.
}