17.03.2011, 15:55
So i made a script where a player1 writes a command that kills player2..
For example:
How to create a SendDeathMessage() so this kill will be shown in kill list..
For example:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/boom", cmdtext, true, 10) == 0)
{
CreateExplosion(player2x, player2y, player2z, 7, 10.0); //this kills player 2
return 1;
}
return 0;
}
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerInRangeOfPoint(playerid,30,player2x,player2y,player2z))
{
SendDeathMessage(killer,playerid, reason); //how to set that killer is that player who wrote /boom cmd to kill player 2?
}
}
return 1;
}