07.08.2010, 10:38
(
Последний раз редактировалось Claude; 07.08.2010 в 10:40.
Причина: Added a thng more to let you understand it
)
Quote:
|
1) does this save the CLANS SCORE, it looks like it just saves the players score :/
2) if it does save the CLANS SCORE, then can you explain what it does and how? |
)It works simply:
When you die, it checks the variables if the player is NOT in the killerid, if the player is in the killerid's team, it means he won't get any score because it is teamkill, when he is not then it checks if players are in the team of the killerid (MAX_PLAYERS defines to all players = 500), if they are, all players in that team gets a score up, the dini just saves it, if you don't got it and if you can't find it, you can use
pawn Код:
public OnPlayerDisconnect(playerid)
{
SetPVarInt(playerid, "Score", GetPlayerScore(playerid));
return 1;
}
public OnPlayerConnect(playerid)
{
SetPlayerScore(playerid, GetPVarInt(playerid, "Score"));
return 1;
}
Edit
MAX_PLAYERS defines to 500, and "i" defines to MAX_PLAYERS, means ALL players in the team, thats why it is SetPlayerScore, also normally its 'SetPlayerScore(playerid, score);' - but because "i" defines to MAX_PLAYERS it is 'SetPlayerScore(i, score);'


