SA-MP Forums Archive
ayuda como hago esto por favor - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ayuda como hago esto por favor (/showthread.php?tid=623235)



ayuda como hago esto por favor - bikesdeivis - 29.11.2016

Hola espero que esten bien disculpen como hago para hacer que mi clan suba el score cuando mate a una persona estos son los codigos que tengo


#define C_Ninguno 0 // Ningun Clan
#define Clan_DTk 1 // Destruccion Total KillerZ
#define Clan_CRp 2 // Cultura Rapera
#define Clan_LKz 3 // Latin KingZ

enum EstadisticaClan {

Clan_Victimas_DTk,
Clan_Victimas_CRp,
Clan_Victimas_LKz,

Clan_Muertes_DTk,
Clan_Muertes_CRp,
Clan_Muertes_LKz,
};
new file[128];
new ServerClan[EstadisticaClan];


public OnPlayerDeath(playerid, killerid, reason)
{
if(InfoCuenta[killerid][MiembroClan] == 1)
{
SendClientMessage(killerid, Amarillo, "Un Punto mas de victimas.");
ServerClan[Clan_Victimas_DTk]++;
return 1;
}
else if(InfoCuenta[killerid][MiembroClan] == 2)
{
SendClientMessage(killerid, Amarillo, "Un Punto mas de victimas.");
ServerClan[Clan_Victimas_CRp]++;
return 1;
}
else if(InfoCuenta[killerid][MiembroClan] == 3)
{
SendClientMessage(killerid, Amarillo, "Un Punto mas de victimas.");
ServerClan[Clan_Victimas_LKz]++;
return 1;
}
else if(InfoCuenta[playerid][MiembroClan] == Clan_DTk)
{
SendClientMessage(playerid, Amarillo, "Un Punto mas de muerte.");
ServerClan[Clan_Muertes_DTk]++;
return 1;
}
else if(InfoCuenta[playerid][MiembroClan] == 2)
{
SendClientMessage(playerid, Amarillo, "Un Punto mas de muerte.");
ServerClan[Clan_Muertes_CRp]++;
return 1;
}
else if(InfoCuenta[playerid][MiembroClan] == 3)
{
SendClientMessage(playerid, Amarillo, "Un Punto mas de muerte.");
ServerClan[Clan_Muertes_LKz]++;
return 1;
}

return 1;
}

Pero veo las estadisticas de los clanes y no sube nada


Re: ayuda como hago esto por favor - Dayrion - 29.11.2016

Hole. No comprendo your language. /:
This is an English section forum. There is a section for Spanish or Portuguese. c:


Re: ayuda como hago esto por favor - Rayco - 30.11.2016

Esta es la secciуn inglesa, postealo en la secciуn espaсola.


Re: ayuda como hago esto por favor - TheRohlikar - 30.11.2016

Translate to spanish ...

You use "return 1;" in your conditions. Whenever you pass condition, "OnPlayerDeath" stops. Means... When you find, that "killerid" is in some team, their score is increased, then "playerid" can't be detected.

(bad english, but you could understand XD)