Any ideas?
#1

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..
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?!
Reply
#2

WEll it should be flooding :P its every 1 second, try making a timeout thing. i dunno how to do it xD but thats what I would think
Reply
#3

pawn Код:
new FrozePlayerBecauseTooLowHealth[MAX_PLAYERS];

if(IsPlayerInAnyVehicle(ID))
{
    if(MasinosGyvybes < 700)
    {
        if(FrozePlayerBecauseTooLowHealth[playerid] == 0)
        {
            TogglePlayerControllable(ID, false);
            SendClientMessage(ID, BALTA,"Jыsш maрinos variklis uюgeso. Kreipkities pas Mechanikus.");
            SetPVarInt(ID, "Variklis", 1);
            FrozePlayerBecauseTooLowHealth[playerid] = 1;
        }
    }
}
Reply
#4

Quote:
Originally Posted by pater
Посмотреть сообщение
pawn Код:
new FrozePlayerBecauseTooLowHealth[MAX_PLAYERS];

if(IsPlayerInAnyVehicle(ID))
{
    if(MasinosGyvybes < 700)
    {
        if(FrozePlayerBecauseTooLowHealth[playerid] == 0)
        {
            TogglePlayerControllable(ID, false);
            SendClientMessage(ID, BALTA,"Jыsш maрinos variklis uюgeso. Kreipkities pas Mechanikus.");
            SetPVarInt(ID, "Variklis", 1);
            FrozePlayerBecauseTooLowHealth[playerid] = 1;
        }
    }
}
Dude thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)