Quote:
Originally Posted by SilentHuntR
well then add the following:
pawn Код:
//Outside of any callbacks new Kills[MAX_PLAYERS]; //Kills count new Deaths[MAX_PLAYERS]; //Deaths count new Text:KillsDeathsText[MAX_PLAYERS]; //The textdraw it will go on
//OnGameModeInit OnGameModeInit() { for(new playerid;playerid<MAX_PLAYERS;playerid++)KillsDeathsText[playerid]=TextDrawCreate(10.0,460.0,"-"); }
//OnPlayerConnect OnPlayerConnect(playerid) { Kills[playerid]=0; Deaths[playerid]=0; }
//the previous code given //OnPlayerDeath OnPlayerDeath(playerid,killerid,reason) { Kills[killerid]++; Deaths[playerid]++; new string[100]; format(string,sizeof(string),"Kills:%d -- Deaths:%d",Kills[playerid],Deaths[playerid]); TextDrawSetString(KillsDeathsText[playerid],string); format(string,sizeof(string),"Kills:%d -- Deaths:%d",Kills[killerid],Deaths[killerid]); TextDrawSetString(KillsDeathsText[killerid],string); }
I'm only not inserting indentation because I'm typing this into the post window and not in pawn, I can't hit TAB =(
|
Yeh I know, forums ruin indentationz, thanks for the help!!