name tag add ons + more features?
#1

Can you all help me with this?


I want it so that when a player is in the /minigundm (if he kils someone in this minigun deathmatch) that it sends the killer a game text saying something like “You Killed %s”

Of coarse, I want the “%s” to say the players name who he killed…

Also, I want it so that if the killer kills 5 people in a row, that his name gets changed from “whatever_tester” to “[5-Kill-Streak]whatever_tester”

But the catch is, I want the players name to lose the “[Kill-Streak]” once the player dies.

Also, if there is a way, I would like the kill streak person to have their name auto changed to how many kills he has done. So if he killed 8 ppl it wold say “[8-Kill-Streak]whatever_tester”


And lastly, I want the player and the killer to lose and gain random amounts of cash for each murder and death within the dm.

Is this all possible to be just in this dm command area?

Thanks!
-Kevin
Reply
#2

Quote:
Originally Posted by Kevin_Joshen
Посмотреть сообщение
I want it so that when a player is in the /minigundm (if he kils someone in this minigun deathmatch) that it sends the killer a game text saying something like “You Killed %s”

Of coarse, I want the “%s” to say the players name who he killed…
pawn Код:
new PlayerName[MAX_PLAYERS]; //Somewhere at the top of the script, to save for the other bits later
GetPlayerName(playerid, PlayerName[playerid], 128); //In the /minigundm, or earlier (like OnPlayerSpawn)
new DeathMessage[128];
format(DeathMessage, sizeof(DeathMessage), "You Killed %s", PlayerName[playerid]); //In the OnPlayerDeath section?
SendClientMessage(killerid, A_COLOUR, DeathMessage);
Quote:

Also, I want it so that if the killer kills 5 people in a row, that his name gets changed from “whatever_tester” to “[5-Kill-Streak]whatever_tester”

pawn Код:
new NewPlayerName[MAX_PLAYERS];
new KillStreak[MAX_PLAYERS];
format(NewPlayerName[playerid], 64, "[%s-kill-streak]%s", KillStreak[playerid], PlayerName[playerid]);
SetPlayerName(playerid, NewPlayerName);

public OnPlayerDeath(playerid, killerid, reason)
{
     KillStreak[playerid] + 1;
}
Quote:

But the catch is, I want the players name to lose the “[Kill-Streak]” once the player dies.

pawn Код:
SetPlayerName(playerid, PlayerName[playerid]);
Quote:

Also, if there is a way, I would like the kill streak person to have their name auto changed to how many kills he has done. So if he killed 8 ppl it wold say “[8-Kill-Streak]whatever_tester”

I have been thinking about this one for a while...
pawn Код:
SetTimerEx("CheckKillStreak", 10000, true, "i", playerid);

forward CheckKillStreak(playerid);
public CheckKillStreak(playerid)
{
     format(NewPlayerName[playerid], 128, "[%s-kill-streak]%s", KillStreak[playerid], PlayerName[playerid])
     SetPlayerName(playerid, NewPlayerName[playerid]);
}
Quote:

And lastly, I want the player and the killer to lose and gain random amounts of cash for each murder and death within the dm.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
     new randcash = random(250); //Max cash to give, change if needed
     GivePlayerMoney(playerid, -randcash);
     GivePlayerMoney(playerid, randcash);
}
I havent tested any of the above code, but it has been thought through quite a bit! - If anyone has a better code, or can correct me, go ahead

Thanks
Ash
Reply
#3

Killstreak is pretty easy.

pawn Код:
new KillStreak[MAX_PLAYERS];

//under OnPlayerDeath
KillStreak[killerid] ++;
KillStreak[playerid] = 0;

if(KillStreak[killerid] == 5)
{
    //What happens if killerid get a 5 killstreak without dying?
}
else if(KillStreak[killerid] == 8)
{
    //What happens if killerid get a 8 killstreak without dying?
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)