Give player score every 60 seconds -
Memoryz - 27.04.2010
Okay, so I want to make sure the is over a specified height, and then if if they are, it will give them +1 score.
I also have a function called "IsAircraft(vehicleid)" and it will return true if they are in a aircraft, so I want to make sure they are in one too.
Re: Give player score every 60 seconds -
Memoryz - 28.04.2010
Bump.
Re: Give player score every 60 seconds -
CAR - 28.04.2010
Use a timer
Use GetVehiclePos(GetPlayerVehicleID, X , Y, Z);
Use if(Y > 1000) or how high you want...
Re: Give player score every 60 seconds -
Memoryz - 28.04.2010
I know how to make a timer, but it's not letting me get the playerid.
Re: Give player score every 60 seconds -
Toni - 28.04.2010
Did you use a Loop?
Re: Give player score every 60 seconds -
Memoryz - 28.04.2010
Quote:
Originally Posted by Tɧ϶ Tσηί™
Did you use a Loop?
|
I don't know how I would use it to only do it for the person thats in the sky.
I need it to start the timer for 60seconds, and everytime it checks that they are in the air, and if they are it will add 1 point to their score.
I just need the things for the timer which I can get to start once they enter the airplane all I need is to check if they are over 7568 in height, and if they are, add a point.
Re: Give player score every 60 seconds -
Toni - 28.04.2010
Quote:
Originally Posted by Memoryz
Quote:
Originally Posted by Tɧ϶ Tσηί™
Did you use a Loop?
|
I don't know how I would use it to only do it for the person thats in the sky.
I need it to start the timer for 60seconds, and everytime it checks that they are in the air, and if they are it will add 1 point to their score.
I just need the things for the timer which I can get to start once they enter the airplane all I need is to check if they are over 7568 in height, and if they are, add a point.
|
I'm not sure, but it should be a "for new" loop, just example
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
And trying making a Callback for it the entire thing.....
I'm new still so i'm just trying to help
NOTE:
Sorry, I'll Add more to this when i can think of it.
Re: Give player score every 60 seconds -
Memoryz - 28.04.2010
Im thinking now, is it possibly to do it with onplayerupdate?
Re: Give player score every 60 seconds -
Las Venturas CNR - 28.04.2010
Modify this I guess:
Код:
public ScoreUpdate()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SetPlayerScore(i,GetPlayerScore(i)+1);
}
}
return 1;
}
At the top:
Код:
forward ScoreUpdate();
OnGameModeInit:
Код:
ScoreTimer = SetTimer("ScoreUpdate",60000,1);
Re: Give player score every 60 seconds -
Memoryz - 28.04.2010
Quote:
Originally Posted by LV CNR
Modify this I guess:
Код:
public ScoreUpdate()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SetPlayerScore(i,GetPlayerScore(i)+1);
}
}
return 1;
}
At the top:
Код:
forward ScoreUpdate();
OnGameModeInit:
Код:
ScoreTimer = SetTimer("ScoreUpdate",60000,1);
|
Okay, I need to get the VehicleID of the person now.
Quote:
public flightpoints()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsAircraft(vehicleid))
{
SetPlayerScore(i,GetPlayerScore(i)+1);
}
}
}
}
|