Unfair death - 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: Unfair death (
/showthread.php?tid=445989)
Unfair death -
Ananisiki - 23.06.2013
^^^^^^^^
Re: Unfair death -
Scenario - 24.06.2013
By adding an if-statement like the one below.
pawn Код:
if(pInfo[killerid][pAdminDuty] == false)
Re: Unfair death -
nmader - 24.06.2013
Alright, first you would have to have a variable for when the administrator goes on admin duty. Then when a player dies put something
similar to this under OnPlayerDeath:
pawn Код:
if(pInfo[killerid][pAduty] == 0)
{
//Then your code
}
else
{
SendClientMessage(playerid, -1, "You have been killed unfairly, you have not lossed any money nor score");
return 1;
}
Re: Unfair death -
kaisersouse - 24.06.2013
Pseudo code:
Quote:
onplayerdeath
{
if(killerid != INVALID_PLAYER_ID)
{
if(IsPlayerAdmin(killerid)) return 1;
else
{
lose money
score--;
ShowDeathMessage
}
}
return 1;
}
|
Re: Unfair death -
[..MonTaNa..] - 24.06.2013
Explain more..