Script: HOw player is dead
#6

Quote:
Originally Posted by Claude
Посмотреть сообщение
Sascha @ That way is WAY to complicated, it can be done with a few lines:

pawn Код:
new weap[20], string[128], killer, player;
GetWeaponName(reason, weap, sizeof weap);
GetPlayerName(playerid, player, sizeof player);
GetPlayerName(killerid, killer, sizeof killer);
if(killerid != INVALID_PLAYER_ID)
{
    format(string, sizeof string, "%s(%d) has killed %s(%d) %s", killer, killerid, player, playerid, weap);
    AdminMsg(string);
}
else
{
    format(string, sizeof string, "%s(%d) died", player, playerid);
    AdminMsg(string);
}
Change "AdminMsg" to the function where it sends a message to admins, the rest you have to do, bugs are easy to fix
Well I just didn't know aabout the "GetWeaponName", but nice to see this exists...

Well sure in this case your methods is ways easier...

@SworDDick:

Код:
forward AdminMsg(text[]);

public AdminMsg(text[])
{
for(new i=0; i<MAX_PLAYERS; i++)
if(IsPlayerConnected(i)){
if(YOURADMINCODE >= THE MIN. LEVEL OF THE PLAYER TO SEE THE MSG){
SendClientMessage(i, YOURCOLORCODE, text[]);
}
}
return 1;
}
and then just that what claude wrote
Reply


Messages In This Thread
Script: HOw player is dead - by SworDDicK - 04.10.2010, 15:57
Re: Script: HOw player is dead - by Sascha - 04.10.2010, 16:25
Re: Script: HOw player is dead - by SworDDicK - 04.10.2010, 16:47
Re: Script: HOw player is dead - by Claude - 04.10.2010, 17:03
Re: Script: HOw player is dead - by SworDDicK - 04.10.2010, 17:59
Re: Script: HOw player is dead - by Sascha - 04.10.2010, 18:21

Forum Jump:


Users browsing this thread: 1 Guest(s)