SA-MP Forums Archive
[Pedido] Sistema Killing Spree/Double Kill - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Sistema Killing Spree/Double Kill (/showthread.php?tid=303391)



[Pedido] Sistema Killing Spree/Double Kill - shadauer - 13.12.2011

Como Fazer Com Que Este Cуdigo Funcione Da Seguinte Maneira

Dar 1 Som Por Cada Morte
EXEMPLO:


MATEI 1 : KILLINGSPREE
MATEI 1 : ULTRA KILL
MATEI 1 DENOVO: KILLINGSPREE
MATEI 1 DENOVO: ULTRA KILL
E O DOUBLE KILL E MULTI KILL SEJA DO MESMO JEITO POREM TROCAR O SOM CADA VEZ Q MATA 2


pawn Код:
#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;
}
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Re: [Ajuda] Sistema Killing Spree/Double Kill - steki. - 13.12.2011

https://sampwiki.blast.hk/wiki


Re: [Ajuda] Sistema Killing Spree/Double Kill - shadauer - 13.12.2011

? Pra q isso kara


Re: [Ajuda] Sistema Killing Spree/Double Kill - steki. - 13.12.2011

Coloque [PEDIDO] antes.

Isso nгo й ajuda.


Re: [Ajuda] Sistema Killing Spree/Double Kill - shadauer - 13.12.2011

Isso й ajuda ^^ pq eu tenho o produto e quero apenas uma modificaзгo rsrrs brincadeira, desculpe eu nao sabia

@EDIT


Estou Com Problemas Nessa FS
pawn Код:
( 74 ) : error 017: undefined symbol "PlayAudioStreamForPlayer"
( 120 ) : warning 219: local variable "Name" shadows a variable at a preceding level



Re: [Ajuda] Sistema Killing Spree/Double Kill - Kuddy - 13.12.2011

Quote:
Originally Posted by shadauer
Посмотреть сообщение
Isso й ajuda ^^ pq eu tenho o produto e quero apenas uma modificaзгo rsrrs brincadeira, desculpe eu nao sabia

@EDIT


Estou Com Problemas Nessa FS
pawn Код:
( 74 ) : error 017: undefined symbol "PlayAudioStreamForPlayer"
( 120 ) : warning 219: local variable "Name" shadows a variable at a preceding level
Coloque as includes da 0.3d .


Re: [Ajuda] Sistema Killing Spree/Double Kill - Cristhian - 13.12.2011

pawn Код:
new Name[MAX_PLAYER_NAME];
ou
pawn Код:
stock Name(playerid)
{
    new nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nome, sizeof(nome));
    return nome;
}



Re: [Ajuda] Sistema Killing Spree/Double Kill - shadauer - 13.12.2011

Estou Com Problemas Para Resolver Este:
pawn Код:
C:\samp03dsvr_R2_win32\filterscripts\Sound.pwn(120) : warning 219: local variable "Name" shadows a variable at a preceding level



Re: [Ajuda] Sistema Killing Spree/Double Kill - r-Valdez - 13.12.2011

Quote:
Originally Posted by shadauer
Посмотреть сообщение
Estou Com Problemas Para Resolver Este:
pawn Код:
C:\samp03dsvr_R2_win32\filterscripts\Sound.pwn(120) : warning 219: local variable "Name" shadows a variable at a preceding level
A variavel Name jб foi criada, exclua ela e deixe sу 1 no topo do gm...


Re: [Ajuda] Sistema Killing Spree/Double Kill - isli27 - 13.12.2011

Vocк nгo tem mais variбveis com esse nome ?

@edit

Isso ai mesmo ...