20.08.2010, 18:20
MadeMan code working. I trying to do it with TextDraw and it wont work. theres my script :
When player die or I write command to incerace value the TextDraw doesn't write new variable value. Maybe I have to update Text draw Somehow ?
Quote:
new Text:Textdraw0; new Text:Textdraw1; new zNuzudimai = 1; new mNuzudimai = 1; |
Quote:
public OnGameModeInit() { new statistika[128]; format(statistika,sizeof(statistika), "~g~Team Green Score: %d",zNuzudimai); Textdraw0 = TextDrawCreate(432.000000, 366.000000,statistika); TextDrawBackgroundColor(Textdraw0, 255); TextDrawFont(Textdraw0, 1); TextDrawLetterSize(Textdraw0, 0.500000, 1.000000); TextDrawColor(Textdraw0, -1); TextDrawSetOutline(Textdraw0, 0); TextDrawSetProportional(Textdraw0, 1); TextDrawSetShadow(Textdraw0, 1); TextDrawUseBox(Textdraw0, 1); TextDrawBoxColor(Textdraw0, 255); TextDrawTextSize(Textdraw0, 628.000000, 0.000000); new statistika1[128]; format(statistika1,sizeof(statistika1), "~b~TEAM Blue Score: %d",mNuzudimai); Textdraw1 = TextDrawCreate(432.000000, 381.000000, statistika1); TextDrawBackgroundColor(Textdraw1, 255); TextDrawFont(Textdraw1, 1); TextDrawLetterSize(Textdraw1, 0.500000, 1.000000); TextDrawColor(Textdraw1, -1); TextDrawSetOutline(Textdraw1, 0); TextDrawSetProportional(Textdraw1, 1); TextDrawSetShadow(Textdraw1, 1); TextDrawUseBox(Textdraw1, 1); TextDrawBoxColor(Textdraw1, 255); TextDrawTextSize(Textdraw1, 628.000000, 0.000000); for(new i; i < MAX_PLAYERS; i ++) { if(IsPlayerConnected(i)) { TextDrawShowForPlayer(i, Textdraw0); TextDrawShowForPlayer(i, Textdraw1); } } return 1; } public OnPlayerDeath(playerid, killerid, reason) { if (gTeam[playerid] == TEAM_M) { mNuzudimai += 1; } else if (gTeam[playerid] == TEAM_Z) { zNuzudimai += 1; } return 1; } |