09.01.2011, 13:39
Okay, then just make a variable to check if he has already pressed it or not and reset it when it's released. For example:
pawn Код:
new bool:Pressed[MAX_PLAYERS] = false;
pawn Код:
forward UpdateAll();
public UpdateAll()
{
for(new i; i < MAX_PLAYERS; i ++)
{
if(PlayerInfo[i][pSelection] == 1 && Pressed[i] == false)
{
new keys,ud,lr;
GetPlayerKeys(i,keys,ud,lr);
new rand = random(sizeof(RandomVeh));
if(lr > 0)
{
print("Right");
Pressed[i] = true;
}
else if(lr < 0)
{
print("Left");
Pressed[i] = true;
}
else Pressed[i] = false;
}
}
return 1;
}