How To make a command that changes an aponennt hp and ap.

Page 1 of 2 12 LastLast
Results 1 to 25 of 27
  1. #1
    Account Upgraded | Title Enabled! Rejain is offline
    MemberRank
    Jul 2012 Join Date
    201Posts

    big grin How To make a command that changes an aponennt hp and ap.

    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


  2. #2
    Account Upgraded | Title Enabled! ofiritsmeeee is offline
    MemberRank
    Sep 2011 Join Date
    274Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by Rejain View Post
    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
    I already done /maxhp <playername> which heals your char to your max HP and ap..
    Just Use :
    Code:
    ZGetGame()->m_pMyCharacter->SetHP(ZGetGame()->m_pMyCharacter->GetMaxHP());
    ZGetGame()->m_pMyCharacter->SetAP(ZGetGame()->m_pMyCharacter->GetMaxAP());

  3. #3
    Account Upgraded | Title Enabled! Rejain is offline
    MemberRank
    Jul 2012 Join Date
    201Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by ofiritsmeeee View Post
    I already done /maxhp <playername> which heal your char to your max HP and ap..
    Cool, but the point here is that you enter your custom amount of hp
    not maxhp
    btw its not that hard ....

  4. #4
    Fuck Army. sahar042 is offline
    MemberRank
    Jul 2009 Join Date
    833Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by Rejain View Post
    Cool, but the point here is that you enter your custom amount of hp
    not maxhp
    btw its not that hard ....
    Use paramater to do it.

  5. #5
    Account Upgraded | Title Enabled! Rejain is offline
    MemberRank
    Jul 2012 Join Date
    201Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by sahar042 View Post
    Use paramater to do it.
    Thats what i want to know how to do, im not sure how to do it ? whould i add a variable in ZCharacter.h and use seomthing like the Godmode command ?

  6. #6
    Account Upgraded | Title Enabled! ofiritsmeeee is offline
    MemberRank
    Sep 2011 Join Date
    274Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by Rejain View Post
    Thats what i want to know how to do, im not sure how to do it ? whould i add a variable in ZCharacter.h and use seomthing like the Godmode command ?
    int numhp;
    int numap;
    would help.

    Quote Originally Posted by sahar042 View Post
    Use paramater to do it.
    BTW sahar , could you give me the HEX color was on game-servGunz for VIP's?

  7. #7
    Account Upgraded | Title Enabled! Rejain is offline
    MemberRank
    Jul 2012 Join Date
    201Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by ofiritsmeeee View Post
    int numhp;
    int numap;
    would help.



    BTW sahar , could you give me the HEX color was on game-servGunz for VIP's?
    To make this easier ill just post my code and then help me.
    Code:
    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;
    		}
    	}
    }
    now im not sure what to add in ZChat_Cmds.cpp
    any help ?

  8. #8
    Account Upgraded | Title Enabled! ofiritsmeeee is offline
    MemberRank
    Sep 2011 Join Date
    274Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by Rejain View Post
    To make this easier ill just post my code and then help me.
    Code:
    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;
    		}
    	}
    }
    now im not sure what to add in ZChat_Cmds.cpp
    any help ?
    -_-'
    you're doing it wrong , why are you using ENABLE\DISABLE COMMAND?

  9. #9
    Account Upgraded | Title Enabled! Rejain is offline
    MemberRank
    Jul 2012 Join Date
    201Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by ofiritsmeeee View Post
    -_-'
    you're doing it wrong , why are you using ENABLE\DISABLE COMMAND?
    I can change it, btw i dont really know how to make other commands LOL
    THATS WHY I OPENED THE THREAD TO KNOW HOW TO MAKE A DIFFRENT KIND OF COMMAND

  10. #10
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: How To make a command that changes an aponennt hp and ap.

    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)

  11. #11
    Account Upgraded | Title Enabled! ofiritsmeeee is offline
    MemberRank
    Sep 2011 Join Date
    274Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by Rejain View Post
    I can change it, btw i dont really know how to make other commands LOL
    THATS WHY I OPENED THE THREAD TO KNOW HOW TO MAKE A DIFFRENT KIND OF COMMAND
    You need to make the command like that:
    Code:
    char* szTargetName = argv[1];
    Your code is very wrong because the command is ENABLE\DISABLE.

  12. #12
    Account Upgraded | Title Enabled! Rejain is offline
    MemberRank
    Jul 2012 Join Date
    201Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by qet123 View Post
    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 ?
    Code:
    ZGetGame()->m_pMyCharacter->SetHP(0);
    If you do, what do i put in the () ?? if i want it to make it change by whatever the player wants
    Code:
    ZGetGame()->m_pMyCharacter->SetHP("%d" || "%s" || "%i");
    what to use im not sure ..
    Thanks anyway.

    Quote Originally Posted by ofiritsmeeee
    Your code is very wrong because the command is ENABLE\DISABLE.
    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 anyway

    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
    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);
    }
    Now, i know that its immpossible to convert a flaot to a character, but i dont know what to do any ideas ?
    Last edited by Rejain; 10-01-13 at 08:02 PM.

  13. #13
    Account Upgraded | Title Enabled! ofiritsmeeee is offline
    MemberRank
    Sep 2011 Join Date
    274Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by Rejain View Post
    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 ?
    Code:
    ZGetGame()->m_pMyCharacter->SetHP(0);
    If you do, what do i put in the () ?? if i want it to make it change by whatever the player wants
    Code:
    ZGetGame()->m_pMyCharacter->SetHP("%d" || "%s" || "%i");
    what to use im not sure ..
    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 anyway

    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
    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);
    }
    Now, i know that its immpossible to convert a flaot to a character, but i dont know what to do any ideas ?
    You're still doing it wrong..
    You need a packet for that , not all the function is in the ZchatCMDS.CPP.

  14. #14
    Account Upgraded | Title Enabled! Rejain is offline
    MemberRank
    Jul 2012 Join Date
    201Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by ofiritsmeeee View Post
    You're still doing it wrong..
    You need a packet for that , not all the function is in the ZchatCMDS.CPP.
    OMG.. i made this thread so people will HELP ME not tell me if im doing it wrong or right ..

  15. #15
    Fuck Army. sahar042 is offline
    MemberRank
    Jul 2009 Join Date
    833Posts

    Re: How To make a command that changes an aponennt hp and ap.

    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.

  16. #16
    Account Upgraded | Title Enabled! Rejain is offline
    MemberRank
    Jul 2012 Join Date
    201Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by sahar042 View Post
    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.
    Lol, all im asking for is an example for parameters and how to use them, is that such a big request ?
    You know what, i am even working on an easier example.
    Code:
    void kill(const char* line, const int argc, char **const argv)
    {
        if (argc < 2)
        {
           ZChatOutput("^2Please enter a player name !", ZChat::CMT_SYSTEM);
    		return;
        }
    	char szMsg[256];
    	char* szTargetName = argv[1];
    	ZCharacter* pChar = ZGetGame()->m_pMyCharacter;
    	pChar->SetHP(0);
    	pChar->SetAP(0);
    	sprintf(szMsg, "^2You have killed %s.", szTargetName);
    	ZChatOutput(szMsg);
    }
    now once i output it in game it kills me but shows that the targetname is the one who kill me.
    example :
    /kill sahar042
    sahar042 Has Defeated You.

  17. #17
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by Rejain View Post
    Lol, all im asking for is an example for parameters and how to use them, is that such a big request ?
    You know what, i am even working on an easier example.
    Code:
    void kill(const char* line, const int argc, char **const argv)
    {
        if (argc < 2)
        {
           ZChatOutput("^2Please enter a player name !", ZChat::CMT_SYSTEM);
    		return;
        }
    	char szMsg[256];
    	char* szTargetName = argv[1];
    	ZCharacter* pChar = ZGetGame()->m_pMyCharacter;
    	pChar->SetHP(0);
    	pChar->SetAP(0);
    	sprintf(szMsg, "^2You have killed %s.", szTargetName);
    	ZChatOutput(szMsg);
    }
    now once i output it in game it kills me but shows that the targetname is the one who kill me.
    example :
    /kill sahar042
    sahar042 Has Defeated You.
    Dude, by the command you only post the packet with the info, you can't kill them in the same place where the command coded, it's not actually sending it.

    Make new Packet, follow zpostwhisper

  18. #18
    Account Upgraded | Title Enabled! Rejain is offline
    MemberRank
    Jul 2012 Join Date
    201Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by qet123 View Post
    Dude, by the command you only post the packet with the info, you can't kill them in the same place where the command coded, it's not actually sending it.

    Make new Packet, follow zpostwhisper
    Dude......................................................................
    Thanks, i did that but in game it dc's me .. can you help me ? thanks.
    Last edited by Rejain; 11-01-13 at 11:40 PM.

  19. #19
    Account Upgraded | Title Enabled! ofiritsmeeee is offline
    MemberRank
    Sep 2011 Join Date
    274Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by Rejain View Post
    Dude......................................................................
    Thanks, i did that but in game it dc's me .. can you help me ? thanks.
    So you did it wrong , again.
    We are not going to post you all the source code because it was edited in like 10 files , use Qet's system.

  20. #20
    Account Upgraded | Title Enabled! Rejain is offline
    MemberRank
    Jul 2012 Join Date
    201Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by ofiritsmeeee View Post
    So you did it wrong , again.
    We are not going to post you all the source code because it was edited in like 10 files , use Qet's system.
    No, it sux.. it dosent work .....
    I AM NOT ASKING FOR YOU TO POST ME IT ONLY AN EXAMPLE OMG WHATS SO HARD TO UNDERSTAND ?!

  21. #21
    Account Upgraded | Title Enabled! ofiritsmeeee is offline
    MemberRank
    Sep 2011 Join Date
    274Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by Rejain View Post
    No, it sux.. it dosent work .....
    I AM NOT ASKING FOR YOU TO POST ME IT ONLY AN EXAMPLE OMG WHATS SO HARD TO UNDERSTAND ?!
    Qet's system works great , make a new packet and call it "Packet".
    i won't reply in this thread again.
    Oh yeah , when i was asking help and no1 helped me eventually i successed so i'll qoute what they said:
    "Shoot your computer and give up".
    Good luck.

  22. #22
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Lines will be way off.

    ZChat_Cmds.cpp, 85
    Code:
    void ChatCmd_AdminSetHP(const char* line, const int argc, char **const argv);
    ZChat_Cmds.cpp, 190
    Code:
    _CC_AC("sethp",				&ChatCmd_AdminSetHP,			CCF_ADMIN, ARGVNoMin, 2 , true,"/sethp <name> <value>", "");
    ZChat_Cmds.cpp, 1326
    Code:
    void ChatCmd_AdminSetHP(const char* line, const int argc, char **const argv)
    {
    	if (argc < 3) 
    	{
    		ZChatOutput("Use: /sethp <name> <value>.", ZChat::CMT_SYSTEM);
    		return;
    	}
    
    	ZPOSTCMD3(MC_MATCH_SET_HP, MCmdParamStr(ZGetMyInfo()->GetCharName()), MCmdParamStr(argv[1]), MCmdParamInt(atoi(argv[2])));
    }
    ZGameClient_OnCommand.cpp, 800
    Code:
    		case MC_MATCH_SET_HP:
    			{
    				if(!ZGetGame())
    					return false;
    
    				char szSenderName[128]="";
    				char szTargetName[128]="";
    				int  nHP = 0;
    				
    				pCommand->GetParameter(szSenderName, 0, MPT_STR, sizeof(szSenderName) );
    				pCommand->GetParameter(szTargetName, 1, MPT_STR, sizeof(szTargetName) );
    				pCommand->GetParameter(&nHP, 2, MPT_INT, sizeof(nHP) );
    
    				OnSetHP(szSenderName, nHP);
    
    			}
    			break;
    MSharedCommandTable.cpp, 1685
    Code:
    C(MC_MATCH_SET_HP, "Match.Set.HP", "Admin SET HP", MCDT_MACHINE2MACHINE)
    		P(MPT_STR, "SenderName")
    		P(MPT_STR, "TargetName")
    		P(MPT_INT, "Value")
    MSharedCommandTable.h, 674
    Code:
    #define MC_MATCH_SET_HP							50014  // Use the last number you have and add one to it.
    MMatchServer_OnCommand.cpp, 1010
    Code:
    		case MC_MATCH_SET_HP:
    			{
    				char szSenderName[ MAX_CHARNAME_LENGTH ]="";
    				char szTargetName[ MAX_CHARNAME_LENGTH ]="";
    				int nHP = 0;
    				
    				if (pCommand->GetParameter(szSenderName, 0, MPT_STR, MAX_CHARNAME_LENGTH ) == false) break;
    				if (pCommand->GetParameter(szTargetName, 1, MPT_STR, MAX_CHARNAME_LENGTH ) == false) break;
    				
    				pCommand->GetParameter(&nHP, 2, MPT_INT);
    
    				OnSetHP(szSenderName, szTargetName, nHP);
    			}
    			break;
    MMatchServer.cpp, 2126
    Code:
    void MMatchServer::OnSetHP(char* pszSenderName, char* pszTargetName, int nHP)
    {
    	MMatchObject* pObj = GetPlayerByName(pszSenderName);
    	if (pObj == NULL)
    		return;
    
    	if(!IsAdminGrade(pObj))
    		return;
    
    	MMatchObject* pTargetObj = GetPlayerByName(pszTargetName);
    	if (pTargetObj == NULL)
    	{
    		NotifyMessage(pObj->GetUID(), MATCHNOTIFY_GENERAL_USER_NOTFOUND);
    		return;
    	}
    
    	MCommand* pCmd = CreateCommand(MC_MATCH_SET_HP, MUID(0,0));
    	pCmd->AddParameter(new MCmdParamStr(pObj->GetName()));
    	pCmd->AddParameter(new MCmdParamStr(pszTargetName));
    	pCmd->AddParameter(new MCmdParamInt(nHP));
    	RouteToListener(pTargetObj, pCmd);
    }
    MMatchServer.h, 397
    Code:
    	void OnSetHP(char* pszSenderName, char* pszTargetName, int nHP);
    ZGameClient.cpp, 1996
    Code:
    void ZGameClient::OnSetHP(char* pszSenderName, int nHP)
    {
    	if((float)nHP > ZGetGame()->m_pMyCharacter->GetMaxHP())
    		return;
    
    	ZGetGame()->m_pMyCharacter->SetHP(nHP);
    }
    ZGameClient.h, 164
    Code:
    void OnSetHP(char* pszSenderName, int nHP);
    Last edited by Vusion; 12-01-13 at 09:52 PM.

  23. #23
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by Vusion View Post
    Lines will be way off.

    ZChat_Cmds.cpp, 85
    Code:
    void ChatCmd_AdminSetHP(const char* line, const int argc, char **const argv);
    ZChat_Cmds.cpp, 190
    Code:
    _CC_AC("sethp",				&ChatCmd_AdminSetHP,			CCF_ADMIN, ARGVNoMin, 2 , true,"/sethp <name> <value>", "");
    ZChat_Cmds.cpp, 1326
    Code:
    void ChatCmd_AdminSetHP(const char* line, const int argc, char **const argv)
    {
    	if (argc < 3) 
    	{
    		ZChatOutput("Use: /sethp <name> <value>.", ZChat::CMT_SYSTEM);
    		return;
    	}
    
    	ZPOSTCMD3(MC_MATCH_SET_HP, MCmdParamStr(ZGetMyInfo()->GetCharName()), MCmdParamStr(argv[1]), MCmdParamInt(atoi(argv[2])));
    }
    ZGameClient_OnCommand.cpp, 800
    Code:
    		case MC_MATCH_SET_HP:
    			{
    				if(!ZGetGame())
    					return false;
    
    				char szSenderName[128]="";
    				char szTargetName[128]="";
    				int  nHP = 0;
    				
    				pCommand->GetParameter(szSenderName, 0, MPT_STR, sizeof(szSenderName) );
    				pCommand->GetParameter(szTargetName, 1, MPT_STR, sizeof(szTargetName) );
    				pCommand->GetParameter(&nHP, 2, MPT_INT, sizeof(nHP) );
    
    				OnSetHP(szSenderName, nHP);
    
    			}
    			break;
    MSharedCommandTable.cpp, 1685
    Code:
    C(MC_MATCH_SET_HP, "Match.Set.HP", "Admin SET HP", MCDT_MACHINE2MACHINE)
    		P(MPT_STR, "SenderName")
    		P(MPT_STR, "TargetName")
    		P(MPT_INT, "Value")
    MSharedCommandTable.h, 674
    Code:
    #define MC_MATCH_SET_HP							50014  // Use the last number you have and add one to it.
    MMatchServer_OnCommand.cpp, 1010
    Code:
    		case MC_MATCH_SET_HP:
    			{
    				char szSenderName[ MAX_CHARNAME_LENGTH ]="";
    				char szTargetName[ MAX_CHARNAME_LENGTH ]="";
    				int nHP = 0;
    				
    				if (pCommand->GetParameter(szSenderName, 0, MPT_STR, MAX_CHARNAME_LENGTH ) == false) break;
    				if (pCommand->GetParameter(szTargetName, 1, MPT_STR, MAX_CHARNAME_LENGTH ) == false) break;
    				
    				pCommand->GetParameter(&nHP, 2, MPT_INT);
    
    				OnSetHP(szSenderName, szTargetName, nHP);
    			}
    			break;
    MMatchServer.cpp, 2126
    Code:
    void MMatchServer::OnSetHP(char* pszSenderName, char* pszTargetName, int nHP)
    {
    	MMatchObject* pObj = GetPlayerByName(pszSenderName);
    	if (pObj == NULL)
    		return;
    
    	if(!IsAdminGrade(pObj))
    		return;
    
    	MMatchObject* pTargetObj = GetPlayerByName(pszTargetName);
    	if (pTargetObj == NULL)
    	{
    		NotifyMessage(pObj->GetUID(), MATCHNOTIFY_GENERAL_USER_NOTFOUND);
    		return;
    	}
    
    	MCommand* pCmd = CreateCommand(MC_MATCH_SET_HP, MUID(0,0));
    	pCmd->AddParameter(new MCmdParamStr(pObj->GetName()));
    	pCmd->AddParameter(new MCmdParamStr(pszTargetName));
    	pCmd->AddParameter(new MCmdParamInt(nHP));
    	RouteToListener(pTargetObj, pCmd);
    }
    MMatchServer.h, 397
    Code:
    	void OnSetHP(char* pszSenderName, char* pszTargetName, int nHP);
    you forgot the most really important part..

  24. #24
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: How To make a command that changes an aponennt hp and ap.

    Quote Originally Posted by qet123 View Post
    you forgot the most really important part..
    Don't have VS2003 installed, I just used Notepad to get these codes.
    I may have forgotten something, but I don't care.

    Edit; thought there was a function called OnSetHP.

  25. #25
    Account Upgraded | Title Enabled! Wish Q is offline
    MemberRank
    Jul 2012 Join Date
    LiveScoreLocation
    456Posts

    Re: How To make a command that changes an aponennt hp and ap.

    so this is also not save?



Page 1 of 2 12 LastLast

Advertisement