05.05.2011, 15:15
pawn Код:
new RobTime[MAX_PLAYERS];
pawn Код:
SetTimer("RobTimer", 1000, true);
pawn Код:
public RobTimer()
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, 2.0, /*pickup coords*/))
{
RobTime[i]++;
if(RobTime[i] == 10)
{
// 10 seconds passed
}
}
else
{
RobTime[i] = 0;
}
}
}
}