30.10.2010, 20:33
Hello all.. Im created a timer, with 1ms interval.. Its looping all players, and checking are some player are in vehicle, and are veh hp < 750.. If < 750 - freezing player.. But.. its flOOOding. :/
And here is da script:
SetTimer("PagrindinisTimer", 1000, true);
and than..
....
Any ideas?!
And here is da script:
SetTimer("PagrindinisTimer", 1000, true);
and than..
pawn Код:
public PagrindinisTimer()
{
foreach(Player, ID)
{
/// another shit
/////////////////////////////// VARIKLIS
if(IsPlayerInAnyVehicle(ID))
{
if(MasinosGyvybes < 700)
{
TogglePlayerControllable(ID, false);
SendClientMessage(ID, BALTA,"Jыsш maрinos variklis uюgeso. Kreipkities pas Mechanikus.");
SetPVarInt(ID, "Variklis", 1);
}
Any ideas?!