Autofix Problem on specific car
#1

I have a chasecar, I have cancel speedboost/jump/flip and to finish it, I need to cancel the autofix while someone is driving the chasecar. Also, I want to cancel the teleport, but I have no idea how.
Here is the Autofix on OnFilterScriptInit()
pawn Код:
SetTimer("AutoFix", 1000, true);
And this.
pawn Код:
forward AutoFix(playerid);
public AutoFix(playerid)
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        //Code here
    }
    return 1;
}
Should I use this but I don't know how to cancel it.
pawn Код:
for(new i=0; i<MAX_VEHICLES; i++)
    {
        if(i == ccar)
        {
            SetVehicleNumberPlate(i, "ChaseMe");
            SetVehicleToRespawn(i);
        }
    }
Moreover, there is a fail, that i noticed few days ago. I can teleport with the chasecar. How to make it to SendClientMessage that "You cannot teleport while you are on Chasecar!"
Reply
#2

Make a boolean to check IsVehicleChaseCar.
Reply
#3

your autofix is in a timer right ?? so you can something like when
OnPlayerEntervehicle

if vehicle == chasecar

then Killtimer

onplayerexitvehicle

if vehicle == chasecar

SetTimer("AutoFix", 1000, true);
Reply
#4

so basicly create variable, in that chase car set it n 0 and when he finish it set on 1, also in OnGameModeinit or in OnPlayerConnect set it on 1 and in timer check if a variable is 1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)