13.06.2011, 04:55
Can i ask, because im confused at indenting
Is this correct?
Thanks.
Is this correct?
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
if(killerid == INVALID_PLAYER_ID)
{
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
printf("%s was killed (%s)",pName,reason);
}
else
{
if(gTeam[killerid] != gTeam[playerid])
{
SendDeathMessage(killerid,playerid,reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
GivePlayerMoney(killerid, 10000);
printf("%s was killed by %s (%s)",pName,killerid,reason);
}
else
{
SendDeathMessage(killerid,playerid,reason);
printf("%s was killed by a team mate",pName);
}
}
return 1;
}