[FilterScript] (NEW Version 0.3d) Killing Spree
#1

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).
pawn Код:
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*
* 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 <a_samp>
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#define BLANCO 0xEFEFF7AA
new Sounds[4][] =
{
 "http://*******/mTE72G", //Sounds[0] - KillingSpree
 "http://*******/pEeVqK",//Sounds[1] - monsterkill
 "http://*******/pNrwNG",//Sounds[2] - Unstoppable
 "http://*******/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",Name(killerid),killerid,Kills);

    else if(Kills == 10)
       format(string,sizeof string,"<< {FF0000}%s(%d) MonsterKill!! with {ffffff}%d {FF0000}Kills",Name(killerid),killerid,Kills);

    else if(Kills == 15)
       format(string,sizeof string,"<< Wow! {FF0000}%s(%d) Unstoppable!! with {ffffff}%d {FF0000}Kills",Name(killerid),killerid,Kills);
       
    else if(Kills == 20)
       format(string,sizeof string,"<< Amazing! {FF0000}%s(%d) UltraKill!! withn {ffffff}%d {FF0000}Kills",Name(killerid),killerid,Kills);

    else return 1;

    if(Kills == 5 || Kills == 10 || Kills == 15 || Kills == 20)
    {
       SendClientMessageToAll(BLANCO, string);
       Reward(killerid,Kills);
       new IDSound;
       switch(Kills)
       {
         case 5: IDSound = 0;
         case 10: IDSound = 1;
         case 15: IDSound = 2;
         case 20: IDSound = 3;
         default: return 1;

       }
       return PlayAudioStreamForPlayer(killerid, Sounds[IDSound], 0.0, 0.0, 0.0, 0);
    }

  }
  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];

    GetPlayerName(playerid, Name, sizeof(Name));
    return Name;
}
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Sorry for my bad nglish xD
Reply
#2

Sounds good
Reply
#3

why u dont use edit post?
Reply
#4

nice
Reply
#5

Quote:
Originally Posted by Horrible
Посмотреть сообщение
why u dont use edit post?
because the title is wrong
Reply
#6

Код:
D:\Ultimate Deathmatch\filterscripts\killingspree.pwn(47) : error 017: undefined symbol "Nombre"
D:\Ultimate Deathmatch\filterscripts\killingspree.pwn(50) : error 017: undefined symbol "Nombre"
D:\Ultimate Deathmatch\filterscripts\killingspree.pwn(53) : error 017: undefined symbol "Nombre"
D:\Ultimate Deathmatch\filterscripts\killingspree.pwn(56) : error 017: undefined symbol "Nombre"
D:\Ultimate Deathmatch\filterscripts\killingspree.pwn(74) : error 017: undefined symbol "PlayAudioStreamForPlayer"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#7

Quote:
Originally Posted by All3xutzu
Посмотреть сообщение
Код:
D:\Ultimate Deathmatch\filterscripts\killingspree.pwn(47) : error 017: undefined symbol "Nombre"
D:\Ultimate Deathmatch\filterscripts\killingspree.pwn(50) : error 017: undefined symbol "Nombre"
D:\Ultimate Deathmatch\filterscripts\killingspree.pwn(53) : error 017: undefined symbol "Nombre"
D:\Ultimate Deathmatch\filterscripts\killingspree.pwn(56) : error 017: undefined symbol "Nombre"
D:\Ultimate Deathmatch\filterscripts\killingspree.pwn(74) : error 017: undefined symbol "PlayAudioStreamForPlayer"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
You have the SAMP 3D version on your server?
Can be downloaded here: https://sampforum.blast.hk/showthread.php?tid=282775
Reply
#8

really cool!
Reply
#9

Really cool
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)