[SUGGESTION] SetPlayerKillableForPlayer
#1

Hello,
Recently during creating of my new gamemode, I got the idea of function SetPlayerKillableForPlayer:
Код:
SetPlayerKillableForPlayer(playerid, killableplayerid, bool:killable);
For example:
Код:
SetPlayerKillableForPlayer(69, 45, false);
Now player with ID 69 can't kill player with ID 45, but other players can kill him.
Код:
SetPlayerKillableForPlayer(69, 45, true);
And now player with ID 45 is again killable.
What do You think about this function? Best Rgds.
Reply
#2

Quote:
Originally Posted by Freddy19
Посмотреть сообщение
Hello,
Recently during creating of my new gamemode, I got the idea of function SetPlayerKillableForPlayer:
Код:
SetPlayerKillableForPlayer(playerid, killableplayerid, bool:killable);
For example:
Код:
SetPlayerKillableForPlayer(69, 45, false);
Now player with ID 69 can't kill player with ID 45, but other players can kill him.
Код:
SetPlayerKillableForPlayer(69, 45, true);
And now player with ID 45 is again killable.
What do You think about this function? Best Rgds.
It may come in handy for a TDM or DM server but its possible to make it yourself aswell.
Reply
#3

Not bad, but I don't think is really needed.
Reply
#4

Nice, but you can make it(if you don't use teams in your GM):
pawn Код:
SetPlayerKillableForPlayer(victim, forplayerid, bool:killable)
{
    if(killable) SetPlayerTeam(victim, 1), SetPlayerTeam(forplayerid, 2);
    else SetPlayerTeam(victim, GetPlayerTeam(forplayerid));
    return false;
}
Reply
#5

Quote:
Originally Posted by cynic
Посмотреть сообщение
Nice, but you can make it(if you don't use teams in your GM):
pawn Код:
SetPlayerKillableForPlayer(victim, forplayerid, bool:killable)
{
    if(killable) SetPlayerTeam(victim, 1), SetPlayerTeam(forplayerid, 2);
    else SetPlayerTeam(victim, GetPlayerTeam(forplayerid));
    return false;
}
Your function will not work like I wanted. For example I present a situation:
We have three players: A, B and C. Now we want satisfy the following conditions:
- player A can kill player B
- player B can kill player A
- player C can't kill players A and B
- players A and B can't kill player C

Your function will not satisfy this conditions (I tried this way once).
Reply
#6

With your methods ****** would it be also possible to create function like SendPlayerDeathMessage?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)