Hi, im using a1tl4's room tag and i want to convert it into a command, i dont know how to do it, like how to change hp and ap, to add 2 paramters to the command for example :
/sethpap Rejain 120 100
you guys got it ?
Thanks for the helpers hahaha![]()
Hi, im using a1tl4's room tag and i want to convert it into a command, i dont know how to do it, like how to change hp and ap, to add 2 paramters to the command for example :
/sethpap Rejain 120 100
you guys got it ?
Thanks for the helpers hahaha![]()
To make this easier ill just post my code and then help me.
now im not sure what to add in ZChat_Cmds.cppCode:void ZCharacter::SetHPAp() { int newhp = 0; int newap = 0; if(ZGetConfiguration()->GetEtc()->bsethpap) { if(newhp > 0) { m_Property.fMaxHP.Set_CheckCrc(newhp); m_fPreMaxHP = newhp; } if(newap > 0) { m_Property.fMaxAP.Set_CheckCrc(newap); m_fPreMaxAP = newap; } else { m_Property.fMaxHP.Set_CheckCrc(pCharInfo->nHP + fAddedHP); m_fPreMaxHP = pCharInfo->nHP + fAddedHP; m_Property.fMaxAP.Set_CheckCrc(pCharInfo->nAP + fAddedAP); m_fPreMaxAP = pCharInfo->nAP + fAddedAP; } } }
any help ?
I got it, you need to do a new packet with the targetname. I may tmw share you it.
The code you posted is very very wrong. All you need is to use sethp(int)
What do you mean can you be more specific ? or maybe make a tut like you did for disable/enable only with more packets and shit ..
by the way you mean this function ?
If you do, what do i put in the () ?? if i want it to make it change by whatever the player wantsCode:ZGetGame()->m_pMyCharacter->SetHP(0);
what to use im not sure ..Code:ZGetGame()->m_pMyCharacter->SetHP("%d" || "%s" || "%i");
Thanks anyway.
ik that, thanks for helping, but what i also need is the set hp parameter and set ap parameter, which im not sure how to make, thanks anywayOriginally Posted by ofiritsmeeee
OFF TOPIC :
im using iGunz website, and it dosent work in chrome any fix ?
EDIT : i have been working on it, and i am trying to build this code in ZChat_Cmds.cpp
Now, i know that its immpossible to convert a flaot to a character, but i dont know what to do any ideas ?Code:void sethp(const char* line, const int argc, char **const argv) { if (argc < 4) { ZChatOutput("^2Please enter a player name and a value of hp and ap !", ZChat::CMT_SYSTEM); return; } float newhp = 0; float newap = 0; char* szhpnum = argv[1]; char* szapnum = argv[2]; char* szTargetName = argv[3]; newhp = szhpnum; newhp = szapnum; ZGetGame()->m_pMyCharacter->SetHP(newhp); ZGetGame()->m_pMyCharacter->SetAP(newap); ZChatOutput("^2HP and AP succsessfully changed !", ZChat::CMT_SYSTEM); }
Last edited by Rejain; 10-01-13 at 08:02 PM.
We are helping to you, No one going to do it for you.
We told you to do parameter, More hint - You can copy whisper parameters and edit it.