How need make "End Killstreak"
#1

Hi
How need make if player reach for example 4ks and more, i kill him message send "Player Blalbla ended Bsdfsd killstreak" and achieve same exp how many ks he did for example 4ks = 4exp 5ks = 5exp 6ks = 6exp and etc
Reply
#2

uhh...

What's your code like?
Reply
#3

Код:
    new kstring[256];
    switch(pInfo[killerid][Killstreak])
    {
        case 5: format(kstring,sizeof(kstring),""chat""COL_GREEN" %s has achieved a 5 killstreak "COL_WHITE"(+5 XP)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 5;
Reply
#4

Bump
Reply
#5

Just send a message (killerid) has killed (playerid) and ended his kill strike of bla bla. got it ?
Reply
#6

Quote:
Originally Posted by Hunud
Посмотреть сообщение
Just send a message (killerid) has killed (playerid) and ended his kill strike of bla bla. got it ?
Well its not so easy as it look. First how need check are player in killstreak because if i kill player without kills it will send message, so it shit dude.
Reply
#7

Example like this! You just need to set your variables

if(pInfo[killerid][Killstreak])
{
format(text, sizeof(text), "%s killing spree has been ended by %s", PlayerName1(playerid) PlayerName2(killerid));
SendClientMessageToAll(playerid, text);
}
Reply
#8

Quote:
Originally Posted by Hunud
Посмотреть сообщение
Example like this! You just need to set your variables

if(pInfo[killerid][Killstreak])
{
format(text, sizeof(text), "%s killing spree has been ended by %s", PlayerName1(playerid) PlayerName2(killerid));
SendClientMessageToAll(playerid, text);
}
So how should i put those variable if there are just case?
Код:
    new kstring[256];
    switch(pInfo[killerid][Killstreak])
    {
        case 5: format(kstring,sizeof(kstring),""chat""COL_GREEN" %s has achieved a 5 killstreak "COL_WHITE"(+5 XP)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 5;
        case 10: format(kstring,sizeof(kstring),""chat""COL_GREEN" %s has achieved a 10 killstreak "COL_WHITE"(+10 XP)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 10;
So the important part how need get player kills and give the same exp if you kill him like example he made 4kills, i kill him i get 4exp ant etc so if he do <4 lower then 4ks this "End Killstreak" doesnt show up.
Reply
#9

Honestly, it's just a simple if-statement.
Код:
If player-who-died has killstreak greater than or equal to 5 then send message: player-who-died's killstreak was ended by player-who-killed.
Код:
if(pInfo[playerid][Killstreak] >= 5)
{
    printf("%d has ended the killstreak of %d", killerid, playerid);
}
Reply
#10

Quote:
Originally Posted by Vince
Посмотреть сообщение
Honestly, it's just a simple if-statement.
Код:
If player-who-died has killstreak greater than or equal to 5 then send message: player-who-died's killstreak was ended by player-who-killed.
Код:
if(pInfo[playerid][Killstreak] >= 5)
{
    printf("%d has ended the killstreak of %d", killerid, playerid);
}
Bat is there no easer way? because i have max 120ks so i need make each different checking? Because i want make not like this 5,10,15,20,etc i want make 5,6,7,8,9,10,etc so if i make it with different checking it will take thousands of lines
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)