03.07.2011, 02:08
Alright, could somebody help me with creating a textdraw, that updates the players score? :3, just under the player money, if possible :3, thanks!
TextDrawSetString(Your text draw name,GetPlayerScore(playerid));
new Text:ScoreTD[MAX_PLAYERS];
public OnGameModeInit()
{
ScoreTD[playerid] = TextDrawCreate(240.0, 580.0, "~r~Your score: _");
return 1;
}
stock GivePlayerScore(playerid, score)
{
new string[1 + 6 + 18];
format(string, sizeof(string), "~r~Your score: ~w~%i", score);
TextDrawSetString(ScoreTD[playerid], string);
return SetPlayerScore(playerid, GetPlayerScore(playerid) + score));
}
//\\o_+
//\\Replace there you give someone score with "GivePlayerScore"
//\\You maybe have "SetPlayerScore(playerid, GetPlayerScore(playerid) + 1));"
//\\Change that to "GivePlayerScore(playerid, 1);"
Tested it, and I got errors, I can't add it to OnGameModeInit(); because of the playerid, so I tried it in OnPlayerConnect(playerid), and it just doesn't show? :3, please help :3
|