08.02.2009, 12:56
Alright, very nice filterscript, here is a improvement:
On OnPlayerDeath you are creating the string each time, you could save a few more bytes by easily creating it once, so it would look like:
instead of:
Anyways, great filterscript
EDIT: This is no big deal though, its just that it saves bytes, thanks to Y_Less ;p
On OnPlayerDeath you are creating the string each time, you could save a few more bytes by easily creating it once, so it would look like:
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
new string[128], player[MAX_PLAYER_NAME];
if(GetPlayerWeapon(killerid) == 38)
{
GetPlayerName(playerid, player, sizeof(player));
format(string, sizeof(string), "%s died! Server Banned his attacker (reason: Minigun)", player);
SendClientMessageToAll(YELLOW, string);
Ban(killerid);
}
// ...
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPlayerWeapon(killerid) == 38)
{
new string[128], player[MAX_PLAYER_NAME];
GetPlayerName(playerid, player, sizeof(player));
format(string, sizeof(string), "%s died! Server Banned his attacker (reason: Minigun)", player);
SendClientMessageToAll(YELLOW, string);
Ban(killerid);
}
//....
EDIT: This is no big deal though, its just that it saves bytes, thanks to Y_Less ;p