Spec problem
#5

Quote:
Originally Posted by lulo356
Посмотреть сообщение
Okay i maked a health money armour and name in textdraw for the spec command but the problem is, if you spec someone you will see your own name by Name: own health own money not from the other player, Its now in playerid, but i got the same problem by playerb, so what do i need to do to see the other guys/girls status

pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
        {
            new string[235], Float:H, Float:A;
            GetPlayerHealth([COLOR="Red"]playerid[/COLOR], H); GetPlayerArmour([COLOR="Red"]playerid[/COLOR], A);
            format(string,sizeof(string),"Health: %0.1f",H);
            TextDrawSetString(Health1, string);
            format(string,sizeof(string),"Armour: %0.1f",A));
            TextDrawSetString(Name, string);
            format(string,sizeof(string),"Money: %d",GetPlayerMoney([COLOR="Red"]playerid[/COLOR]));
            TextDrawSetString(Money, string);
            format(string,sizeof(string),"Name: %s",RPN(playerid));
            TextDrawSetString(Name, string);
        }
I think you can see the fault now. You used playerid instead of ID or any defined ID (the ID of the player the spectator is spectating). I guess you defined that as "playerb". I think you can solve the problem now.
Reply


Messages In This Thread
Spec problem - by lulo356 - 17.08.2014, 21:08
Re: Spec problem - by SnG.Scot_MisCuDI - 17.08.2014, 21:11
Re: Spec problem - by lulo356 - 17.08.2014, 21:16
Re: Spec problem - by lulo356 - 17.08.2014, 21:56
Re: Spec problem - by iSkate - 17.08.2014, 22:06
Re: Spec problem - by lulo356 - 17.08.2014, 22:25
Re: Spec problem - by iSkate - 17.08.2014, 22:43
Re: Spec problem - by Threshold - 17.08.2014, 23:02
Re: Spec problem - by lulo356 - 17.08.2014, 23:03

Forum Jump:


Users browsing this thread: 5 Guest(s)