CMD:report(playerid,params[])
{
new reportedid, reporter[MAX_PLAYER_NAME],reportedname[MAX_PLAYER_NAME],str1[128],str2[128], reason[128];
if(sscanf(params,"us[128]",reportedid,reason)) return SCM(playerid,COLOR_RED,"[USAGE] /Report [ID] [Reason]");
if(reportedid == playerid) return SCM(playerid,COLOR_RED,"You can't report yourself!");
if(reportedid == INVALID_PLAYER_ID) return SCM(playerid,COLOR_RED,"Player is not online!");
else{
GetPlayerName(playerid,reporter,sizeof(reporter));
GetPlayerName(reportedid,reportedname,sizeof(reportedname));
format(str1,sizeof(str1),"* %s(%d) has reported %s(%d) (Reason: %s)",reporter,playerid,reportedname,reportedid,reason);
format(str2,sizeof(str2),"* You have reported %s(%d) (Reason: %s)",reportedname,reportedid,reason);
SCM(playerid,COLOR_YELLOW,str2);
if(IsPlayerAdmin(playerid))
{
SCM(playerid,COLOR_RED,str1);
return 1;
}}
return 1;
}
new KillStreak[MAX_PLAYERS]; // at the top
public OnPlayerDeath(playerid, killerid, reason)
{
KillStreak[playerid]++;
KillStreak[playerid] = 0;
if(KillStreak[playerid] == 1)
{
SetPlayerWantedLevel(playerid,1);
SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
return 1;
}
if(KillStreak[playerid] == 2)
{
SetPlayerWantedLevel(playerid,2);
SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
return 1;
}
if(KillStreak[playerid] == 3)
{
SetPlayerWantedLevel(playerid,3);
SetPlayerScore(playerid,GetPlayerScore(playerid)+2);
return 1;
}
if(KillStreak[playerid] == 4)
{
SetPlayerWantedLevel(playerid,4);
SetPlayerScore(playerid,GetPlayerScore(playerid)+3);
return 1;
}
if(KillStreak[playerid] == 5)
{
SetPlayerWantedLevel(playerid,5);
SetPlayerScore(playerid,GetPlayerScore(playerid)+4);
return 1;
}
if(KillStreak[playerid] == 6)
{
SetPlayerWantedLevel(playerid,6);
SetPlayerScore(playerid,GetPlayerScore(playerid)+5);
return 1;
}
return 1;
}
CMD:report(playerid,params[])
{
new reportedid, reporter[MAX_PLAYER_NAME],reportedname[MAX_PLAYER_NAME],str1[128],str2[128], reason[128];
if(sscanf(params,"us[128]",reportedid,reason)) return SCM(playerid,COLOR_RED,"[USAGE] /Report [ID] [Reason]");
if(reportedid == playerid) return SCM(playerid,COLOR_RED,"You can't report yourself!");
if(reportedid == INVALID_PLAYER_ID) return SCM(playerid,COLOR_RED,"Player is not online!");
GetPlayerName(playerid,reporter,sizeof(reporter));
GetPlayerName(reportedid,reportedname,sizeof(reportedname));
format(str1,sizeof(str1),"* %s(%d) has reported %s(%d) (Reason: %s)",reporter,playerid,reportedname,reportedid,reason);
format(str2,sizeof(str2),"* You have reported %s(%d) (Reason: %s)",reportedname,reportedid,reason);
SCM(playerid,COLOR_YELLOW,str2);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerAdmin(i)) continue;
SCM(i, COLOR_RED, str1);
}
return 1;
}
new KillStreak[MAX_PLAYERS]; // at the top
public OnPlayerDeath(playerid, killerid, reason)
{
KillStreak[killerid]++;
KillStreak[playerid] = 0;
if(KillStreak[killerid] > 0)
{
SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid)+1);
SetPlayerScore(killerid, GetPlayerScore(killerid)+KillStreak[killerid]);
return 1;
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
KillStreak[playerid]++;
KillStreak[playerid] = 0;
if(KillStreak[playerid] == 1)
new KillStreak[MAX_PLAYERS]; // at the top
public OnPlayerDeath(playerid, killerid, reason)
{
KillStreak[playerid]++;
if(KillStreak[playerid] == 1)
{
SetPlayerWantedLevel(playerid,1);
SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
return 1;
}
if(KillStreak[playerid] == 2)
{
SetPlayerWantedLevel(playerid,2);
SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
return 1;
}
if(KillStreak[playerid] == 3)
{
SetPlayerWantedLevel(playerid,3);
SetPlayerScore(playerid,GetPlayerScore(playerid)+2);
return 1;
}
if(KillStreak[playerid] == 4)
{
SetPlayerWantedLevel(playerid,4);
SetPlayerScore(playerid,GetPlayerScore(playerid)+3);
return 1;
}
if(KillStreak[playerid] == 5)
{
SetPlayerWantedLevel(playerid,5);
SetPlayerScore(playerid,GetPlayerScore(playerid)+4);
return 1;
}
if(KillStreak[playerid] == 6)
{
SetPlayerWantedLevel(playerid,6);
SetPlayerScore(playerid,GetPlayerScore(playerid)+5);
return 1;
}
return 1;
}
OnPlayerDisconnect(playerid, reason) {
KillStreak[playerid] = 0;
}
pawn Код:
lol, KillStreak[playerid] will always be 0, you need to remove KillStreak[playerid] = 0;from there and put it on OnPlayerDisconnect or something like that. |