[SUGGESTION] SetPlayerKillableForPlayer - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SUGGESTION] SetPlayerKillableForPlayer (
/showthread.php?tid=198840)
[SUGGESTION] SetPlayerKillableForPlayer -
Freddy19 - 13.12.2010
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.
Re: [SUGGESTION] SetPlayerKillableForPlayer -
playbox12 - 13.12.2010
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.
Re: [SUGGESTION] SetPlayerKillableForPlayer -
[MWR]Blood - 13.12.2010
Not bad, but I don't think is really needed.
Re: [SUGGESTION] SetPlayerKillableForPlayer -
CyNiC - 13.12.2010
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;
}
Re: [SUGGESTION] SetPlayerKillableForPlayer -
Freddy19 - 13.12.2010
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).
Re: [SUGGESTION] SetPlayerKillableForPlayer -
Sergei - 13.12.2010
With your methods ****** would it be also possible to create function like SendPlayerDeathMessage?