How to save score!?!?
#8

Quote:
Originally Posted by Criss_Angel
Посмотреть сообщение
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?
There is and never exists a SetClanScore or SetTeamScore (told by Hiddos )
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);'
Reply


Messages In This Thread
How to save score!?!? - by Criss_Angel - 07.08.2010, 09:18
Re: How to save score!?!? - by Niixie - 07.08.2010, 09:26
Re: How to save score!?!? - by Criss_Angel - 07.08.2010, 09:29
Re: How to save score!?!? - by Criss_Angel - 07.08.2010, 09:55
Re: How to save score!?!? - by Claude - 07.08.2010, 10:05
Re: How to save score!?!? - by Criss_Angel - 07.08.2010, 10:08
Re: How to save score!?!? - by Criss_Angel - 07.08.2010, 10:18
Re: How to save score!?!? - by Claude - 07.08.2010, 10:38
Re: How to save score!?!? - by Criss_Angel - 07.08.2010, 10:54
Re: How to save score!?!? - by Niixie - 08.08.2010, 10:58

Forum Jump:


Users browsing this thread: 1 Guest(s)