Help textraw scoring
#2

Main Issue
Look at this line:
pawn Код:
format(string,sizeof(string),"~w~%d",GetPlayerScore(playerid));
You're just showing the player's score, so of course it's not going to include the '/15' part. What is that for anyway? I assume 15 is the score at which the player wins the match. You need to add that to the format().

Other issues
- Please use [ pawn ] tags, not [ code ]. Code tags don't including syntax highlighting.
- Always put a space after a comma. It helps readability.
- Name variables better. 'Textdraw1', 'Textdraw2' is not good at all. How are you meant to know which is which? Give them descriptive names, for example 'TD_PlayerKDRatio'. The TD_ prefix denotes that it is a textdraw.
- Why are you defining two strings? You only need one. And it doesn't need to be 128 characters, that's way too much.
- You could (not should - could) use player textdraws for this.
Reply


Messages In This Thread
Help textraw scoring - by gotwarzone - 22.03.2014, 17:31
Re: Help textraw scoring - by MP2 - 23.03.2014, 06:09

Forum Jump:


Users browsing this thread: 1 Guest(s)