05.01.2013, 04:13
Hello Guys,
i need a Textdraw in which it should show :
Player Name : Their Kill streak.
It should be Like this :

My Kill streak System:
Hope you will Help me!
i need a Textdraw in which it should show :
Player Name : Their Kill streak.
It should be Like this :

My Kill streak System:
Code:
new killstreak[MAX_PLAYERS];
//OnplayerConnect:
killstreak[playerid] = 0;
//OnPlayerDisconnect:
killstreak[playerid] = 0;
//OnPlayerDeath:
HandleKS(playerid, killerid);
stock HandleKS(playerid, killerid) //put this function outside of any callbacks or functions
{
killstreak[playerid] = 0;
killstreak[killerid] ++;
new msg1[64], msg2[64], name1[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME];
GetPlayerName(playerid, name1, strlen(name1));
GetPlayerName(playerid, name2, strlen(name2));
format(msg1, strlen(msg1), "%s has ended %s's killstreak", name2, name1);
format(msg2, strlen(msg2), "%s is now on a killsreak of %i", name2, killstreak[killerid]);
SendClientMessageToAll(COLOR_CYAN, msg1);
SendClientMessageToAll(COLOR_CYAN, msg2);
switch(killstreak[killerid])
{
case 3:
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s is now on a Killstreak of 3 Kills.",pName);
SendClientMessageToAll(COLOR_CYAN,string);
}
case 4:
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s is now on a Killstreak of 4 Kills.",pName);
SendClientMessageToAll(COLOR_CYAN,string);
}
case 5:
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s is now on a Killstreak of 5 Kills.",pName);
SendClientMessageToAll(COLOR_CYAN,string);
}
case 6:
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s is now on a Killstreak of 6 Kills.",pName);
SendClientMessageToAll(COLOR_CYAN,string);
}
case 7:
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s is now on a Killstreak of 7 Kills.",pName);
SendClientMessageToAll(COLOR_CYAN,string);
}
case 8:
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s is now on a Killstreak of 8 Kills.",pName);
SendClientMessageToAll(COLOR_CYAN,string);
}
case 9: //change the numbers as desired and add/remove as many as you want
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s is now on a Killstreak of 9 Kills.",pName);
SendClientMessageToAll(COLOR_CYAN,string);
}
}
return 1;
}

