/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=* * Title: "Killing Spree v2.0" * * Author: Mr.GeEk * * Version SA-MP: 0.3d * * Script Type: FilterScript * * Date: 13/08/2011 * - for: sa-mp.com * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /* [Updates] In this update, add something new to play sounds through a URL, in this case plays sounds depending on the number of killings which leads, for example: one who reaches 5 murders, reproduces the sound says "Killing Spree" (one such player). */ #include //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #define BLANCO 0xEFEFF7AA new Sounds[4][] = { "http://bit.ly/mTE72G", //Sounds[0] - KillingSpree "http://bit.ly/pEeVqK",//Sounds[1] - monsterkill "http://bit.ly/pNrwNG",//Sounds[2] - Unstoppable "http://bit.ly/puy2Mp"//Sounds[3] - Ultrakill };
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= public OnPlayerConnect(playerid) { SetPVarInt(playerid,"KillingSpree",0); return 1; } //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= public OnPlayerDeath(playerid, killerid, reason) { if(playerid != INVALID_PLAYER_ID && killerid != INVALID_PLAYER_ID) { new Kills, string[128];
Kills = GetPVarInt(killerid, "KillingSpree") + 1;//+1 add murder to the murderer SetPVarInt(playerid,"KillingSpree",0);//Kills reset to 0 for the victim SetPVarInt(killerid,"KillingSpree",Kills);
if(Kills == 5) format(string,sizeof string,"<< {FF0000}%s(%d) KillingSpree!! with {ffffff}%d {FF0000}Kills",Nombre(killerid),killerid,Kills);
} return 1; } //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= public OnFilterScriptInit() { for(new id = 0; id < MAX_PLAYERS; id++) SetPVarInt(id,"KillingSpree",0);//reset the variable if you recharged again the FS
return 1; } //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= stock Reward(killerid,Kills) { if(Kills == 5) { //reward you want to give it, give example 5 grenades GivePlayerWeapon(killerid, 16, 5); }
else if(Kills == 10) { //Reward you want to give it }
else if(Kills == 15) { //Reward you want to give it }
else if(Kills == 20) { //Reward you want to give it }
return 1; } //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= stock Name(playerid) { new Name[MAX_PLAYER_NAME];