Hp/Ap in ScoreTable !

Results 1 to 8 of 8
  1. #1
    Currently Stoned ! Ronny786 is offline
    MemberRank
    Dec 2011 Join Date
    Lost WorldLocation
    984Posts

    idea Hp/Ap in ScoreTable !

    sup guys ... ? i was just wondering that Hp/AP statistics should be added in scoretable.. nothing new.. i saw this thing in george's source i guess.. nvm .. i was just trying to compile the thing i described in title.. here's the below code :

    x=ITEM_XPOS[7]+0.03f;
    sprintf(szText,"%s/%s",ZGetGame()->m_pMyCharacter->GetHP(), ZGetGame()->m_pMyCharacter->GetAP());

    Can anyone tell me is this code correct ?? Cause i compiled it successfully but when i start the game, it loads the map and crashes ! .dmp file also says nothing LOL !

    Just explain me the code !


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

    Re: Hp/Ap in ScoreTable !

    %d (int)

    But it won't update lol. It will show all as your hp/ap. you gotta use ZCharacter class :
    ZCharacter* pChar = ZGetGame()->m_pMyCharacter;
    pChar->GetHP(); plus you gotta add it as pItem like kills, death, exp, etc to make it update
    Last edited by qet123; 25-08-12 at 10:42 AM.

  3. #3
    Currently Stoned ! Ronny786 is offline
    MemberRank
    Dec 2011 Join Date
    Lost WorldLocation
    984Posts

    Re: Hp/Ap in ScoreTable !

    Quote Originally Posted by qet123 View Post
    %d (int)

    But it won't update lol. It will show all as your hp/ap. you gotta use ZCharacter class :
    ZCharacter* pChar = ZGetGame()->m_pMyCharacter;
    pChar->GetHP(); plus you gotta add it as pItem like kills, death, exp, etc to make it update

    if u dont mind , can u just pm me the full code for it... LOL my HP/AP is showing 1036999 in scoretaable xD

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

    Re: Hp/Ap in ScoreTable !

    Quote Originally Posted by Ronny786 View Post
    if u dont mind , can u just pm me the full code for it... LOL my HP/AP is showing 1036999 in scoretaable xD
    Just see how kills, death coded.

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

    Re: Hp/Ap in ScoreTable !

    Quote Originally Posted by qet123 View Post
    %d (int)

    But it won't update lol. It will show all as your hp/ap. you gotta use ZCharacter class :
    ZCharacter* pChar = ZGetGame()->m_pMyCharacter;
    pChar->GetHP(); plus you gotta add it as pItem like kills, death, exp, etc to make it update
    That's because ZCharacter and ZMyCharacter are different classes.

    Quote Originally Posted by Ronny786 View Post
    if u dont mind , can u just pm me the full code for it... LOL my HP/AP is showing 1036999 in scoretaable xD
    You need to typecast the floats to integers.

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

    Re: Hp/Ap in ScoreTable !

    Quote Originally Posted by Vusion View Post
    That's because ZCharacter and ZMyCharacter are different classes.



    You need to typecast the floats to integers.
    I know that, you can see that i wrote he gotta use ZCharacter class.

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

    Re: Hp/Ap in ScoreTable !

    Quote Originally Posted by qet123 View Post
    I know that, you can see that i wrote he gotta use ZCharacter class.
    Oh, my bad, didn't notice you did.

  8. #8
    Currently Stoned ! Ronny786 is offline
    MemberRank
    Dec 2011 Join Date
    Lost WorldLocation
    984Posts

    Re: Hp/Ap in ScoreTable !

    Thanks for help !! Fixed up !



Advertisement