Help On vet System [message #328032] |
Sun, 27 April 2008 09:16 |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma: 0
|
General (4 Stars) |
|
|
the vet system me and a friend are working on the one release here on the forums... we have it so when u get promoted the metal says on ur body....but the problem is we need it so that when u buy an sbh or an stank the metal goes away and only shows on on ur body with any other char....
so simple way of saying it.......
metal always shows all the characters ingame
we need to find away to make it go away when u buy an sbh and get into a stank.....then come back if u change to another char besides sbh of course
if (stricmp(Commands->Get_Preset_Name(obj),"CnC_Nod_FlameThrower_2SF") == 0) {
Commands->Destroy_Object(Commands->Find_Object(vIconID));
Commands->Destroy_Object(Commands->Find_Object(vIconID2));
}
if (stricmp(Commands->Get_Preset_Name(obj),"CnC_Nod_FlameThrower_2SF") != 0) {
int Points;
Points = VetCheckPoints(Get_Player_ID(obj));
if (Points >= 360) {
GameObject *Icon = Commands->Create_Object_At_Bone(obj,"Invisible_Object", "C R UPPERARM");
GameObject *Icon2 = Commands->Create_Object_At_Bone(obj,"Invisible_Object", "C L UPPERARM");
Commands->Attach_Script(Icon,"MDB_SSGM_Destroy_When_Object_Destroyed",ToString(Commands->Get_ID(obj)).c_str());
vIconID = Commands->Get_ID(Icon);
vIconID2 = Commands->Get_ID(Icon2);
Commands->Set_Model(Icon, "p_hemedal");
Commands->Set_Model(Icon2, "p_armedal");
Commands->Attach_To_Object_Bone(Icon, obj, "C R UPPERARM");
Commands->Attach_To_Object_Bone(Icon2, obj, "C L UPPERARM");
float Shield;
Shield = Commands->Get_Shield_Strength(obj);
Set_Max_Shield_Strength(obj, 160);
Commands->Set_Shield_Strength(obj, 160);
}
applied at Player::Created
he said heres a lil bit of it hes trying
|
|
|
|
Re: Help On vet System [message #328036 is a reply to message #328032] |
Sun, 27 April 2008 09:53 |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma: 0
|
General (4 Stars) |
|
|
still not working..
GameObject *Icon = Commands->Create_Object_At_Bone(obj,"Invisible_Object", "C R UPPERARM"); if (stricmp(Commands->Get_Preset_Name(obj),"CnC_Nod_FlameThrower_2SF") == 0) { Commands->Destroy_Object(Icon);
}
else {
Commands->Attach_Script(Icon,"MDB_SSGM_Destroy_When_Object_Destroyed",ToString(Commands->Get_ID(obj)).c_str());
vIconID = Commands->Get_ID(Icon);
Commands->Set_Model(Icon, "p_keycrd_grn");
Commands->Attach_To_Object_Bone(Icon, obj, "C R UPPERARM");
}
Quote: | The problem is
It may be destroying the new object
but its not getting rid of the one that was already there
|
thats what he stated
|
|
|
|
Re: Help On vet System [message #328116 is a reply to message #328032] |
Mon, 28 April 2008 08:22 |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma: 0
|
General (4 Stars) |
|
|
i bealive it worked i have to wait for test...new question is how can we ass a timer to the commands? so people cant keep using them every 2 seconds like when u get higher rank u get liek !weapon
|
|
|
Re: Help On vet System [message #328120 is a reply to message #328032] |
Mon, 28 April 2008 09:03 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
Using chat commands for veterans players is a bit tacky imho, no offence intended to anyone who does use this, but I just don't like it very much.
And easy way around this ssnipe is to set a boolean when the command is used, then attach a script to some gameobject that has a timer expired event. On the timer expired event set the boolean back to false.
Make one of the conditionals of using the chat hook that the boolean must be false.
|
|
|