25.11.2012, 10:29
(
Последний раз редактировалось MovieDrifting; 01.02.2013 в 05:11.
)
[CENTER][B]
my first filterscript
my first filterscript
pawn Код:
#include <a_samp>
new file[256];
new kills[MAX_PLAYERS] = 0;
new n[MAX_PLAYERS][MAX_PLAYER_NAME+1];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("VS - filterscript: Killing Spree");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
kills[playerid] ++;
kills[playerid] =0;
GetPlayerName(playerid,n[playerid],MAX_PLAYER_NAME);
if(kills[killerid] == 1)
{
format(file, 128, "~r~( %s )\n 1 Kill", n[playerid]);
GameTextForAll(file, 2000,3);
}
if(kills[killerid] == 2)
{
PlayAudioStreamForPlayer(playerid,"http://k003.kiwi6.com/hotlink/j60i1k2ki1/double_kill.mp3");//2 kills
ClearPlayerChatBox(playerid);
format(file, 128, "~r~( %s )\n 2 Kills", n[playerid]);
GameTextForAll(file, 2000,3);
}
if(kills[killerid] == 3)
{
PlayAudioStreamForPlayer(playerid,"http://k003.kiwi6.com/hotlink/mxb5998qkx/thirple_kill.mp3");//3 kills
ClearPlayerChatBox(playerid);
format(file, 128, "~r~( %s )\n 3 Kills", n[playerid]);
GameTextForAll(file, 2000,3);
}
if(kills[killerid] == 4)
{
PlayAudioStreamForPlayer(playerid,"http://k003.kiwi6.com/hotlink/1lx28y6247/kill_joy_kill.mp3");//4 kills
ClearPlayerChatBox(playerid);
format(file, 128, "~r~( %s )\n 4 Kills", n[playerid]);
GameTextForAll(file, 2000,3);
}
if(kills[killerid] == 5)
{
PlayAudioStreamForPlayer(playerid,"http://k003.kiwi6.com/hotlink/n0a8cvk57g/killing_frezy_kill.mp3");//5 kills
ClearPlayerChatBox(playerid);
format(file, 128, "~r~( %s )\n 5 Kill", n[playerid]);
GameTextForAll(file, 2000,3);
}
if(kills[killerid] == 6)
{
PlayAudioStreamForPlayer(playerid,"http://k003.kiwi6.com/hotlink/uj4qxc08gf/rampage_kill.mp3");//6 kills
ClearPlayerChatBox(playerid);
format(file, 128, "~r~( %s )\n 6 Kills", n[playerid]);
GameTextForAll(file, 2000,3);
}
if(kills[killerid] == 7)
{
PlayAudioStreamForPlayer(playerid,"http://k003.kiwi6.com/hotlink/i9v5xhxj68/untouchable_kill.mp3");//7 kills
ClearPlayerChatBox(playerid);
format(file, 128, "~r~( %s )\n 7 Kills", n[playerid]);
GameTextForAll(file, 2000,3);
}
if(kills[killerid] == 8)
{
PlayAudioStreamForPlayer(playerid,"http://k003.kiwi6.com/hotlink/770c0wse49/killpopo_kill.mp3");//8 kills
ClearPlayerChatBox(playerid);
format(file, 128, "~r~( %s )\n 8 Kills", n[playerid]);
GameTextForAll(file, 2000,3);
}
if(kills[killerid] == 9)
{
PlayAudioStreamForPlayer(playerid,"http://k003.kiwi6.com/hotlink/mcws4ioj0q/runingriot_kill.mp3");//9 kills
ClearPlayerChatBox(playerid);
format(file, 128, "~r~( %s )\n 9 Kills", n[playerid]);
GameTextForAll(file, 2000,3);
}
if(kills[killerid] == 10)
{
PlayAudioStreamForPlayer(playerid,"http://k003.kiwi6.com/hotlink/y19b1e586i/perfection_kill.mp3");//10 kills
ClearPlayerChatBox(playerid);
format(file, 128, "~r~( %s )\n 10 Kills", n[playerid]);
GameTextForAll(file, 2000,3);
}
return 1;
}
stock ClearPlayerChatBox(playerid)
{
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
SendClientMessage(playerid,0," ");
return 1;
}