[HELP]How To Create Kill Streak ?? +REP - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP]How To Create Kill Streak ?? +REP (
/showthread.php?tid=491861)
[HELP]How To Create Kill Streak ?? +REP -
WhiteAngels - 01.02.2014
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
Re: [HELP]How To Create Kill Streak ?? +REP -
BroZeus - 01.02.2014
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);}
Re: [HELP]How To Create Kill Streak ?? +REP -
ivanVU - 01.02.2014
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
Re: [HELP]How To Create Kill Streak ?? +REP -
Acres - 01.02.2014
if you want to get +score then use something like this
SetPlayerScore(killerid,GetPlayerScore(killerid)+1 ); // gives player +1 score after he kills someone
Re: [HELP]How To Create Kill Streak ?? +REP -
BroZeus - 01.02.2014
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
}}
Re: [HELP]How To Create Kill Streak ?? +REP -
WhiteAngels - 02.02.2014
Thanks All...
the bug is Fixed