Player score
#2

Quote:
Originally Posted by ajwar
Посмотреть сообщение
I have a timer which works every minute. I wan't to make a script which adds player score ir player position has changed from the old checking. But this one won't work. Any id'eas what is wrong?
I would make an stock.
pawn Код:
stock IsInNewPos(playerid, Pos[])
{
     new nPos[3];
     GetPlayerPos(playerid, nPos[0], nPos[1], nPos[2]);
     if(Pos[0] != nPos[0] && Pos[1] != nPos[1] && Pos[2] != nPos[2]) return 1;
     return 0;
}
Then check doing :

pawn Код:
new Float:PlayerPos[MAX_PLAYERS][3];
public AddScore(playerid)
{
     if(IsInNewPos(playerid, PlayerPos[playerid]))
     {
          // Give points here
     }
     GetPlayerPos(playerid, PlayerPos[playerid][0], PlayerPos[playerid][1], PlayerPos[playerid][2]);
}
Reply


Messages In This Thread
Player score - by ajwar - 20.02.2011, 16:22
Re: Player score - by Cameltoe - 20.02.2011, 16:37
Re: Player score - by ajwar - 20.02.2011, 17:22
Re: Player score - by Cameltoe - 20.02.2011, 17:23
Re: Player score - by ajwar - 20.02.2011, 17:25
Re: Player score - by Cameltoe - 20.02.2011, 17:53

Forum Jump:


Users browsing this thread: 1 Guest(s)