[HELP]How To Create Kill Streak ?? +REP
#1

Help !!!

How to create Kill Streak for my server
My Server is TDM , but the Kill Streak is bug...
When i Kill Enemies, I got a Money but I don't got a Score
Please Help Me !!!...

If Someone can fix the bug , i'll give his/her a + Rep

*SorryForMyLittleEnglish
Reply
#2

if u are talking about how to give a score to player when he kills someone then this is it--
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
 GivePlayerMoney(killerid, 10000); //change the amount to whatever u want
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
SendDeathMessage(killerid, playerid, reason);}
Reply
#3

On the top of gamemode

Код:
new KillStreak[MAX_PLAYERS];
Under OnPlayerDeath

Код:
KillStreak[killerid]++;
KillStreak[playerid] = 0; // resets killstreak after death
Under OnPlayerDisconnect

Код:
KillStreak[playerid] = 0; // to reset variable
Reply
#4

if you want to get +score then use something like this
SetPlayerScore(killerid,GetPlayerScore(killerid)+1 ); // gives player +1 score after he kills someone
Reply
#5

and for making killing streak this--
Код:
enum pInfo
{
pKillstreak
}
new PlayerInfo[MAX_PLAYERS][pInfo];
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo[playerid][pKillstreak]=0;//resets the kill streak on player death
PlayerInfo[killerid][pKillstreak]++;//increases the no. in streak on a kill
GivePlayerMoney(killerid, 10000); //change the amount to whatever u want
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
SendDeathMessage(killerid, playerid, reason);
switch(PlayerInfo[killerid][pKillstreak])
{case 5: SendClientMessage(killerid,-1,"You have killed 5 persons without being dead"); //write commands for killing 5 persons in a row
//like this add case and no. at which u want to set the streaks
}}
Reply
#6

Thanks All...
the bug is Fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)