|
public OnPlayerDeath(playerid, killerid, reason) { SendDeathMessage(killerid, playerid, reason); ActualizarScore(killerid); new clanid=Info[killerid][cMiembro]; if(Info[killerid][cMiembro] == clanid) { Clanes[killerid][score] ++; Info[killerid][DMscore] ++; InfoMSG(killerid, "Exito ~b~1+ ~w~Dm Score."); InfoMSG(killerid, " ~n~~g~1+~w~ Clan Score."); }else{ Info[killerid][DMscore] ++; InfoMSG(killerid, "Exito ~b~1+ ~w~Dm Score."); } return 1; } |
#define CLAN_A 1 // topo
#define CLAN_B 2 // topo
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
ActualizarScore(killerid);
if(Info[killerid][cMiembro] == CLAN_A) // Pertence a clan A
{
Clanes[killerid][score] ++;
Info[killerid][DMscore] ++;
InfoMSG(killerid, "Exito ~b~1+ ~w~Dm Score.");
InfoMSG(killerid, " ~n~~g~1+~w~ Clan Score.");
}else{
Info[killerid][DMscore] ++;
InfoMSG(killerid, "Exito ~b~1+ ~w~Dm Score.");
}
else if(Info[killerid][cMiembro] == CLAN_B) // Pertence a clan B
{
Clanes[killerid][score] ++;
Info[killerid][DMscore] ++;
InfoMSG(killerid, "Exito ~b~1+ ~w~Dm Score.");
InfoMSG(killerid, " ~n~~g~1+~w~ Clan Score.");
}else{
Info[killerid][DMscore] ++;
InfoMSG(killerid, "Exito ~b~1+ ~w~Dm Score.");
}
else // No pertenece a ningъn clan
{
}
return 1;
}
|
Estбs mirando si X = X. X serб siempre igual a X!
Haga lo siguiente, sуlo un ejemplo: [code] #define CLAN_A 1 // topo #define CLAN_B 2 // topo public OnPlayerDeath(playerid, killerid, reason) { SendDeathMessage(killerid, playerid, reason); ActualizarScore(killerid); if(Info[killerid][cMiembro] == CLAN_A) // Pertence a clan A { Clanes[killerid][score] ++; Info[killerid][DMscore] ++; InfoMSG(killerid, "Exito ~b~1+ ~w~Dm Score."); InfoMSG(killerid, " ~n~~g~1+~w~ Clan Score."); }else{ Info[killerid][DMscore] ++; InfoMSG(killerid, "Exito ~b~1+ ~w~Dm Score."); } else if(Info[killerid][cMiembro] == CLAN_B) // Pertence a clan B { Clanes[killerid][score] ++; Info[killerid][DMscore] ++; InfoMSG(killerid, "Exito ~b~1+ ~w~Dm Score."); InfoMSG(killerid, " ~n~~g~1+~w~ Clan Score."); }else{ Info[killerid][DMscore] ++; InfoMSG(killerid, "Exito ~b~1+ ~w~Dm Score."); } else // No pertenece a ningъn clan { } return 1; } |
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
ActualizarScore(killerid);
if(Info[killerid][cMiembro] > 0)
{
new clanid=Info[killerid][cMiembro];
Clanes[clanid][score] ++;
Info[killerid][DMscore] ++;
InfoMSG(killerid, "Exito ~b~1+ ~w~Dm Score.");
InfoMSG(killerid, " ~n~~g~1+~w~ Clan Score.");
}else{
Info[killerid][DMscore] ++;
InfoMSG(killerid, "Exito ~b~1+ ~w~Dm Score.");
}
return 1;
}
|
no seria asi?
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
ActualizarScore(killerid);
if(Info[killerid][cMiembro] > 0)
{
new clanid=Info[killerid][cMiembro];
Clanes[clanid][score] ++;
Info[killerid][DMscore] ++;
InfoMSG(killerid, "Exito ~b~1+ ~w~Dm Score.");
InfoMSG(killerid, " ~n~~g~1+~w~ Clan Score.");
}else{
Info[killerid][DMscore] ++;
InfoMSG(killerid, "Exito ~b~1+ ~w~Dm Score.");
}
return 1;
}
|