20.10.2009, 16:52
Hey ther.
I need help creating a simple kill/death textdraw.
Iґve added that yet:
Well the textdraw shows up as its supposed to, but the kills/deaths wont change from 0 to the number. - why?
I need help creating a simple kill/death textdraw.
Iґve added that yet:
Код:
//At the top forward CheckLoggedInAs(playerid); new Text:LoggedInAs; new kill[MAX_PLAYERS]; new Death[MAX_PLAYERS]; //at OnGameModeInit SetTimer("CheckLoggedInAs", 1500, true); //at OnGameModeInit LoggedInAs = TextDrawCreate(497.000000,111.000000, "~r~Deaths ~b~%d~w~ - ~g~Kills ~b~%d"); //+ some other crap for the textdraw. (Proportional etc.) //Then here at OnPlayerDeath CheckLoggedInAs(); kill[killerid]++; Death[playerid]++; //And as a public.. public CheckLoggedInAs(playerid) { new string[128]; format(string, sizeof(string), "~r~Deaths ~b~%d~w~ - ~g~Kills ~b~%d" , kill[playerid], Death[playerid]); TextDrawSetString(Text:LoggedInAs, string); return 1; }