Player score
#1

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?
pawn Код:
public plusscore(playerid)
{

    if(!IsPlayerConnected(playerid)){KillTimer(timer1[playerid]); return 1;}
    new Float: pPos[3];

    if(pPos[0] != GetPVarFloat(playerid, "posX") || pPos[1] != GetPVarFloat(playerid, "posY") || pPos[2] != GetPVarFloat(playerid, "posZ"))
    {
         SetPlayerScore(playerid,GetPlayerScore(playerid)+random(2)+1);
    }
    GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
    SetPVarFloat(playerid, "posX", pPos[0]);
    SetPVarFloat(playerid, "posY", pPos[1]);
    SetPVarFloat(playerid, "posZ", pPos[2]);
    return 1;
}
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)