27.04.2012, 15:44
Hello everybody.I make killing spree but textdraw which i add wont show i dont know why.Before I add one variable killing Spree is not working...Please help
code:
code:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new str[144];
KillingSpree[playerid] = 0;
if(KillingSpree[killerid] == 3) // It finds if the player is on a Killing Spree of 3 kills , you may change
{
new yName[MAX_PLAYER_NAME];
GetPlayerName(killerid,yName,sizeof(yName));
format(str,sizeof(str),"%s is on a killing spree (3 kills)",yName);
TextDrawSetString(KillS,str);
TextDrawShowForAll(KillS);
SetTimer("HideText",5000,0);
pStreak[killerid]++,SendClientMessage(killerid,white,""embed_yellow"[KILLSTREAK]"embed_white"You reached RPG in your killstreak"embed_blue"(/killstreak)"embed_white"!");
}
if(KillingSpree[killerid] == 6) // It finds if the player is on a Killing Spree of 3 kills , you may change
{
new yName[MAX_PLAYER_NAME];
GetPlayerName(killerid,yName,sizeof(yName));
format(str,sizeof(str),"%s is on a killing spree (6 kills)",yName);
TextDrawSetString(KillS,str);
TextDrawShowForAll(KillS);
SetTimer("HideText",5000,0);
pStreak[killerid]++;
}
if(KillingSpree[killerid] == 9) // It finds if the player is on a Killing Spree of 3 kills , you may change
{
new yName[MAX_PLAYER_NAME];
GetPlayerName(killerid,yName,sizeof(yName));
format(str,sizeof(str),"%s is on a killing spree (9 kills)",yName);
TextDrawSetString(KillS,str);
TextDrawShowForAll(KillS);
SetTimer("HideText",5000,0);
pStreak[killerid]++;
}
if(KillingSpree[killerid] == 12) // It finds if the player is on a Killing Spree of 3 kills , you may change
{
new yName[MAX_PLAYER_NAME];
GetPlayerName(killerid,yName,sizeof(yName));
format(str,sizeof(str),"%s is on a killing spree (12 kills)",yName);
TextDrawSetString(KillS,str);
TextDrawShowForAll(KillS);
SetTimer("HideText",5000,0);
pStreak[killerid]++;
}
if(KillingSpree[killerid] == 16) // It finds if the player is on a Killing Spree of 3 kills , you may change
{
new yName[MAX_PLAYER_NAME];
GetPlayerName(killerid,yName,sizeof(yName));
format(str,sizeof(str),"%s is on a killing spree (16 kills)",yName);
TextDrawSetString(KillS,str);
TextDrawShowForAll(KillS);
SetTimer("HideText",5000,0);
pStreak[killerid]++;
}
if(KillingSpree[killerid] == 18) // It finds if the player is on a Killing Spree of 3 kills , you may change
{
new yName[MAX_PLAYER_NAME];
GetPlayerName(killerid,yName,sizeof(yName));
format(str,sizeof(str),"%s is on a killing spree (18 kills)",yName);
TextDrawSetString(KillS,str);
TextDrawShowForAll(KillS);
SetTimer("HideText",5000,0);
pStreak[killerid]++;
}
return 1;
}