06.03.2011, 20:59
Hello, for exemple if I have :
How to use the number of kills in a text like SendClientMessage or ShowPlayerDialog ?
Код:
OnPlayerDeath - Kills[killerid]++;
OnPlayerDeath - Kills[killerid]++;
new KillingSpree[MAX_PLAYERS]//at top
KillingSpree[killerid] ++;
KillingSpree[playerid] = 0;
if(KillingSpree[killerid] == 5)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(killerid,name,sizeof(name));
new streaktxt[128];
format(streaktxt,sizeof(streaktxt),"~b~NEWS FLASH:~w~ %s is on a Killing Spree. Kills: %d",name,KillingSpree[killerid]);
TextDrawSetString(YOUR_TEXTDRAW,streaktxt);
}
else if(KillingSpree[killerid] == 10)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(killerid,name,sizeof(name));
new streaktxt[128];
format(streaktxt,sizeof(streaktxt),"~b~NEWS FLASH:~w~ %s is on a Killing Spree. Kills: %d",name,KillingSpree[killerid]);
TextDrawSetString(YOUR_TEXTDRAW,streaktxt);
}
And so on...